about update game world

2f5a63c282518b88f1732bdca3b6acc4
0
zydgyy 101 Oct 19, 2011 at 08:13

Hi,guys!
I read a lot about,game is something like discrete events simulation,update a game world,just take the states at previous time t-dt,some events just happened right now at time t,and dt(time step) as imputs to update method,then the method use them to determine states at time t,use the new states at time t to go physics simulation,collision detection,and so on,and then render the new game world at time t,repeat this process until we want to exit!Update method just a event handler!
So do i think right?How do i implement this!Any suggestions?!
a new guy thank you!

2 Replies

Please log in or register to post a reply.

8676d29610e6c98d6dd2d9c38528cd9c
0
alphadog 101 Oct 19, 2011 at 20:25

Lolwut?!?

I don’t understand what you are asking. Are you asking how to implement an event-based architecture in a game?

A638aa42130293f319eda7fa4ba121f4
0
fireside 141 Oct 20, 2011 at 01:48

If you use an object oriented approach, you can put an abstract update in the base level object and extend all your classes from it. If they are in a collection of some type, you can cycle through them and update. Events are usually based on collision and input, or some type of alarm, and notify the objects. The objects make the appropriate response to the event in their own update function.