- Joined
- Jan 2, 2020
- Messages
- 1,364
This one is for everyone how is good at datatypes of CX.
Right now I'm at the point that I'm gonna need to scale up the data-usage quiet a bit.
Basically I currently use a simple array, which is as simple as it gets of course. It does a fine job when I do random acccess, which is what I need.
Is it still a good idea to keep it as a simple array or should I use other datatypes?
The usage is currently a plain 1D that simulates to be a 2D array and the access will happen with reads and writes in strides of a few sequential screens at a time, vertically or horisontally. I just use simple multiplication or shifting atm. I'm worried about that garbage collection or caching / loading or other random delays when you jump around. Should I use something different? Any ideas?
Right now I'm at the point that I'm gonna need to scale up the data-usage quiet a bit.
Basically I currently use a simple array, which is as simple as it gets of course. It does a fine job when I do random acccess, which is what I need.
Code:
Field worldmap:Int[512*512] ' 12 screens world
' But now I'm gonna need to make it grow quiet a bit, and it might even get non-practical in some scenarios:
Field worldmap:Int[2048*2048] ' 50 screens world
Is it still a good idea to keep it as a simple array or should I use other datatypes?
The usage is currently a plain 1D that simulates to be a 2D array and the access will happen with reads and writes in strides of a few sequential screens at a time, vertically or horisontally. I just use simple multiplication or shifting atm. I'm worried about that garbage collection or caching / loading or other random delays when you jump around. Should I use something different? Any ideas?