Jump to content


about update game world


2 replies to this topic

#1 zydgyy

    New Member

  • Members
  • PipPip
  • 10 posts

Posted 19 October 2011 - 08:13 AM

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 alphadog

    DevMaster Staff

  • Moderators
  • 1716 posts

Posted 19 October 2011 - 08:25 PM

Lolwut?!?

I don't understand what you are asking. Are you asking how to implement an event-based architecture in a game?
Hyperbole is, like, the absolute best, most wonderful thing ever! However, you'd be an idiot to not think dogmatism is always bad.

#3 fireside

    Senior Member

  • Members
  • PipPipPipPip
  • 1590 posts

Posted 20 October 2011 - 01:48 AM

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.
Currently using Blender and Unity.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users