I was looking for these kind of things in js, and I was under the impression that I could not manage to have a fixed 8bit element array type… if this exists, then the hit in memory would almost disappear.
Within the engine, every platform, door, etc… is represented by a number within that array… if we had a huge Level, we would need to have 255+ platforms or walls to get to 8 bit element limit… Within this demo I have 53 as a maximum number… I could see levels with more than 255, so I think that 16bits array should be the way to go…
Update: Thank you… I think you are into something here… I’ll take a look to your approach: