Ticket #36 (assigned defect)

Opened 8 months ago

Last modified 6 months ago

Velocities do not 'tick' correctly

Reported by: knowknowledge Owned by: chris
Priority: critical Milestone: 0.4.0
Component: Video Version:
Keywords: Cc:

Description

All velocities should move sprites based on the time since the last 'tick' in a way that creates the same illusion of speed regardless of the framerate.

Currently, slower framerates cause movement to be much slower than normal. This means that ships turn jerkily and weapons do not fire as far on slower systems.

While we should try to avoid low framerates caused by slow algorithms, many systems will run at below maximum framerates. It is important to have the same gameplay regardless.

Change History

Changed 7 months ago by chris

  • milestone set to 0.2.0

Please see the 'Fixed Frame Pig' demo at http://olofson.net/mixed.html for a great example of how to do this.

Basically, the work should be done in the Timer class. The Timer class then has a function like GetDelta?() which is a multiplier to be used against all position updates. That way, if Timer::Pause() is called, GetDelta?() will return 0s to ensure that if the logic loop is run, we don't end up moving anything.

Changed 7 months ago by chris

Arke has indicated he's interested in working on this (and he'd do a good job) but he won't be able to meet the January deadline. We might want to do just a little work on this and push it to 0.3.0 for him.

Changed 6 months ago by knowknowledge

  • owner changed from somebody to chris
  • status changed from new to assigned
  • milestone changed from 0.2.0 to 0.3.0

Chris started to implement a virtual framerate timer.

Changed 6 months ago by knowknowledge

Multiple draw steps per update step causes the Engine Animation to flicker.

The current engine draw logic 'turns itself off' after every draw, but turns on only when it is updated.

Note: See TracTickets for help on using tickets.