Author Topic: Dynamic Tilemapping Elements  (Read 1906 times)

0 Members and 1 Guest are viewing this topic.

Offline collechess

  • LV3 Member (Next: 100)
  • ***
  • Posts: 93
  • Rating: +22/-2
    • View Profile
Dynamic Tilemapping Elements
« 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?

Offline LincolnB

  • Check It Out Now
  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1115
  • Rating: +125/-4
  • By Hackers For Hackers
    • View Profile
Re: Dynamic Tilemapping Elements
« Reply #1 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.
Completed Projects:
   >> Spacky Emprise   >> Spacky 2 - Beta   >> Fantastic Sam
   >> An Exercise In Futility   >> GeoCore

My Current Projects:

Projects in Development:
In Medias Res - Contest Entry

Talk to me if you need help with Axe coding.


Spoiler For Bragging Rights:
Not much yet, hopefully this section will grow soon with time (and more contests)



Offline Keoni29

  • LV11 Super Veteran (Next: 3000)
  • ***********
  • Posts: 2466
  • Rating: +291/-16
    • View Profile
    • My electronics projects at 8times8
Re: Dynamic Tilemapping Elements
« Reply #2 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.
If you like my work: why not give me an internet?