Saturday, November 30, 2013

001 - Mapping

We've seen a little about the resources that are available in 001—and some minor issues with them. Now it's time to get more into what we can do with them. Specifically, let's get into the mapping.

A nice forested inlet, but beware of snakes.
Mapping can be time-consuming, but it may be my favorite part of creating a game. I enjoy building the game world, putting in secrets to find and scenery to see, trying to make an interesting and evocative environment. Of course, how much I enjoy mapping depends to some degree on how the mapping is implemented in a particular program.
In 001, the basic functionality of the mapping is similar to that of many similar tile-based game creation programs. Click on a particular tile from a menu to select it, and then click on the map to lay down that tile. I'll have to get more into my chronological crawl before I can say with any level of confidence what was the first game creation system to do this, but it dates at least back to 1984's Adventure Construction Set, making it about three decades old, and many other game creation systems have followed suit since. It's become pretty much the standard way for such systems to work, in fact, common to full-fledged game creation systems, to level editors, and even to map creation utility Tiled.

A partly finished map I happened to have in Tiled for a game that may never be done.

Of course, there's a reason it's become so widespread; all tile-based game creation systems have similar goals they're trying to fill, after all, and this seems the most natural way to do it. Certainly other methods are possible; the Lode Runner level editor, for instance, had hotkeys to select the next tile to be placed, with the legend arranged at the bottom of the screen. While this may work when there are only ten different tiles, however, it would be clearly unworkable for the dozens or hundreds of tiles in more detailed systems. Still other methods are conceivable, but perhaps none as direct or as intuitive as the tile-menu method. It's not even necessarily the case that the makers of the different systems have copied each other... the basic mechanism is simple enough that it could easily have been reinvented independently multiple times.

However, there are, of course, variations in how the system is implemented. ACS took the user to a different screen for the tile selection, as more recently did DinkEdit, while Tiled and Knytt Stories, for example, have the tiles arrayed at the bottom left. 001, like RPG Maker, has the menu over to the side, and perhaps goes RPG Maker one better by having numerous submenus the tiles can be selected from.

This would be the "Furniture 2" tileset
A more significant variation than the mere placement of the menus is that many game creation systems have implemented methods of laying down more than one tile at once. 001 is not remiss in this regard, having tools for laying down tiles in lines or in hollow or filled rectangles or ellipses (the tooltip names "Circle" and "Filled Circle" notwithstanding), and for floodfilling areas with a given tile. As with RPG Maker, it's also possible to select a block of adjacent tiles from the menu and lay them down at once, handy for large features that take up multiple tiles. Tiles can also be flipped vertically or horizontally, which is nice for adding a bit of variation to a map. And the basic ground tiles have an "Terraformation" feature to make them merge elegantly into other such tiles. Again, this is something that many other game creation programs have done, including RPG Maker (where it's called "Autotile"), Blades of Exile, and, with 3D tiles, Neverwinter Nights. But it's a nice feature to have... when it works.

Unfortunately, in 001, it doesn't always work. It's fine as long as tiles of no more than two different types meet at one corner, but a corner with three (or four) different tiles ends up with ugly discontinuities. It might seem, then, that one should just avoid having more than two different types of tile meeting at a corner, but there are times when it's really desirable to do so—for instance, as it is, you can't have a river or pond bordered by more than one kind of tile without running into problems; if the river's shore is all (one kind of) grass or all (one kind of) dirt, you're fine, but you can't mix them without unsightly sharp boundaries.

