i'm much more new than that
i know count frames per second, but you use that. " time = Target(8,8)/Steps(8 frames) = (1,1) per step" didn't learn that yet, so my game can be more faster on some computers depending on CPU\RAM\GPU.
i'm much more new than that
i know count frames per second, but you use that. " time = Target(8,8)/Steps(8 frames) = (1,1) per step" didn't learn that yet, so my game can be more faster on some computers depending on CPU\RAM\GPU.
10 hours ago, Scouting Ninja said:
Is it just me or in that diagram does it look like Load Resources in the game loop? That makes no sense.
-potential energy is easily made kinetic-
1 hour ago, cambalinho said:so my game can be more faster on some computers depending on CPU\RAM\GPU.
Yes that is why engines normally have a Delta time function, it measures time since the last frame. So you multiply with Delta time to get frame rate independent movement.
These are theoretical values, to make it easy:
Say a frame takes one second to show 1fps but the next frame takes only half the time 2fps. Delta time would return 1 on the first frame and 0.5 (1 second /2) on the second.
So if you multiply 1*1 = 1 and 1*0.5 = 0,5. So:
Step1 (0,0) + ((1,1)*DeltaTime[1]) = (1,1);
Step2 (1,1) + ((1,1)*DeltaTime[0.5]) = (1.5,1.5); //So it only moved half a step because the frame rendered twice as fast.
1 hour ago, cambalinho said:i'm much more new than that
Don't worry, Vectors are easy to understand. It's 1+1 for the most part.
If a object is at (5,7) it means it's on the X axis at 5 and Y axis at 7. Like a graph.
Moving to (8,13) from that point would need X+3 and Y+6. So move 3 right and 6 up.
To find how much you need is just subtraction (8,13) - (5,7) = (3,6) or X+3 and Y+6.
Velocity is just how much you need to move to get to that point divided by time. So if I wanted to get there in 3 steps: (3,6)/3 = (1, 2). If I add (1, 2) every step then in 3 steps I will reach that point.
38 minutes ago, Infinisearch said:Is it just me or in that diagram does it look like Load Resources in the game loop? That makes no sense.
The loading isn't done by the game loop but it is called from the main loop. That is why it's an arrow and not a loop, sorry if this wasn't clear.
thank you so much for all.
i never did a Game Loop and i'm learning Directx 9 for start and on start. what i have learned was using Game Maker.
and yes i did some Game on C++ before using Windows GDI and the events, but i didn't knew about the delta and more.
thanks for all. thank you
I admittedly speed-scanned the posts above, so I'm not sure if someone already mentioned Game Programming Patterns, by Bob Nystrom. But if not, have a look at this: http://gameprogrammingpatterns.com/game-loop.html
That's a link to a chapter in a free-as-in-beer ebook (as long as you read it online) - it's good for more than just game loop discussion, too. Check it out!
On 1/5/2018 at 9:02 AM, cambalinho said:i'm learning Directx 9 for start
D3D9 is VERY out of date and very little of it translates over to modern game programming. I would highly recommend switching to D3D11.
"Those who would give up essential liberty to purchase a little temporary safety deserve neither liberty nor safety." --Benjamin Franklin
i'm sorry, but why some autors book use 50(or more) pages on just 1 chapter?
1 hour ago, cambalinho said:i'm sorry, but why some autors book use 50(or more) pages on just 1 chapter?
Probably because they feel they need 50 (or more) pages to describe what they're talking about in the best way.
Hello to all my stalkers.
yah... more big the chapter more big the boring lol
honestly a big chapter can be much more tired and much more information\study to 'eat'
This has been a fascinating discussion for me. I was aware of your concept of the Game Loop but have never had how you use this concept explained in such detail before (I read a couple of the linked articles, as well). As I've said before "Rube is a part of nature", a generic simulation of time combined with reality. All games and simulations simulate time in some form, however abstract. Even simple back and forth turns like in Checkers are a highly abstract simulation of time. Your Game Loop is a "moment of time containing reality" that is actually very similar to a Steve Cole "impulse". The foundation of what I call "Rube" is everywhere, because time is everywhere.
"I wish that I could live it all again."