Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 15 Mar 2013
Offline Last Active Yesterday, 09:27 AM

Posts I've Made

In Topic: Shadow of Mordor... OMG! Why?

27 September 2015 - 12:52 AM

And don't forget that the Mass Effect games bound all actions to one key so you would end up rolling in place rather than collecting some credits or whatever.

In Topic: Some ideas for a tic tac toe

30 November 2013 - 09:57 PM

I know Lua uses one as the index. When I did my Tic-Tac-Toe game, I used an enum class of X, O, and Empty or so.

In Topic: Creating game objects with a class?

29 November 2013 - 07:14 PM

Look at the source file, it includes GameObject.h. The header only uses a pointer to GameObject, so it doesn't actually need to know about it. The source file is what is actually using it, hence why you include it there. Since pointers and references are known sizes, the compiler can use them without full definitions of types.


Also, why is your factory method in a class when it could just be a free function in this case?

In Topic: Always running into a circular dependency

29 November 2013 - 05:26 PM

Actually, Sprite does have a virtual destructor because sf::Drawable has one. Here are some link  on the SFML about inheriting from sf::Sprite.

In Topic: Always running into a circular dependency

29 November 2013 - 12:16 PM

Why does the entity need to know about the scene?


Also, you shouldn't be inheriting from sf::Sprite. Make it a member and, if you want to use your class like the sprite, inherit from sf::Drawable and sf::Transformable. You'll need to override the draw method, and there are a few things that the Sprite has that aren't in either of those (color, bounds, and texture/texture rects).