How many bad transitions between tiles can you see?  (Okay, I don't recommend you actually count them.)

On the one hand, yes, one could argue that it would be unrealistic to expect tileset creators to anticipate every possible combination of three or four tiles meeting at a corner. By my (quick and possibly inaccurate) calculation, not counting rotations or reflections, for seven different ground tiles there would be 406 different corner possibilities. (And honestly, maybe we should count rotations and reflections, since they may require separate tiles. That bumps up the number to a hefty 2,401.) Still, there are ways to implement more boundary possibilities without manually creating each necessary tile. At least some versions of RPG Maker, for instance, do something like keeping one tile as a baseline and overlaying other autotiles over that, so that if they meet at a corner there'll be a smooth fringe of the baseline tile between them rather than a straight boundary. That means all it needs to do is ensure a smooth transition between each autotile type and the baseline, rather than any two arbitrary autotiles. Furthermore, both Blades of Exile and recent versions of RPG Maker allow the user to override the autotiling if desired and pick an arbitrary tile out of all the possible autotile possibilities, a feature that can come in handy if the user wants to have a particular boundary work differently in one place from how it usually does.

Actually, for a moment I thought there may be a feature like RPG Maker's autotile overlay method in 001 after all. The "Tile Transformation" window (accessed by selecting "Tile-Sets" from the "Resources" menu, choosing on a tile with "Terraformation Graphics" set, and and then double-clicking one of said graphics) includes a "Style" dropdown, with the options "Absolute", "Overlay Inside", and "Overlay Outside". However, these selections don't seem to make 001's Terraformation work like RPG Maker's autotiling after all. In fact, as far as I can tell, these selections don't do anything at all. Nor is there any hint as to their function in the documentation, and this time even a search on the 001 Forum was of little help. I'm sure they do something, but figuring out exactly what will require further experimentation (and/or posting on the 001 Forum to ask, I suppose), and that can wait till I get to making my own tilesets.
Yeah, I'll figure out how this window works later.

Incidentally, though, and this isn't a complaint unique to 001, why hasn't anyone (at least in any game creation program I've looked at so far) implemented a sort of autotiling/terraformation that works with cliffs? Both RPG Maker and 001 have cliff tiles, and in both programs the cliff tiles have to be placed one by one, making them rather tedious to map. Surely it would be possible to streamline this process.

As it turns out, though, even aside from the Terraformation issue, cliff tiles were to play a major role in my learning about 001's mapping features. I thought a more varied terrain with different elevations would be more interesting than having the maps all flat, so I made rather liberal use of cliffs when laying out my maps. (And, incidentally, given the combination of rivers and cliffs on my map, I've wished the tileset included waterfall tiles. For now, I'm just putting all the rivers at "sea level", but I may decide to add some waterfall tiles when it comes to customizing the tileset. But anyway, that's a resource issue, not a tileset issue.) But at one point laying out the map to the starting area of my game, I realized I'd left rather too little room for an inn at the bottom of the map south of some cliffs, and that if I wanted to make more space to enlarge the inn the only way to do it would be to move the cliffs north. And then I realized to my dismay that the only way to do this would be to reconstruct the cliffs there, tile by tile. There was no apparent way of selecting parts of the map and copying and pasting them. This is a feature that some other game creation programs do have (RPG Maker, for instance, and I know I keep mentioning RPG Maker but it's because it's one of the best known and most used game creation programs so it's a good baseline for comparison), and it's one that's sorely missed here; it would have saved me a lot of work.

The old inn, before the cliff was moved.  Looks cramped, doesn't it?
I say there was no apparent way of selecting parts of the map because it's hard to know just what features 001 does have, given its horribly meager documentation. There's an odd glitch with the documentation from the Help menu in that the initial Home page that first comes up is apparently copied from the front page of the online 001 wiki—but the links weren't updated to go to the proper Help pages, so none of the links from the main Help page work. Selecting the appropriate topic from the menu on the left, however, works just fine.

This does not strike me as particularly helpful.

I praised 001 before for having its documentation available in a Help file in the program, but the truth us that I really prefer to refer to help documents in PDF format. I know not everyone may share that preference, though, and maybe the ideal situation would be to have both an in-program help menu and PDF documentation, and having online help in addition to both of these certainly wouldn't hurt. In 001's case, though, the format of the documentation isn't so much of an issue as its complete inadequacy; there's just not much there. The documentation gives a very brief summary of each tool and menu option, but it explains nothing in depth, and there are many program features that are explained very poorly, or not at all. There are other support resources available, most notably the aforementioned 001 forums, but overall 001 just is not a well documented program. Which is a pity, because I've found some very interesting features here, and there may be more possibilities to the program that I'm not yet seeing.

(Should I have made a separate post about the documentation? Possibly. I don't know that I have enough to say about to warrant a full post, though; I think what I've said above will do for now.)

With regard to the copying and pasting issue, I honestly don't think that's a documentation issue, though. If there were a way of selecting multiple tiles on the map, I would expect it to be among the buttons to the right of the tile menu, and it just doesn't seem to be there, or anywhere else I looked. The second issue that I discovered through the cliffs, however, is a different matter; it's a feature that the game does have that I didn't know it had, or at least didn't really understand, and it definitely should have been better documented. I refer, now, to layers.

That such a thing as layers even exists in the game is not immediately obvious. There is, however, a button in the Display toolbar with tooltip text of "Visualize Layers". Furthermore, the "View" menu includes the options "Move Up Layer" and "Move Down Layer". So... apparently it's possible to lay tiles on multiple layers. But what do the layers actually do?

001 isn't the only tile-based game creation system to have multiple layers, of course. RPG Maker does, too, as does Tiled, for that matter. And so my first assumption, naturally, was that 001's layers worked the same as RPG Maker's. In RPG Maker, layers are essentially just a way of putting more than one tile in one space. Now, in 001, there are already separate "Floors", "Lower Objects", and "Upper Objects" that can share spaces, which already fulfills much of the purpose of layers in RPG Maker, but I thought maybe with layers I could put, say, one "Lower Object" in front of another, in case I wanted, for example, one cliff behind another. I've done similar things with the layers of RPG Maker in the past.
All the brighter areas are in the middle layer (of three).

A bit of playing around with layers in 001, though, appeared to indicate that this wasn't what they were for here at all. Objects on higher layers seemed to have odd effects on blocking movement, and cast strangely displaced shadows. When I figured out what was really going on, though, everything fell into place. Unlike the layers of an RPG Maker map, the layers of a map in 001 really were vertically displaced in the game's physics. In fact, it's possible to jump from a lower to a higher layer, or to fall from a higher to a lower.

