Author Topic: import SGDK 1 projects to SGDK 2  (Read 2598 times)

SmartBoy16

  • Contributor
  • Fanatic
  • **
  • Posts: 587
  • Looking for inspiration.....
    • View Profile
    • Email
import SGDK 1 projects to SGDK 2
« on: 2007-07-26, 09:40:13 AM »
here's a suggestion for the next SGDK2 alpha. i think there should be a way to import SGDK1 files to SGDK2. right now i am using the SGDK2 alpha6 (the map editor doesn't work though because my graphics card doesn't support multiple alpha levels for transparency >:(.) and i think it's a good program. i am still confused about what the differences between framesets and tilesets are. ???
Looking to the skies.....

durnurd

  • Lead Lemming
  • Expert
  • Fanatic
  • *****
  • Posts: 1234
  • Games completed so far: 0
    • MSN Messenger - durnurd@hotmail.com
    • View Profile
    • Find My Ed
Re: import SGDK 1 projects to SGDK 2
« Reply #1 on: 2007-07-26, 12:09:01 PM »
I doubt that there will ever be support for importing SGDK1 games into SGDK2.  The formats are too completely different.

As for framesets and tilesets:  A frameset is a group of frames.  Imagine a frame as any single graphic you have drawn, blasted onto a piece of stretchy, clear plastic.  You can turn it around, scrunch it up, or stretch it out.  You can also turn it upsidedown, etc.   Basically, you can transform the graphic in any way.

Now, a tileset is a group of tiles, obviously.  A tile is a collection of frames.  These collections are useful for a few different things.  Imagine an animated television show, like The Simpsons.  They don't completely redraw every single frame of animation for the whole show.  That would take way too long.  Instead, they have the background frame (for example, the kitchen), which they stick in the back, then they have each of the characters in their own frame, all layered on top of each other, to end up with a final animation cell.  That's what a tile is like.  Several frames layered on top of each other, so you can use different graphical components all together in one tile (that goes onto the map) without having to actually draw each variation separately.  This way, you can have many fewer actual graphics (which take up a bulk of the physical disk space) and still have a plethora of tiles.

Tiles also represent full animations.  That's where the repeat count comes in.  If you have, for example, a background frame, B, and two foreground frames, 1 and 2, which represent two frames of animation (say, for example, mouth closed and mouth open, to animate a person's face talking), then you could create a tile like this:

B1B2

Where B has a repeat count of 0, and 1 and 2 have a repeat count of X.  This way, B will show up with 1 on top of it for X frames, then B will show up with 2 on top of it for X frames.  It's like having the kitchen and Homer standing there, then having the kitchen, and homer sitting, and it would animate between them.  Of course, in most cases, you'll probably have more than just two-frame animations, and they don't necessarily need to have a background in the tile.  The animation could have a clear background to see the layer behind it through the animation.

I hope I've helped.  Just ask if you don't understand something.
Edward Dassmesser

SmartBoy16

  • Contributor
  • Fanatic
  • **
  • Posts: 587
  • Looking for inspiration.....
    • View Profile
    • Email
Re: import SGDK 1 projects to SGDK 2
« Reply #2 on: 2007-07-26, 07:45:27 PM »
ok, i think i get it now.
Looking to the skies.....

bluemonkmn

  • SGDK Author
  • Administrator
  • Fanatic
  • *****
  • Posts: 2761
    • ICQ Messenger - 2678251
    • MSN Messenger - BlueMonkMN@gmail.com
    • View Profile
    • http://sgdk2.sf.net/
    • Email
Re: import SGDK 1 projects to SGDK 2
« Reply #3 on: 2007-07-27, 11:25:54 AM »
I'll say it another way, and maybe it will make even more sense.  Map layers are made of an array of tiles (W tiles across by H tiles high). Each tile is represented simply as a number indicating which tile goes at that position.  It would have been possible to simply make these numbers refer directly to a frame in the frameset.  The first frame would be number 0 and the second frame would be number 1 and so forth (so wherever the layer has a 1, frame number 1 would appear there).  But if that were all you could do, then you would not be able to have a single tile on the layer be represented as multiple graphics in the same place, and animating a tile would be much more difficult.  So in order to allow the tiles on a layer to do some more fancy things (like animation) an extra layer of abstraction was put in between the frames and the layer, and referred to as tileset/tiles.  So now you *can* still simply refer to frames directly.  (If you create a tileset that refers to a frameset, but don't add any tiles to it, then number 0 on the layer will still refer to the first frame in the frameset.)  But if you add a tile with a specific number to the tileset, then you can also do some fancier things.  So a tile is like a super-frame with extra features you can use when you need them.  So if you want a particular tile to be animated, then you pick some number you want to use to represent that tile on the layer (keeping in mind that when you use that number, it will no longer refer to the frame that was using that number).  Then you can add a number of frames to that single tile and define how it will animate.

No matter how I say it it still sounds complicated, but hopefully if you play around with the tileset editor and tutorials and sample projects (when they are available) this will make more sense.  Tiles are just a way to put things on a layer that are fancier than frameset frames... allowing them to animate and be combined when you want.