Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 15 Mar 2013
Offline Last Active May 29 2016 07:49 PM

#5113410 Some ideas for a tic tac toe

Posted by Dante12129 on 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.

#5113105 Always running into a circular dependency

Posted by Dante12129 on 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.

#5113022 Always running into a circular dependency

Posted by Dante12129 on 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).

#5073311 SFML - Is there a way to implement lights?

Posted by Dante12129 on 27 June 2013 - 01:29 PM

You could use a vertex array that stores each bullet as a vertex and make each vertex the color you want it to be. The sf::Points type only lets them be one pixel, though.

#5064340 Getting started with C++

Posted by Dante12129 on 23 May 2013 - 08:53 PM

I would recommend SFML 2.0. It is object-oriented, has a helpful community, and itsn't that hard to setup. (There's even a guy that provides a Code::Blocks project for it so that all you have to do is put in your installation path.)

#5058962 C++ 11 thread not working on CodeBlocks

Posted by Dante12129 on 03 May 2013 - 10:34 AM

I'm guessing that you're using MinGW, which as far as I know doesn't support C++11's threading yet.

#5057381 Framerate Regulator Not Working

Posted by Dante12129 on 27 April 2013 - 07:50 PM

Resetting the m_start_ticks solved the problem. Thanks.

#5044964 Weird SDL Error

Posted by Dante12129 on 20 March 2013 - 12:09 PM

I removed the const and const_casts but it will still randomly give me the error. I ran the debugger from Code::Blocks and it says that I am getting the segmentation fault from SDL_UnlockSurface. Here's my log:



Setting breakpoints
Debugger name and version: GNU gdb (GDB) 7.5
Child process PID: 2728
Program received signal SIGSEGV, Segmentation fault.
In SDL_UnlockSurface () (C:\Users\Main\Documents\Programs\Game_Engine_Test\bin\Debug\SDL.dll)
The call stack lists SDL_UnlockSurface(), SDL_FreeSurface(), ZN5myeng6ScreenD@Ev(), msvcrt!_lock(), and some hex numbers as the calls.