I created a system which uses terrain deformations and stores the height in variables for later use. This system has limits. I want to remake the system but use a different method which i believe would work better for me. Basically I take all the variable height data and store and/or compress compress it into a smaller data chunk then only recall/read these height data chunks for whatever area of the map is in use.
I'm looking for ideas of how to do this.
Some other information which may or may not help.
map size is 256x256
the terrain deformations go from 0 to 46 height with a 0.10 jump. 460 deformation actors total.
The amount of information we need to store accounts for [450]^[65,536] possibilities. Integers are 4 bytes (32 bits). So at the very least we need 577,620 bits → 18,051 integers.
This is still a huge amount of data. We could make it easy on ourselves and pretend there are 2^9=512 deformation actors, and then use bitwise operators to extract the information from the ints. It would end up taking 18,432 integers. Here's an example of how you might get the information (still assuming 512 heightvalues): Since there are 512 deformation actors, which use 9 bits, we need to only grab those 9 and not the other ones. If each element in a row is consecutive and then repeated for columns, then h(x,y) = the [(x + 256 y)*9+1]th bit through the [(x + 256 y)*9+10]th bit. I don't remember seeing bitwise operators in the regular editor so this might only work in galaxy script.
Rollback Post to RevisionRollBack
To post a comment, please login or register a new account.
Hello,
I created a system which uses terrain deformations and stores the height in variables for later use. This system has limits. I want to remake the system but use a different method which i believe would work better for me. Basically I take all the variable height data and store and/or compress compress it into a smaller data chunk then only recall/read these height data chunks for whatever area of the map is in use.
I'm looking for ideas of how to do this.
Some other information which may or may not help. map size is 256x256 the terrain deformations go from 0 to 46 height with a 0.10 jump. 460 deformation actors total.
Asked the guy who made the tutorial on that method?
Contribute to the wiki (Wiki button at top of page) Considered easy altering of the unit textures?
https://www.sc2mapster.com/forums/resources/tutorials/179654-data-actor-events-message-texture-select-by-id
https://media.forgecdn.net/attachments/187/40/Screenshot2011-04-17_09_16_21.jpg
@zandose: Go
The amount of information we need to store accounts for [450]^[65,536] possibilities.
Integers are 4 bytes (32 bits). So at the very least we need 577,620 bits → 18,051 integers.
This is still a huge amount of data. We could make it easy on ourselves and pretend there are 2^9=512 deformation actors, and then use bitwise operators to extract the information from the ints. It would end up taking 18,432 integers. Here's an example of how you might get the information (still assuming 512 heightvalues):
Since there are 512 deformation actors, which use 9 bits, we need to only grab those 9 and not the other ones. If each element in a row is consecutive and then repeated for columns, then h(x,y) = the [(x + 256 y)*9+1]th bit through the [(x + 256 y)*9+10]th bit. I don't remember seeing bitwise operators in the regular editor so this might only work in galaxy script.