SFML community forums
General => SFML projects => Topic started by: redkiing on August 21, 2009, 08:08:47 pm
-
Hi there!!
I've created three new posts in my blog (http://redkiing.wordpress.com) describing how easy is to create SFML games. These are intended for new SFML developers, so I tried to do design the game 4 in a row as simple as possible. Hope you like it.
The tutorial is mostly code-commented, but I added additional comments between code parts. There's place for improvements, so if you think something is worth changing/adding/moving/... don't hesitate and tell it!^^
The three posts are here (http://redkiing.wordpress.com/category/game-development/) in a single page.
The first post is here (http://redkiing.wordpress.com/2009/08/20/your-first-sfml-game-part-i-introduction/). It includes the same screenshot :P and the links to the sources and the executable (for windows).
A screenshot of the game:
(http://redkiing.files.wordpress.com/2009/08/4inarowboard.png)
-
Hello.
It looks good, but since you want to draw your board it would have been better to make your board class inherit from sf::Drawable.
-
Hi thx G.,
What would be the differences and advantages of making the board class inherit from sf::Drawable besides using App.Draw(board) instead of board.draw()?
-
Hi thx G.,
What would be the differences and advantages of making the board class inherit from sf::Drawable besides using App.Draw(board) instead of board.draw()?
It will inherit all drawable's methods, like SetPosition, etc...
-
I'll certainly use inheritance from drawable in more advanced projects/tutorials, but I think this game would be as simple as it is right now if I inherited from drawable. Or is there something obvious I'm missing? What do you think?