17
votes
6answers
2k views

Separating game data/logic from rendering

I'm writing a game using C++ and OpenGL 2.1. I was thinking how could I separate the data/logic from rendering. At the moment I use a base class 'Renderable' that gives a pure virtual method to ...
-1
votes
1answer
91 views

Problem in animating polygon [closed]

Hi I am trying to move my black colored polygon downward. But As soon as I run my application my polygon gets invisible! I think My logic of move function is wrong. Can anyone help me out in figuring ...
0
votes
1answer
206 views

Logic For camera Movement

Every time I move the hero on my screen I increment a screenOffsetX and a screenOffsetY. These add 1 if you move right, -1 if left to the sceenOffsetX. Add the screenOffestY +=1 if down, -=1 if up. I ...
-3
votes
2answers
194 views

Safe zone implementation in Asteroids [closed]

I would like to implement a safe zone for asteroids so that when the ship gets destroyed, it shouldn't be there unless it is safe from other asteroids. I tried to check the distance between each ...
5
votes
5answers
602 views

C++: Game State Logic other than switch statement?

Executive summary Are there any good tutorials on Game State FSMs, particularly OOP/OOD-based and not switch-statement-based? Summary Is there a practical process for creating a game state engine ...
4
votes
1answer
646 views

Best way to separate display and game logic (threads)

What is the best way to separate render and game logic threads? I'd like to make logic-heavy game (ai, machine learning, and network) in which world updates 50-60 times per second. I want to ...
4
votes
3answers
2k views

Writing Logic behind card games

I'm not a dev noob, but definitely never done anything in game dev. There is a trump based card game we play in town that I plan on coding. I'll be either using python/ajax/pyqt or c++/qt. My ...