Jump to content

  • Log In with Google      Sign In   
  • Create Account


Puyover

Member Since 10 Mar 2007
Offline Last Active Jun 15 2013 06:44 AM
-----

Posts I've Made

In Topic: Tetris clone in BASH script

21 April 2013 - 11:26 AM

Really a good job you have done. Congratulations smile.png


In Topic: Monday morning code...

21 April 2013 - 10:29 AM

If this was C++ there would be some chance of success due to operator overload, but... tongue.png


In Topic: Class instances gone wrong!

21 April 2013 - 10:24 AM

Yes, that's exactly what I'm doing now, except I didn't remove the dynamic allocation part though (will probably do that later), but now it looks like this:

 

int main( int argc, char* argv[] )
{
    game_app_t* app = new game_app_t();
    app->kick_off();
    
    return 0;
}

 

The pointer does get deallocated upon exiting because I used a function pointer passed to atexit() to ensure everything is released.

 

If that's also a bad idea, feel free to say so.  I do appreciate everyone's advice.  I'm learning something new from every response, and that's why I'm not afraid to make dumb threads! smile.png

 

Shogun

Dude please, stop programming C++ stuff and pick a book or read some of the C++ faqs or the new approaches about C++11, but you are programming like if you were doing a thing between Java and C.

 

I learnt C++ years ago too, but one month ago when I backed to do C++ stuff I knew I had horrible bad practices and I had to solve them, so I just picked a quick summary comparing old C++ with C++11, together with the faqs are linked in this thread and I achieve to get a big knowledge about the language itself.

 

I know I still have some problems which usually they are design related, but at least I don't have serious problems with stack/heap memory or using macros (language stuff related).


In Topic: Need help with C++

03 March 2013 - 01:40 PM

If you are not very experienced in C++ I suppose you are neither with OOP, so I would recommend you to choose SDL instead SFML. Use structured C++ instead object oriented so you don't need to learn a whole paradigm at all.

 

If I'm wrong with your knowledge, just forget the previous paragraph and go full OOP with SFML.


In Topic: Design patterns and game development

02 March 2013 - 04:26 PM

Hi Puyover,

 

In my opinion, componentization has been a very good architecture design decision for games as it provides a lot of reusability as well as elegance. In games, try to prefer components over inheritance. I'll leave this references here:

 

http://cowboyprogramming.com/2007/01/05/evolve-your-heirachy/

http://www.richardlord.net/blog/what-is-an-entity-framework

http://www.richardlord.net/blog/why-use-an-entity-framework

 

Hope this helps!

Thank you skullfire, nice to know there is a pattern at least which is well established into game development tongue.png

I will give that articles a read.


PARTNERS