At first glance these three bushes look like they're arranged in a horizontal line, but look closely at the shadows.

The Map Properties window (right-click on a particular map in the Maps menu in the lower left, then select "Properties..." from the ensuing pop-up menu) has settings for not only the Width and Height of the map, but also its Depth—number of layers. Most objects are placed on only one layer, but walls are an exception; a wall exists in several layers at once. As a matter of fact, it's possible to control how high the walls are—and thus how many layers they take up—through a slider control next to the wall tile menu. The default is two, but the walls can go up to ten layers high—assuming the depth of the map they're on is set high enough to accommodate them. (This brings up, again, the question of why there's no such Terraformation of the cliff tiles; surely they could have been implemented in a similar way to the walls?)

I don't plan on leaving these walls in the final version of my game...

This fit in, too, with something else I'd been wondering about. Another of the settings in the Map Properties window is "View", which is set by default to "Standard 45°". I hadn't been sure what this meant, but now it made sense. With this setting, the maps are seen in a sort of a birds'-eye view orthographic projection, with the projection lines directed downward at an angle of 45° and perpendicular to the direction of one edge of the tiles. (Is there a name for this projection? (It's not isometric; that involves the projections of the tile edges being at 120° angles, like in Sid Meier's Civilization II or III, SimCity 2000,StarCraft, Roller Coaster Tycoon, or the Avernum games, among many others.) I couldn't find one, but there should be; it's a very common projection in computer games, used in many JRPGs.) In this setting, objects on an upper layer are displaced one tile upward, appearing visually directly before objects just to the "north" on the next layer down. In contrast, in "Top" mode, objects on different layers are simply directly superimposed—though this mode is clearly not intended for use with the default "Action-RPG (Pro)" tileset. There are four other view modes, but "Front" is presumably intended primarily for platformers, and "Side", "3D Isometric", and "3D Perspective" are premium features available only for subscribers. (I haven't ruled out becoming a subscriber—heck, I probably eventually will—but I'm not currently.)

Top and bottom: The same section of the map in "Standard 45°" and "Top" views, respectively.

It's especially unfortunate that this feature is so poorly documented (in fact, pretty much undocumented... there are a few vague references to layers in the documentation, but none that come anywhere close to explaining how they work), because this is actually a really neat feature, and in fact so far of all 001's features I've found it's the one that most sets it apart from other game creation systems. It's possible to sort of fake having multiple layers on RPG Maker and similar programs, but it's not really built into the system, and even having something as simple as a bridge the player can go over or under involves multiple Events and some messy kludgework. Actually having multiple physical layers to the map opens up some great possibilities.

Each of those squares is an "Event", and all those Events are there just so that the player can walk both over and behind cliffs in two spots.

I really wish, though, that I'd discovered this feature before putting so many cliffs in my maps... because, of course, the cliffs also should go on multiple layers, and, not knowing how layers worked when I first put them there, I now have to redo them all. Yeah, so those cliffs in the starting map that I laboriously rebuilt so I could move them farther north and make room for the inn? Well, I'm going to have to laboriously rebuild them again so I can put them properly on different layers. For that matter, since the inn itself is on an elevated area, I'm going to have to rebuild it too. Along with everything else that I put up "above" any cliffs or elevation changes. Aargh.

I kinda like this plateau, but it's going to have to be completely redone.  Dagnabbit.

It wouldn't be quite so bad—it would still be bad, but not quite so bad—if moving between layers were quicker. As it is, though, the only way to move between layers is the rather inconvenient method of selecting "Move Up Layer" or "Move Down Layer" from the View menu. At least, that's the only way I know of; maybe there are hotkeys for it, but if so they're undocumented, like so much else about the program. If there aren'thotkeys for it, there really, really should be. Hotkeys (especially for moving between layers!) rank up with selecting, copying, and pasting parts of the map as one of the features so far that most stand out as being missing from this system.

The map of the starting area so far—there's lots still to be done, but progress is being made.

Anyway, I think this may be the last post on 001 for a while. Not that I won't continue working with it, but what I've got ahead of me now is a lot of mapping (and re-mapping, given the layer issue) that isn't likely to generate anything new to post about. I will be posting again about 001, of course, when I get done with the mapping for now and am ready to move on to the next stage, or when I run into something else concerning the mapping that's worth writing about, but for now expect the next few posts to deal with Eamon again. See you... hopefully before next Saturday.


  1. Is there a wiki or something like that for 001? It could be that the ingame documentation is bad, but there is a good fan or official wiki.

    1. There's a wiki, but it basically has the same content as the in-game Help, and is equally inadequate. So far I've found that the best source of information on how 001 works seems to be the forum; often something I'm trying to figure out has already been asked about by someone else (and thereafter answered by a third party). With regard to figuring out the meaning of the Style setting of the Terraformation, though, even the forum let me down... though I'm pretty sure if I actually made a post on the forum myself asking about it, someone would answer and explain it.