Welcome, Guest. Please login or register. Did you miss your activation email?

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - metroplex

Pages: [1]
1
This will start as a general question, but I'm in the dotnet section of the forums, because if I add some questions, they will need to be dotnet code related.

I wanted to get a clear understanding of game loops. I read lot's of posts and articles on the internet, and have a decent general understanding. Except, I have some trouble with frame independent movement (both fixed and variable timestep.

Ok, let me start with my first question.

The simplest loop is a Do while loop with a condition such as bQuit which is initially set to False and then to true when exiting the loop. Simple enough to understand. The most important point being, that if I put anything inside that loop, it will try to run at the fastest possible speed the computer can handle. Which is why we need to use frame independent movement to slow things down.

My biggest problem with understanding this is because of some utility functions and or procedures. I will need
a -

DoInput
DoUpdate
DoRender

...at the least. When looking up information on frame independent movement, I found out about delta. In most examples the delta is passed into the DoUpdate function. but I'm not sure where it is used inside the function. Also in the loop itself, the delta is used. Can someone start to put together a basic game loop in this thread, so we can slowly step by step make a clear explanation of how it works or how it should work?

C# would be fine for me. I have some experience with C/C++ C# and visual basic.

*Note* Please do NOT refer me to gaffer on games. It's not at all easy to understand. I spent 2 or 3 days trying to decipher that. No luck.

No code yet - hopefully someone can start this

Pages: [1]
anything