Author Topic: Map template/copy map  (Read 5720 times)

MadMath

  • Regular
  • **
  • Posts: 20
    • View Profile
    • eMidrash.net
Map template/copy map
« on: 2008-01-16, 05:10:34 PM »
Right now each time I make a new level for my game I have to copy the layers and plans by hand. Is there an easier way to do this?

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: Map template/copy map
« Reply #1 on: 2008-01-17, 06:12:02 AM »
Option 1) Can you put the rules from your plans into sprite rules instead?  Sprite rules can be applied on any map.
Option 2) Can you put all your levels in one map with one large set of layers?
Option 3) It might be possible to copy/paste the XML code in the SGDK2 file to create a copy of a map, but that might yield some invalid duplicate objects.

Hope one of these works; if none of these are optimal, I'll try to remember to consider adding some more helpful feature for this in a future version.

MadMath

  • Regular
  • **
  • Posts: 20
    • View Profile
    • eMidrash.net
Re: Map template/copy map
« Reply #2 on: 2008-01-17, 12:14:59 PM »
Option 1) I have made sure to put rules in the sprites whenever possible. I have also combined all of the rules for a map into one plan on one layer. So, copying it all manually will only take a few extra minutes per map.
Option 2) Might work for others having this problem, but the effort I would have to put into it for my game would be more than that of copying the maps manually. There are two reasons for this. (1) I am setting up my game so that the player can choose which level he wants to play rather than saving and loading. (2) I have used the animating tile feature to create different themes for each tile. It might look kinda funny for the tiles to change from grass to desert when the player entered the new level.
Option 3) Sounds interesting... have no idea how to do that.

Anyway, thanks for trying.

p.s. If you do decide to add a feature to help with this, you might consider including a way to allow multiple people to work on maps simultaneously. For example, let's say that I had three friends that volunteered to build maps for my game. If I sent them each a copy of the source code, they could each make maps. But when they were done, I wouldn't be able to put them together into one game. That's just something to consider.

durnurd

  • Lead Lemming
  • Expert
  • Fanatic
  • *****
  • Posts: 1234
  • Games completed so far: 0
    • MSN Messenger - durnurd@hotmail.com
    • View Profile
    • Find My Ed
Re: Map template/copy map
« Reply #3 on: 2008-01-17, 12:17:18 PM »
For friends editing, you can use a program like WinDiff to merge differences in an SGDK2 project after you receive submissions from various people.
Edward Dassmesser

Tanja

  • Clever
  • Fanatic
  • ***
  • Posts: 606
    • View Profile
Re: Map template/copy map
« Reply #4 on: 2008-01-17, 01:09:59 PM »
how cool. is the documentation of WinDiff good, or would it be cool to have kind of a short tut for that?
i think it would be at least a good thing to mention it in the help files.

MadMath

  • Regular
  • **
  • Posts: 20
    • View Profile
    • eMidrash.net
Re: Map template/copy map
« Reply #5 on: 2008-01-17, 01:30:15 PM »
I just downloaded WinMerge. I used it to see what adding one map to the game would change in the source code. I do believe that I now know how to use option 3. I would think that as long as I change the names of the maps that I shouldn't have to worry about the invalid duplicate objects.

MadMath

  • Regular
  • **
  • Posts: 20
    • View Profile
    • eMidrash.net
Re: Map template/copy map
« Reply #6 on: 2008-01-17, 05:14:42 PM »
Oops. I forgot to say thank you for the help.

Thank you!