Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: First forray into SFML - a Tic-Tac-Toe game  (Read 6280 times)

0 Members and 2 Guests are viewing this topic.

EnigmaticFellow

  • Newbie
  • *
  • Posts: 6
    • View Profile
First forray into SFML - a Tic-Tac-Toe game
« on: February 04, 2012, 03:15:27 am »
I'm not sure whether I should post this here since it's not really a long-term project, but I couldn't find another place to post this.

I just started out in game programming as well as SFML and decided to practice by first writing a tic-tac-toe game.  It works by pressing the number of the square with the number on the keypad.  The numbering starts from left to right, up to down in the following manner:

1 | 2 | 3
4 | 5 | 6
7 | 8 | 9

I compiled it in Linux, but I have the source code and the required images for it in the following link if you guys wish to try compiling it in your own system.

http://www.mediafire.com/?oih9ez1yai33mcw

The program is still a bit incomplete since I have yet to make it recognize if a character wins or not.

Keep in mind that the program uses the C++0x and 2.0 SFML library.

I also have a question to ask.  Which game do you guys suggest I write after this?

StormWingDelta

  • Sr. Member
  • ****
  • Posts: 365
    • View Profile
First forray into SFML - a Tic-Tac-Toe game
« Reply #1 on: February 04, 2012, 03:38:29 am »
Pong, Brick Breaker, Space Shooter, Platformer.

Not necessarily in that order but it's a start.
I have many ideas but need the help of others to find way to make use of them.

thePyro_13

  • Full Member
  • ***
  • Posts: 156
    • View Profile
First forray into SFML - a Tic-Tac-Toe game
« Reply #2 on: February 04, 2012, 03:38:35 am »
You could try break out or space invaders. They have simple logic, but let you play with more dynamic entities and gameplay.

Haikarainen

  • Guest
First forray into SFML - a Tic-Tac-Toe game
« Reply #3 on: February 04, 2012, 06:28:46 pm »
Umm, why did you put the numbers in reverse y-order as to the numpad on 99% of the keyboards?

EnigmaticFellow

  • Newbie
  • *
  • Posts: 6
    • View Profile
First forray into SFML - a Tic-Tac-Toe game
« Reply #4 on: February 04, 2012, 08:25:21 pm »
Quote from: "Haikarainen"
Umm, why did you put the numbers in reverse y-order as to the numpad on 99% of the keyboards?


The program isn't really using the numpad; instead, it is using the number keys above the letters.

Naufr4g0

  • Full Member
  • ***
  • Posts: 112
    • View Profile
First forray into SFML - a Tic-Tac-Toe game
« Reply #5 on: February 04, 2012, 08:51:13 pm »
Quote from: "EnigmaticFellow"

The program isn't really using the numpad; instead, it is using the number keys above the letters.


Quote! I compiled the game for windows and it works only with numeric keys, not keypad ones.
Why don't control the game with mouse? ;)

EnigmaticFellow

  • Newbie
  • *
  • Posts: 6
    • View Profile
First forray into SFML - a Tic-Tac-Toe game
« Reply #6 on: February 04, 2012, 09:14:10 pm »
Quote from: "Naufr4g0"
Quote! I compiled the game for windows and it works only with numeric keys, not keypad ones.
Why don't control the game with mouse? ;)


It seemed easier for me to make it use the numeric keys as opposed to the mouse at the time.  I'll probably give the program mouse support in a later revision.

EnigmaticFellow

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: First forray into SFML - a Tic-Tac-Toe game
« Reply #7 on: April 15, 2012, 03:52:56 am »
Well guys, I just updated my tic-tac-toe game to change its interface from keyboard to simply clicking on the corresponding grid and included win conditions to the programming.

It can be downloaded here.

 

anything