Author Topic: Tilemap Editor  (Read 26445 times)

0 Members and 2 Guests are viewing this topic.

Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: Tilemap Editor
« Reply #15 on: July 01, 2010, 01:57:16 pm »
This sounds neat.  Will there be an option for if you want to use 256 tiles instead of 16? :D

Offline nemo

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1203
  • Rating: +95/-11
    • View Profile
Re: Tilemap Editor
« Reply #16 on: July 01, 2010, 02:34:45 pm »
256 tiles is 2048 bytes.. so no. i think i'm capping it at about 60-65 since L2 will probably store them, and L2 is 531 bytes. also, i think 60 tiles is pretty crazy for one map. the tilesets are unique to each map, though you will be able to load other tilesets into different maps.


Offline nemo

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1203
  • Rating: +95/-11
    • View Profile
Re: Tilemap Editor
« Reply #17 on: July 05, 2010, 09:42:23 pm »
hey guys, i need your input.
what's the maximum size i should make maps? i'd like to have dimensions that fit in 768 bytes. should i just make an input loop where you can specify height and width, but if the product of the two numbers exceeds 768 the program exits? or is it worth it to figure a way to separate the map into 2 free RAM areas to enable larger map sizes?


Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: Tilemap Editor
« Reply #18 on: July 05, 2010, 09:51:05 pm »
should i just make an input loop where you can specify height and width, but if the product of the two numbers exceeds 768
I think this would work.  And if it was over, then just cancel the last change. :)

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Tilemap Editor
« Reply #19 on: July 06, 2010, 12:10:46 am »
I think 768 should be enough. The only concern I have is if somebody is doing a RPG world map. Such are usually around 4096-16384 bytes large if uncompressed, since they're generally 64x64 through 128x128 (ROL3 maps were about 40x40, but they looked very tiny and simple)

Offline nemo

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1203
  • Rating: +95/-11
    • View Profile
Re: Tilemap Editor
« Reply #20 on: July 06, 2010, 12:44:34 am »
they'll have to use CalcGS then. plus, i don't think editing a tilemap greater than 768 bytes on-calc is the easiest way.


Offline Builderboy

  • Physics Guru
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5673
  • Rating: +613/-9
  • Would you kindly?
    • View Profile
Re: Tilemap Editor
« Reply #21 on: July 06, 2010, 01:07:32 am »
If need be you would always check to see if you have the RAM, and then create an Appvar with the needed RAM.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Tilemap Editor
« Reply #22 on: July 06, 2010, 01:42:30 am »
I tried openign such data once, when I made a map editor that I couldn't figure out how to get editing to work, I had no issues looking through the data except that i had to archive other things before running my prog x.x

Offline nemo

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1203
  • Rating: +95/-11
    • View Profile
Re: Tilemap Editor
« Reply #23 on: July 06, 2010, 11:53:58 pm »
the source code attached is not recommended to be ran. i'll repeat. it isn't a good idea. it's for tanner, because he wanted the source code to see just how badly i'm messing up in my appvars  ;D



Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Tilemap Editor
« Reply #24 on: July 07, 2010, 01:12:57 am »
I really had serious troubles before reading data from appvars. Idk why but it seems to be a major hassle x.x

Offline nemo

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1203
  • Rating: +95/-11
    • View Profile
Re: Tilemap Editor
« Reply #25 on: July 07, 2010, 01:15:52 am »
oddly enough, using copy() seems to work when reading from appvars. however, using copy() when writing to appvars does not. in my program i use a for() loop to loop through all the data and copy it byte by byte. regardless, i got it working. as soon as i make it a bit more user friendly i'm going to release another little beta to comment upon.


Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Tilemap Editor
« Reply #26 on: July 07, 2010, 01:21:10 am »
mhmm Idk if it was intended to use or not in appvars. Could you maybe post this in bug reports?

I can't wait for beta!

Offline Quigibo

  • The Executioner
  • CoT Emeritus
  • LV11 Super Veteran (Next: 3000)
  • *
  • Posts: 2031
  • Rating: +1075/-24
  • I wish real life had a "Save" and "Load" button...
    • View Profile
Re: Tilemap Editor
« Reply #27 on: July 07, 2010, 01:32:21 am »
It works both ways.  Don't forget to reinitialize the appvar pointer if you have created any new ones becasue then the data could have been moved around somewhere else.
___Axe_Parser___
Today the calculator, tomorrow the world!

Offline nemo

  • LV9 Veteran (Next: 1337)
  • *********
  • Posts: 1203
  • Rating: +95/-11
    • View Profile
Re: Tilemap Editor
« Reply #28 on: July 07, 2010, 07:39:45 am »
quigibo, aren't  
Code: [Select]
Copy(L3,I,384
Copy(L1,I+384,256

and
Code: [Select]
For(A,0,383
{L3+A}->{I+A}
End
For(A,0,255
{L1+A}->{384+A+I}
End

equivalent lines of code? only the latter works in my program. however, i'll experiment later today to see if having GetCalc(Str1)->I before the copy statements will make a difference.

edit: using getcalc(str1)->I before the copy statements makes it work, although the data at pointer I isn't modified anywhere in my code. if i have a Lbl I and call it as a subroutine, would this perhaps modify the pointer?
« Last Edit: July 07, 2010, 10:06:13 am by nemo »


Offline Quigibo

  • The Executioner
  • CoT Emeritus
  • LV11 Super Veteran (Next: 3000)
  • *
  • Posts: 2031
  • Rating: +1075/-24
  • I wish real life had a "Save" and "Load" button...
    • View Profile
Re: Tilemap Editor
« Reply #29 on: July 07, 2010, 01:33:14 pm »
No, the labels are completely separate.  Maybe send me the source or executable of the one where it doesn't work right and I can do a disassembly to figure out what the problem is.  There's definitely a possibility that it's a bug.
___Axe_Parser___
Today the calculator, tomorrow the world!