Omnimaga

Calculator Community => TI Calculators => Axe => Topic started by: Eniripsa96 on April 09, 2011, 01:59:26 pm

Title: Question about GDBs
Post by: Eniripsa96 on April 09, 2011, 01:59:26 pm
I need to initialize a GDB and I only want [01] to be the tile number in it to being with. Is there a way to initialize it with tons of [01] values without having to type out all the thousands (yup, i want thousands :D) of [01]s? otherwise I'll have a sea of the following...

[010101010101010101010101010101010101010101010101]
[010101010101010101010101010101010101010101010101]
etc
 
I thought fill at first but that requires a value already in the object. Any ideas?
Title: Re: Question about GDBs
Post by: Builderboy on April 09, 2011, 02:04:29 pm
There is no way unfortunately to do this D: really the only way would be to do this:

Code: [Select]
Zeros(9001)->GDB1
1->{GDB1}
Fill(GDB1,9001)

Which does require some extra code but is the best solution for screen space and source code size.

On a related note, and our of curiosity, what are you doing that requires thousands of 1's?
Title: Re: Question about GDBs
Post by: Eniripsa96 on April 09, 2011, 02:12:43 pm
I am upgrading my maze game that had a 1-pixel dot for you moving around to a tile-based system. I change the 1s to 0s to path it, but seeing that code, it would probably be easier to do it the other way. But with this, I'll have a large, fully randomized maze where you can walk through to reach the exit. I hope I can get this to work, but I'm brand new to tilemapping and fairly new to Axe so lets see how far I get lol.
Title: Re: Question about GDBs
Post by: Builderboy on April 09, 2011, 02:16:54 pm
Oooh gotcha, yeah it probably would be better to start with 0's and add in the 1's :P