The central code loop responsible for handling the running gameplay. At its most basic state, it accepts input, resolves the actions of entities, and renders the scene.
2
votes
1answer
46 views
How to manage sleep/awake state of physics body
I have a loop, which updates all the physics, inside the loop I'm updating the position of the objects, first thing is the gravity, which pulls all the objects to the bottom.
Now my question is, how ...
0
votes
0answers
63 views
Framerate and game loop on mobile
I'm searching how to manage game framerate on mobiles devices, here is my problem:
On a computer with got something like that:
void main()
{
while(game.isRunning())
{
...
4
votes
1answer
139 views
Game Logic Update Order
Is there a commonly-accepted general approach to the order of processing logic updates?
My current 2D platformer has objects that implement different concerns, including the following:
Notifiable - ...
3
votes
3answers
107 views
Should I use select() for networking in my gameloop?
I'm writing a simple networked game in C/C++. To keep things simple I'm using TCP.
In my server's game loop I'm using a POSIX select() with a zero second timeout for two things:
Discover incoming ...
0
votes
1answer
122 views
How to use C++11 chrono header for a clock
In first, sorry for my bad english. :)
I'm making a game using SFML and C++11 new features, but I've got a problem with my custom Clock class (made to replace the SFML one).
When I get the elapsed ...
1
vote
0answers
106 views
Game Loop on Server [closed]
I'm writing a simple mobile game with the following requirements:
Server needs to update all active games at frequent and regular interval (i.e. I need a game loop running on a server but the update ...
0
votes
2answers
118 views
declaring variables in a render/game loop: good idea or bad?
I was just wondering how most of you like to declare your variables: for a variable you know will be used and changed frequently (i.e. every frame), do you declare those outside of the loop and simply ...
4
votes
3answers
366 views
Game loop on windows
I have seen different "basic" game loops both from books like "Introduction to 3D game programming with DX11" or online tutorial ( Rastertek ) and if we take off all the fancy stuff to control ...
2
votes
1answer
98 views
Implementing a time scale in game with fixed physics update
I'm currently putting together my game loop based on the "Fix Your Timestep" article at gafferongames.com. This is going fine, but I'm also trying to implement a 'time scale', i.e. a way to control ...
1
vote
1answer
241 views
Proper method to update and draw from game loop?
Recently I've took up the challenge for myself to create a basic 2d side scrolling monster truck game for my little brother. Which seems easy enough in theory. After working with XNA it seems ...
1
vote
1answer
157 views
How should I invoke a physics engine?
I'm new to writing games. I'm planning to write a 2D battle game which may require an physics engine. Suppose I've written one, but how can I combine it with the main routine of my game? Should I ...
1
vote
1answer
203 views
Mixing Objective-C and C++: Game Loop Parts
I'm trying to write all of my game in C++ except for drawing and game loop timing. Those parts are going to be in Objective-C for iOS.
Right now, I have ViewController handling the update cycle, but ...
1
vote
0answers
249 views
How to implement the server-side game loop?
The server needs to handle the physics, because all the movement will be handled by it. So for that I need a game loop. The thing is that the server doesn't have the render part, it's just a console. ...
0
votes
1answer
80 views
either use a for loop or iterator for the List of sprites for loop Optimization in libgdx
I am making and there I am making a frequent use of java.util.ArrayList for enemies, coins and shots. Is there any other utility in libgdx better than this from the Performance point of view.
...
0
votes
2answers
124 views
Serious gameplay issue by spawning enemies according to elapsed time
EDIT: I have changed the title as I think that this is a general gamedevelopment question but, on a technical note, I am using Cocos2d v2.0
Some time ago I had asked a question on which was the most ...