Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 16 May 2009
Offline Last Active Aug 31 2015 01:32 PM

#5224550 What is the most conventional way to handle highscores for different logins

Posted by emforce on 20 April 2015 - 02:02 PM

Best bet would be to use SQLite and have a local database file I think. 


This way you could have 2 different databases. one of which keeps track of users with a user_id etc, the other which keeps track of stores and contains a foreign key linking it to the user table. 


If you want to keep track of what records you have uploaded to the site just add another column to the table and every time you upload a record you change this value to '1' or whatever.


With regards to detecting who's cheated that's going to be another problem altogether, SQLite has it's own synchronization so you could in theory keep the lock on the database up until the user submits a score and then acquire the lock again? Just an idea but it might add that extra bit of protection and prevent most script-kiddies.

#5224464 Enemies intelligence increased level by level

Posted by emforce on 20 April 2015 - 06:17 AM

In addition to the strategy pattern that was suggested by Arka80, you could also have a look at the composition pattern. Wherein everytime your enemy goes up in level you add on a new select piece of functionality via a class. 


So instead of completely switching strategies you would simply add a new ability to the enemy class. 


This is just an example I've written: Composite Pattern


Hope this helps!

#5224460 Learning Graphics Development

Posted by emforce on 20 April 2015 - 05:46 AM

I would definitely recommend jumping into the current API's and more specifically OpenGL due to it's cross-platform nature. Creating games/projects with these current APIs should hopefully give you a deeper understanding of the underlying concepts such as graphics programming as well as software design patterns.


There are plenty of OpenGL bindings for pretty much every language thinkable right now so just choose the language you are most comfortable in and get coding! :D

#5217305 2D vs 3D

Posted by emforce on 18 March 2015 - 03:21 AM

OpenGL is always a great place to start I find, it's cross platform and is just about on par with Directx. 

With OpenGL you'll be able to effectively learn all the things that you need to learn such as how to create orthographic matrices and rotation/translation matrices which will be vital when starting on 3D Projects. 


The other major added bonus is that you'll be able to learn OpenGL with just about any language that you want as most of these major languages have frameworks that provide the bindings! I'm currently developing a series on Java and LWJGL 3 which is the framework that provides OpenGL bindings for Java so you should check it out: OpenGL Tutorials