Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!

1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


Member Since 15 Mar 2013
Offline Last Active May 01 2015 04:14 AM

Posts I've Made

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).

In Topic: Trouble Compiling Luabind

26 October 2013 - 09:16 PM

Well I used Lua for Windows before and it worked fine. I kinda figured I would need to compile Lua myself but I just wanted to see if there was anything besides compiling Lua that would work.