Omnimaga

Calculator Community => TI Calculators => Axe => Topic started by: collechess on October 22, 2011, 08:56:04 pm

Title: Dynamic Tilemapping Elements
Post by: collechess on October 22, 2011, 08:56:04 pm
  I am making a game with switches and gates and I need to be able to change some elements in a tilemap.  I tried storing it to a normal value(A-Z), but it saves the changes to the program on exit, so the gate disappears permanently.  How can I add dynamic elements to a tilemap?
Title: Re: Dynamic Tilemapping Elements
Post by: LincolnB on October 22, 2011, 09:14:34 pm
For items and stuff, and I think this can also apply to switches and gates, you can make a copy of the tilemap into free ram somewhere.

Like, say, your map is in GDB1, it's 12*20, and 240 bytes. You would say:

Copy(GDB1,L1,240)

and then your tilemap is in L1, and the next time you run the program, the map is restored.
Title: Re: Dynamic Tilemapping Elements
Post by: Keoni29 on October 29, 2011, 10:09:47 am
Just save the world in ram and copy the tilemap you need for the level. Save some information like which item is collected of which door is open if you want.