View Single Post
Old 04 October 2020, 13:59   #1
mcgeezer
Registered User
 
Join Date: Oct 2017
Location: Sunderland, England
Posts: 2,702
Most efficient way of storing x/y values over frames

Hi all,

I'm trying to work out the best way I can store a large number of x/y positions over a fairly large number of frames.

The application is the drone cars that go around the circuit in Super Sprint, I need to record their X/Y positions but if a car takes 30 seconds to do a lap at 60 FPS then it takes a fair amount of ram.

X range is 0-511 and Y rand is 0-384.

30 * 60 = 1800 * 2 words = 7200 bytes, for three laps that then goes to 21600 - far too big.

Does anyone have some decent algorithms they could share to do this thing and store the data more efficiently?

Cheers,
Geezer

One solution I have at the moment is this.

Have two starting position word values.
Then have a series of bytes.

Bits 6 & 7 control the x any y move direction.
Bits 0-2 control the value to add/subtract (based on bit 6) from the current x position
Bits 3-5 control the value to add/subtract (based on bit 7) from the current y position.

This gets me to 5.4kb of uncompressed data which is decent.

Last edited by mcgeezer; 04 October 2020 at 14:13.
mcgeezer is offline  
 
Page generated in 0.04952 seconds with 11 queries