i believe its in matricies atm, he mentioned about strings.T0RM3N7 wrote:how are you saving the tilemaps as matricies or lists or what?
Irp!-GEE
Moderator: MaxCoderz Staff
Each element in a list can hold 10 digits before it goes into scientific notation. If I only had 10 tiles (value of 0-9) per map I could fit 10 tiles per element, but since I plan on doing 100 tiles per map (values of 0-99), I can store 5 tiles per element, which is better than just a tile per element. To more easily explain how it works, if I had 0123456789 in an element, and divided it by 100, I'd have 01234567.89, then take the fPart( and you'd get the value of 89. Then just get the fPart(int(num)/100 and you have the next value, etc. Theres a slight flaw with this that I have to do a special check with. Now for saving, I have to multiply the tile # and add to the element, then downsize the multiplier every loop (done via a calculation dependant on the loop variable). Anyways gotta get offline, hope all that made sense (if not I'll explain later)
[Gridwars Score] - E: 1860037 M: 716641 H: 261194
-
- Calc Wizard
- Posts: 526
- Joined: Tue 08 Mar, 2005 1:37 am
- Location: who wants to know?
- Contact: