Hi Everyone,
I'm re-doing a project that I originally constructed in Flash with AS 2.0, this time I'm using C++ and including Box2D.
I just wanted some advice on how any of you would approach this:
The game allows you to move objects around, and later be able to see how you moved them in an almost 'replay' like action.
Basically I'm trying to figure out the best way to store position information for each object. In the flash version I was storing the xy positions of the objects in an array with a new element for each point in time. After a while the read/write from the different arrays really slowed down the game and I figure there must be a better way of doing this.
Since the objects are now all box2D bodies, I can store the position of the body as a vector. I can use an array, but I don't know beforehand how many elements I will need and it's still pretty read/write heavy.
Any ideas?
Thanks.
I'm re-doing a project that I originally constructed in Flash with AS 2.0, this time I'm using C++ and including Box2D.
I just wanted some advice on how any of you would approach this:
The game allows you to move objects around, and later be able to see how you moved them in an almost 'replay' like action.
Basically I'm trying to figure out the best way to store position information for each object. In the flash version I was storing the xy positions of the objects in an array with a new element for each point in time. After a while the read/write from the different arrays really slowed down the game and I figure there must be a better way of doing this.
Since the objects are now all box2D bodies, I can store the position of the body as a vector. I can use an array, but I don't know beforehand how many elements I will need and it's still pretty read/write heavy.
Any ideas?
Thanks.