gasp cough, how can people come up with that! Heck, so much math going on these days...

Amazing, I will give a go on the caanoo too!

Thanks Backslider, amazing work!

Edit: when I re-run the code, the last entity seems to get stuck on the top left corner and wont move, I will give more tests on this and let you know, it must be on my messy side of things, of course.

Edit: when I re-run the code, the last entity seems to get stuck on the top left corner and wont move, I will give more tests on this and let you know, it must be on my messy side of things, of course.

Hoops, it was my mistake that the first box did not move.I update them in a loop from i = 0 to 9 and set the speed = i. So the first had speed 0.

To move entities smoothly over time (frame rate independent), you could use my Tween library.This could be added directly into the '2DEntitySystem' if you want (if backslider is interested), or used by itself manually.(Keep in mind this was designed for 3D, for 2D, just ignore the 'z' component.)

Also, this could be used for rotation and scale (and colour if you want).

FUNCTION GameLoop:WHILE gameIsPlaying twn_player.Update() player_x = twn_player.value.x player_y = twn_player.value.yDRAWSPRITE sp_player, player_x, player_yIF twn_player.status = TWEEN_FINISHED// Tween has finished (but this is setup to run forever, so this will never be called in this instance)ENDIFWENDENDFUNCTION

I hope this works as cut/pasted, and I included all referenced code (such as the TVector type, etc).I had to remove some extra code that was experimental.This was for tweening along a *curved* path using a Cosine curve, such as:

I realize this isn't what Slim requested, but tweening could be useful in a 2DEntitySystem.I never actually checked out the entity code, but I ran the demos. Very cool!

Does an entity have a direction setting?(direction could be either an angle (from 0 to 360, or -180 to +180), or a vector (x, y))If so, then Slim's request should be easy: Move(entity, speed)Just use GETTIMER() * speed.

TweenPosSet(entity, x, y, time, transition)// Move entity to x,y over 'time' ms, using transition specified, can be chained to allow a complex pathTweenRotationSet(entity, rotation, time, transition)// Rotate entity to 'rotation' degrees over timeTweenScaleSet(entity, scale, time, transition)// Scale entity to 'scale' size over time