øAslickproductions.org/forum/index.php?PHPSESSID=so1iojs5ocdn0o2vf0tti7fbu6&topic=264.0e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index9537-2.htmlslickproductions.org/forum/index.php?PHPSESSID=so1iojs5ocdn0o2vf0tti7fbu6&board=16.0e:/My Web Sites/Slick Productions - FFIV Message Board/slickproductions.org/forum/index9537-2.html.zx‚õg^ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÈ ­ÉOKtext/htmlISO-8859-1gzip8:ÖÉÿÿÿÿÿÿÿÿTue, 10 Mar 2020 20:32:26 GMT0ó°° ®0®P®€§²ð®‚õg^ÿÿÿÿÿÿÿÿý(É Original Fantasy Map Design

Author Topic: Original Fantasy Map Design  (Read 11969 times)

Entroper

  • Moderator
  • *
  • Posts: 235
  • Gender: Male
    • View Profile
Original Fantasy Map Design
« on: February 03, 2008, 03:40:51 PM »
This post is in reference to my project referenced here: http://slickproductions.org/forum/index.php?topic=173.0

I've studied the way maps are stored in FF1, and I'm trying to design the format my own maps will use.  Let me just give a basic rundown.

Each standard map (I haven't looked at the overworld yet) has a tileset.  The tiles are simple 16x16 sprites, and each tile also has two bytes of data that go along with it.  The first byte is a set of flags that determines things like whether or not you can walk on the tile, if you can encounter enemies on the tile, whether it takes you to a shop or another map, treasure, etc.  The other byte is data associated with the previous (which shop to enter, which map to warp to, which treasure, etc.).

So basically, this whole set of information is tied to each tile, and as a result, the "town" tileset, for example, has about 60-70 "door" tiles that all look the same but all link to different shops and inns and what have you.  The advantage of this system is that it's very easy to program; the disadvantage is that it's rather confusing for mapmakers to have to keep track of which tiles are which.

I want to ditch the above system and go with something easier for mapmakers to use.  What would make the most sense?  Do I keep a list in each map of "special" tiles and their functions?  Is there an even better way?

Another thing to note are forced battle tiles.  If I keep these in a list instead of tying the data to the tile, I could make these forced battles occur only once (I might even change most of these to monster-in-a-box-style battles, always thought it was lame that you could skip the battles by clever chest-opening).

Pinkpuff

  • Flan Princess
  • *
  • Posts: 924
  • Find a Megalixir in Unprecedented Crisis!
    • View Profile
Re: Original Fantasy Map Design
« Reply #1 on: February 03, 2008, 07:00:47 PM »
Hackster has a useful function that lets you "highlight" certain tiles in the editor. The tiles appear tinted in the editor but not in the actual game. You can assign your own color scheme to help yourself immediately see auto-fight tiles, which door is which, and so on. You could try doing something like that...
Let's dance!

Dragonsbrethren

  • Forum Overlord
  • *
  • Posts: 1,820
    • View Profile
    • Dragonsbrethren Industries
Re: Original Fantasy Map Design
« Reply #2 on: February 04, 2008, 06:53:06 AM »
I want to ditch the above system and go with something easier for mapmakers to use.  What would make the most sense?  Do I keep a list in each map of "special" tiles and their functions?  Is there an even better way?

Another thing to note are forced battle tiles.  If I keep these in a list instead of tying the data to the tile, I could make these forced battles occur only once (I might even change most of these to monster-in-a-box-style battles, always thought it was lame that you could skip the battles by clever chest-opening).

Perhaps this comes from my background using RPG Maker but it would make a lot more sense to me to store doors and chests as events, rather than having a ton of each, FF1 was very...strange in that regard.

Entroper

  • Moderator
  • *
  • Posts: 235
  • Gender: Male
    • View Profile
Re: Original Fantasy Map Design
« Reply #3 on: February 04, 2008, 11:41:31 AM »
I want to ditch the above system and go with something easier for mapmakers to use.  What would make the most sense?  Do I keep a list in each map of "special" tiles and their functions?  Is there an even better way?

Another thing to note are forced battle tiles.  If I keep these in a list instead of tying the data to the tile, I could make these forced battles occur only once (I might even change most of these to monster-in-a-box-style battles, always thought it was lame that you could skip the battles by clever chest-opening).

Perhaps this comes from my background using RPG Maker but it would make a lot more sense to me to store doors and chests as events, rather than having a ton of each, FF1 was very...strange in that regard.

I like that idea, but it requires me to design the event system before I can implement the map system.

 :hmm:

Entroper

  • Moderator
  • *
  • Posts: 235
  • Gender: Male
    • View Profile
Re: Original Fantasy Map Design
« Reply #4 on: February 04, 2008, 09:10:01 PM »
OK, here's another question.  Say I just use events to handle everything.  Should events be stored in each map file, tied to the map?  That makes sense for chests, fixed battles, and doors, and even for somewhat more complicated events like moving the SLAB with the ROD.  But what if designers want to create longer events (cutscenes) that span multiple maps?  Or what if an event that occurs in one map affects the status of events in other maps?  (For example, defeat Garland, return to the castle, King builds bridge.)  Is it enough to allow events to reference other events by saying, for example, run event 13 in Corneria.map?  That would work, but would it be too user-unfriendly?  I tend to think that storing all events globally would be more user-unfriendly since it makes organization difficult.

I really appreciate your input on this, as clearly there are users here much more experienced in event scripting than myself.

Pinkpuff

  • Flan Princess
  • *
  • Posts: 924
  • Find a Megalixir in Unprecedented Crisis!
    • View Profile
Re: Original Fantasy Map Design
« Reply #5 on: February 05, 2008, 06:25:54 AM »
In RPG maker, the events are tied to the map tiles on which they're triggered. So an event that spans multiple maps would be stored on the tile that triggers it, but would contain teleport commands. So to use the Garland example, you'd have a Garland tile that when you talk to it would trigger an event that looks something like:

* Display a message: "I will knock you all down!"
* Fight Monster Party: Garland

And a Princess Sara tile that when you talk to it would trigger an event like:

* Display a message: "Thank you LIGHT WARRIORS"
* Teleport party: (Coneria Castle, xx, yy)

So while it spans multiple maps, it's stored in the tile that triggers it, regardless of where it takes the party during execution.

Conceptually, I think most events are inherently tied to the map because they're normally triggered by either stepping on a particular tile or examining/talking to it, and which tile triggers which event is important, so I can see how keeping events separate from the map might be confusing for the person making the events trying to keep track of what event index corresponds to what map tile.

However, there are certainly some events that are not tied to tiles on the map. Of particular note would be events that are triggered by using items. The "whistle" item in FF4 for example triggers the Big Chocobo menu, but you can use it anywhere; it's not linked to the map in any way. Similarly, in FF1, using the Bottle to release the Fairy seems to me like it would be awkward to try to link directly to a map.

In terms of storing the files, there could be a separate event file, but the tiles in the map can have pointers to various events. Likewise, certain items such as the bottle could have event pointers. So building the bridge would not run event 13 in Coneria.map, it would simply run event 13 from the event file.

As far as being user-friendly, I don't imagine it being too bad as long as you can launch the event editor from the map editor (or item editor or whatever other entities trigger events).
Let's dance!

Entroper

  • Moderator
  • *
  • Posts: 235
  • Gender: Male
    • View Profile
Re: Original Fantasy Map Design
« Reply #6 on: February 05, 2008, 12:59:17 PM »
Yeah, it sounds like each map will have its own events, and there will be global events in another file.

Are there event-related global variables in FF1?  It seems like most event triggers are done through items, like checking whether you have the LUTE or the ROD, etc.  The only global variables I can think of are the orbs.

At any rate, I think I'll allow integer variables to be associated with maps, and you can refer to them with namespaces.  Something like TowerOfBabil.SupercannonDestroyed = 1 or Global.EarthOrbRestored = 1 (just examples).

I think I've got enough of a handle on this to start looking into dumping the map data from the ROM into a new format.

Pinkpuff

  • Flan Princess
  • *
  • Posts: 924
  • Find a Megalixir in Unprecedented Crisis!
    • View Profile
Re: Original Fantasy Map Design
« Reply #7 on: February 05, 2008, 03:27:16 PM »
Whether or not the party has class-changed is probably a global variable/switch.

Also, although the Canoe appears in your inventory as an item, I've discovered through hacking that simply having the Canoe in your inventory is not enough to be able to traverse rivers. It seems that the "get canoe" event must also set a switch of some kind.
Let's dance!

Entroper

  • Moderator
  • *
  • Posts: 235
  • Gender: Male
    • View Profile
Re: Original Fantasy Map Design
« Reply #8 on: February 05, 2008, 03:47:02 PM »
Cool beans.  Overworld.CanoeObtained = 1.

I think I'm getting this hammered out pretty well now.  :)  I'm into the details of how to save and load the event and variable states in a save file, and how to manage the system in memory during the game.

Entroper

  • Moderator
  • *
  • Posts: 235
  • Gender: Male
    • View Profile
Re: Original Fantasy Map Design
« Reply #9 on: February 06, 2008, 08:22:27 PM »
Next question: Store "regular" and "overworld" maps in the same format or separately?

There are two major differences between the overworld in FF1 and the rest of the maps.  The first difference is that the overworld stores additional flags for things like land fight, river fight, ocean fight, landing your airship, docking your ship, using your canoe, etc, and does NOT have any treasure chests or NPCs.  The second major difference is in enemy domains: regular maps have only one "domain" listing which monster parties you can fight and their respective probabilities.  The overworld is divided into 64 sections, each with its own domain.  I would really prefer to have a unified map system (who says you can't canoe around in an underground lake in a cave, and meet NPCs and find treasure all on the same map?), but I'm scratching my head trying to find the sweet spot of making domains powerful but not complicated.

Pinkpuff

  • Flan Princess
  • *
  • Posts: 924
  • Find a Megalixir in Unprecedented Crisis!
    • View Profile
Re: Original Fantasy Map Design
« Reply #10 on: February 07, 2008, 09:20:28 PM »
Well if you want people to be able to use your program to create something like Dawn of Souls, you'd need to allow canoe-ing and airship-ing inside dungeons.

Is there any reason you couldn't have a unified map system that can create overworlds and dungeons alike?
Let's dance!

Entroper

  • Moderator
  • *
  • Posts: 235
  • Gender: Male
    • View Profile
Re: Original Fantasy Map Design
« Reply #11 on: February 07, 2008, 09:34:43 PM »
Well that's what I'd like, just trying to figure out the monster domains thing.

Pinkpuff

  • Flan Princess
  • *
  • Posts: 924
  • Find a Megalixir in Unprecedented Crisis!
    • View Profile
Re: Original Fantasy Map Design
« Reply #12 on: February 08, 2008, 07:20:08 AM »
Well I guess for each map you could have a list of "zones" each of which would contain:

* A set of co-ordinates indicating its borders
* A list of monster groups that you could encounter if you run into a random fight in that zone

The overworld would have 64 of such zones of equal size while most dungeons would have one per floor.

Whenever the player triggers a random encounter, check to see which of the current map's zones the player is in, then go to that zone's random encounter list and pick a fight accordingly.
Let's dance!

Entroper

  • Moderator
  • *
  • Posts: 235
  • Gender: Male
    • View Profile
Re: Original Fantasy Map Design
« Reply #13 on: February 08, 2008, 02:07:15 PM »
Would it be worth it to implement a "paint by numbers" scheme, where you can assign arbitrary domains (not necessarily rectangular)?

EDIT: Don't worry, I wouldn't get rid of PNEOP.  ;)

Pinkpuff

  • Flan Princess
  • *
  • Posts: 924
  • Find a Megalixir in Unprecedented Crisis!
    • View Profile
Re: Original Fantasy Map Design
« Reply #14 on: February 08, 2008, 03:34:25 PM »
Quote
Don't worry, I wouldn't get rid of PNEOP.  ;)

Of course not. It's not a bug, it's a feature!

As for the paint by numbers scheme I assume you mean assigning each tile its own pointer to one of the domains. I see no reason why you couldn't do that... it just might be more annoying to edit that way. It would certainly have an advantage in a situation where you wanted something like an oddly-shaped desert where you fight a hard monster or something. Something like that could in theory be done with the rectangular zones scheme but it might be a bit of a chore, although I think that most of the time, the zones will probably be rectangular (or could easily be made rectangular without causing many problems) and to have to assign each tile a monster domain may be annoying for large maps.

That's just my initial impression though. I'm sure whatever you decide will be just fine.
Let's dance!