darozak / Advolition

1 stars 0 forks source link

Add time delay to requested actions #11

Closed darozak closed 7 months ago

darozak commented 7 months ago

All actions performed by the robot and NPCs will have a certain time delay associated with them. This will determine in which order they get implemented. Right now, the game engine only grabs the most recently entered action from the stack and performs that. I need to organize the events by their time stamp and then pull the most recent event only if the designated game time has been reached or passed.

The game time itself will be the amount of virtual seconds that have elapsed since the game began. This seconds will elapse independent of real time whenever the robot is instructed to wait for a period of time.

darozak commented 7 months ago

Done! Robot now needs to wait for virtual game time to pass and all actions will be performed at their scheduled time (https://github.com/darozak/Advolition/commit/653db63f853a02994db21bd8be63b44050cc3600).