Author Topic: Question about GDBs  (Read 3417 times)

0 Members and 1 Guest are viewing this topic.

Offline Eniripsa96

  • LV2 Member (Next: 40)
  • **
  • Posts: 28
  • Rating: +3/-0
    • View Profile
Question about GDBs
« 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?

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Question about GDBs
« Reply #1 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?

Offline Eniripsa96

  • LV2 Member (Next: 40)
  • **
  • Posts: 28
  • Rating: +3/-0
    • View Profile
Re: Question about GDBs
« Reply #2 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.

Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Question about GDBs
« Reply #3 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