Author Topic: Map Editor Error  (Read 5692 times)

Tanja

  • Clever
  • Fanatic
  • ***
  • Posts: 606
    • View Profile
Map Editor Error
« on: 2008-01-16, 05:48:40 PM »
strange error:
i wanted to edit one layer, and as i clicked to set the first tile, this message came:
"Mep Editor Error: Der Wert f

durnurd

  • Lead Lemming
  • Expert
  • Fanatic
  • *****
  • Posts: 1234
  • Games completed so far: 0
    • MSN Messenger - durnurd@hotmail.com
    • View Profile
    • Find My Ed
Re: Map Editor Error
« Reply #1 on: 2008-01-16, 09:33:28 PM »
255 tiles are possible with 1 byte.  Up to 65536 tiles are possible with two bytes. If you really are using all those tiles in one layer, then yes, you should use 2-byte layers.  You might want to consider using larger tiles that cover more of the graphic, however, so you can use fewer tiles.  Or, if most of your tiles are mapped tiles, and you are not using the unmapped values, you can redefine those unmapped values to shrink the number of tiles down to less than 255 (maybe).

The short answer, anyway, is that in your situation, you need two bytes per tile.
Edward Dassmesser

Tanja

  • Clever
  • Fanatic
  • ***
  • Posts: 606
    • View Profile
Re: Map Editor Error
« Reply #2 on: 2008-01-17, 05:37:00 AM »
there are really many mapped tiles. how do i redefine those unmapped values?

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: Map Editor Error
« Reply #3 on: 2008-01-17, 06:25:10 AM »
Any value that is not explicitly mapped can have a tile mapping assigned to it.  For example, assume you have a Frameset with 250 frames.  If you create a default tileset for that frameset, it will implicitly assign tile values 0 through 249 to match frames 0 through 249.  Now assume you want to add 10 animated tiles.  You could add tiles 250 through 259 for these new tiles, but then you would require more than 1 byte per tile because one byte can only hold 0-255.  But you should realize that some of the frames in the range 0-249 are for the animated tile already.  Maybe frames 10-19 are for an animated tile.  Right now you have tiles 10-19 each associated with frames 10-19.  But this isn't necessary.  If you really want an animated tile from those frames, then you don't need 10 tiles associated with these frames.  You only need 1 tile.  So here you could create a tile mapping for tile number 10 (which overrides the implicit mapping).  Tile number 10 could be the animated tile.  Then you could also put 9 more tile mappings from 11 through 19.  Then you can still get all your tiles in the range 0 to 249 instead of adding new tile mappings at the end.  This is why SGDK2 does not warn you if you override an implicit tile mapping.  It will only warn you if you try to create a tile mapping that overrides a tile mapping that you already created.

Tanja

  • Clever
  • Fanatic
  • ***
  • Posts: 606
    • View Profile
Re: Map Editor Error
« Reply #4 on: 2008-01-24, 01:12:30 PM »
if i understand your last post correctly, i cannot reduce my rock tileset. i already map frame 0, if i want an animated tile with frames from 0 to 9.
but another question.

i tried it, and it seems to not work. how about putting already mapped tiles into another mapped tile?

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: Map Editor Error
« Reply #5 on: 2008-01-26, 07:23:56 PM »
I took a quick look at meins17.sgdk2 and it looks like you do indeed have a lot of tiles.  And you have explicitly mapped many of them.  It might be easiest to make the layer be 2 bytes per tile because many of the tiles that you mapped have values larger than 255, which requires more than 1 byte.  But if you want to try to re-map those, it looks like you are not using tile number 5 for anything (it's a wind tile, but not animated, so I assume you don't use it).  The same is true for tile 6 and many other tiles.  You could re-map some of your tiles that are using values above 255 to use tile 5 and 6 and so forth.  But that would probably be much more work than making the layer 2 bytes per tile.

Tanja

  • Clever
  • Fanatic
  • ***
  • Posts: 606
    • View Profile
Re: Map Editor Error
« Reply #6 on: 2008-01-27, 06:18:14 AM »
But that would probably be much more work than making the layer 2 bytes per tile.

indeed. i don't think using 2 bytes will slow down performance so much it will be worth the work.

coming to my other question: i guess it is not possible to define some mapped tiles, and make then one tile which has the other mapped tiles in it. i tried it, but i didn't work. what would you think about it?
you could achieve several different animations with the lowest possible image count.

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: Map Editor Error
« Reply #7 on: 2008-01-27, 09:21:46 AM »
I don't understand exactly what you mean.  What could you do with your suggestion that you can't do now?