Author Topic: More TileMap ?  (Read 3733 times)

0 Members and 1 Guest are viewing this topic.

Offline baptystes

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 10
  • Rating: +0/-0
    • View Profile
More TileMap ?
« on: May 18, 2012, 11:25:14 am »
With google traduction  ;D :
Hello every one, is it possible to store a tilemap in a secondary program, and call her when you want (to reduce the RAM used, and to store more maps).
My tilemap looks like that : [0000000] -> gbd1
                                        [10000...
 Thank you  :)
Snake, Pong, PapyJump, Sokoban, puissance 4, d'autres jeux type casse tête...

Offline MGOS

  • LV6 Super Member (Next: 500)
  • ******
  • Posts: 336
  • Rating: +95/-0
    • View Profile
Re: More TileMap ?
« Reply #1 on: May 18, 2012, 11:52:40 am »
Instead of using a second program, you could store the maps in different appvars you can archive and unarchive in axe.
To create those appvars, it might be helpful to make a map editor.

Offline Hayleia

  • Programming Absol
  • Coder Of Tomorrow
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3367
  • Rating: +393/-7
    • View Profile
Re: More TileMap ?
« Reply #2 on: May 18, 2012, 11:56:10 am »
This tutorial wil teach you how to use appvars (it teaches some other things but the appvar is the most interesting variable for your problem).
Basically, what you do is creating a program to create the appvar and put your map(s) in it, then archive your appvar then run your main prog that will read into the appvar. However, this method doesn't work for "dynamic maps". I mean that you won't be able to write to the map without unarchiving the appvar (but you stil can unarchive it :))

edit: ninja'd D:
« Last Edit: May 18, 2012, 11:56:33 am by Hayleia »
I own: 83+ ; 84+SE ; 76.fr ; CX CAS ; Prizm ; 84+CSE
Sorry if I answer with something that seems unrelated, English is not my primary language and I might not have understood well. Sorry if I make English mistakes too.

click here to know where you got your last +1s

Offline baptystes

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 10
  • Rating: +0/-0
    • View Profile
Re: More TileMap ?
« Reply #3 on: May 18, 2012, 01:35:39 pm »
Ok, thank you, but when i try to copy an appvar on a file, it doesn't work :
Code: [Select]
:GetCalc("appvMAP1",2)->A
:5->{a+0}
:Output(0,0,{a+0}>dec    //here it is working, it displays "1"  :D
:
:GetCalc("appvMAP1",Y1)
:{Y1}->B
:Output(0,1,{B+0}>dec    //but here, it displays an another number
???
« Last Edit: May 18, 2012, 01:36:00 pm by baptystes »
Snake, Pong, PapyJump, Sokoban, puissance 4, d'autres jeux type casse tête...

Offline Darl181

  • «Yo buddy, you still alive?»
  • CoT Emeritus
  • LV12 Extreme Poster (Next: 5000)
  • *
  • Posts: 3408
  • Rating: +305/-13
  • VGhlIEdhbWU=
    • View Profile
    • darl181.webuda.com
Re: More TileMap ?
« Reply #4 on: May 18, 2012, 02:42:45 pm »
Using Getcalc to find archived files does not return the pointer to the file.
You use the file itself, like
Output(0,1,{Y1}r►Dec)
« Last Edit: May 18, 2012, 02:43:23 pm by Darl181 »
Vy'o'us pleorsdti thl'e gjaemue

Offline baptystes

  • LV1 Newcomer (Next: 20)
  • *
  • Posts: 10
  • Rating: +0/-0
    • View Profile
Re: More TileMap ?
« Reply #5 on: May 19, 2012, 09:56:30 am »
Ok thanks for this tuto, I did my map editor and its perfectly working !
Thank you !  :D
Snake, Pong, PapyJump, Sokoban, puissance 4, d'autres jeux type casse tête...