Back to the Korax Forum Archives


Forum

Travel map concept

Thu, 06 Sep 2007 15:14:34

RambOrc

Before I include it in the concept document, I wanted to run by you the way the travel map would work, so you can offer suggestions/feedback. AFAIK base resolution for Vavoom is 640x480, so the map would be 640x480 pixels. It'd consist of 40x30 squares (16x16 pixels each). The squares are not visible, they are there for design and computation purposes only (the map picture is one single 640x480 image). There can be only one location in a square (a location is a Hexen hub, consisting of one or several levels). If during travel on the travel map you reach a square that contains a location, you are automatically entering that location (i.e. you are back in the 3D FPS world). Locations can have one or several exits that lead back to the travel map (they are always marked by a pole with a number of road signs on it pointing into several directions). If you try to leave a hub, a y/n question will pop up in the game to ask you whether you want to enter the travel map. There are two types of travel: "head for a destination" and "explore". In "head for a destination" mode, you select a known object on the map (mostly the villages and town(s) that are all inhabited by humans and are interconnected by roads or riverboat routes) and the game will take you there, showing your progress on the travel map until you reach a location, at which point a popup will ask you whether you'd like to enter the location. In "explore" mode, you travel square by square using the numpad for the 8 directions. Once you discover a new location, it'll be added to the map for the current game (stored in the savegames, i.e. if you start a new game the travel map goes blank again) and you can use the "head for a destination" mode in the future to revisit it. In standard mode, nothing happens between locations on the road. In enhanced RPG mode, random encounters and events occur during travel, e.g. you are being attacked by a marauding band of centaurs (the game throws you into a small 3D map where you fight a bunch of centaurs and you can only proceed with your travel on the travel map if you kill them all and survive). Visually, the travel indicator is a 4 pixels wide red line that starts in the center of a square and goes to the center of the next square. The travel indicator line can hop from one square's center to that of the next square directly or diagonally connected. In the case where diagonal and straight lines meet, there will be a specific bitmap used to make it look a bit more rounded (like a curve). This brings the number of bitmaps needed to 16 (2 types of straight lines, 2 types of diagonal lines, 4 types of rounded edges and 8 for types of slightly rounded start and end points), unless these lines can be dynamically drawn with the engine (which would be better). Crimson if you could start working along on a prototype it'd be great (ignore the visuals for the moment, just use <!-- m --><a class="postlink" href="http://www.korax-heritage.com/images/history/koraxmap_v1.jpg">http://www.korax-heritage.com/images/hi ... map_v1.jpg</a><!-- m --> as a simple background map and create only a simple travel indicator).
Thu, 06 Sep 2007 15:23:55

Crimson Wizard

First of all, I didn't understand why you are going to stick to base Vavoom screen resolution, since, if needed, we may make map scroll if it doesn't fit on screen. Besides, map may consist of several bitmaps, tiled. Then, I am not sure bitmaps are the best way to draw travel indicator, IMO it can be done by simple pixel paint (or vector graphics). In whole, this concept looks good, though it's a bit more complex than I thought it would be. I had a guess that it will be more similar to Baldur's Gate than RoA/Das Schwarze Auge, i.e. there won't be any travel indicator, and important locations will be indicated by some graphics, like town, castle, village etc, while player orders his character to go to some place by clicking on them by mouse.
Thu, 06 Sep 2007 15:26:23

RambOrc

I like the RoA/DSA travel system a lot so if you can code something like that, I'm all for it. <!-- s;) --><img src="{SMILIES_PATH}/icon_wink.gif" alt=";)" title="Wink" /><!-- s;) --> The basic difference is that at any crossroads you have to choose one of the directions from the popup and you'll continue traveling into that direction. As for the "heading to a destination" mode, it might not be necessary at all if the game world is not that big. Also, we could add a boat and a coach service to some towns and villages, you talk to the driver and you are at the other town without any manual travelling. And generally, if I lay down something that's technically cumbersome/not necessary, just replace it by what's the best method ofc.
Thu, 06 Sep 2007 19:51:42

The 4th Class

[quote="Rambo":2jsa51p9]In "explore" mode, you travel square by square using the numpad for the 8 directions. Once you discover a new location, it'll be added to the map for the current game (stored in the savegames, i.e. if you start a new game the travel map goes blank again) and you can use the "head for a destination" mode in the future to revisit it. In standard mode, nothing happens between locations on the road. In enhanced RPG mode, random encounters and events occur during travel, e.g. you are being attacked by a marauding band of centaurs (the game throws you into a small 3D map where you fight a bunch of centaurs and you can only proceed with your travel on the travel map if you kill them all and survive). It'd be cool if not everything is directly accessible in the exploration mode. Example: You cannot cross a mountain range, unless you equip a wings of wrath and you can fly over them to reveal a hidden dungeon. Also, maybe to make the exploration process a bit more exciting, how about the higher level your char is, the better you are at being able to reveal something? Say, a level 1 char could only find the most obvious stuff, like a new town or the destination he has to go to. But, a level 10 char could be able to find a secret dungeon with some likelihood, whereas a level 20 char would find that same secret dungeon instantly. (basically, random chance improves as stats go up).
Tue, 11 Sep 2007 14:25:25

RambOrc

How does it look in the meantime Crimson?
Tue, 11 Sep 2007 15:40:16

Crimson Wizard

Er, I suppose that means "what's the progress"? Currently I am investigating how the map transition works. Perhaps there will be some results in following couple of days.
Tue, 11 Sep 2007 15:55:08

RambOrc

After thinking about the travel map system, I'd much more prefer the DSA/Realms of Arkania type of traveling if possible. There are (invisible) predefined routes you can travel along, and at every intersection you are asked into which of the available direction you'd like to turn. If you reach a location, you get a popup telling you you are about to enter this and that location and once you click/hit OK on it you are in the location (the Hexen maps).
Tue, 11 Sep 2007 16:04:18

Crimson Wizard

I suppose we'll need a script for that, which would support syntaxis like: <roads> <path> 10,10;20,20;30,30;45,57 .... </path> <path> </path> </roads> <object> pic = ... pos = ... map = ... </object>
Tue, 11 Sep 2007 17:08:12

Firebrand

What do those numbers mean?
Tue, 11 Sep 2007 17:22:26

RambOrc

I'd assume those are the X and Y coordinates of the waypoints that define the path.
Fri, 14 Sep 2007 11:11:43

Crimson Wizard

I decided to answer here - [quote="RambOrc":1o2e6qzc]OTOH if you say moving a sprite around on the map is easy and the DSA/Arcania style of travel map is complicated to code and to create (positioning items, defining routes etc), we could leave it at the sprite version for the moment, just tell me for what kind of system I should design the overview map (16x16 pixel squares or something else). I am not saying coding all that stuff is terribly difficult, it will just take some time. At this point it is possible to define routes and objects in code, two features are still missing - 1) player still won't use routes, 2) parser to read map data lump. Since second is more important at current stage, I'll do that next. Now, as for overall map system, I think it's an area where coding go after design and not vice versa. IMO there are no strict limitations for this, it can be either built of multiple tiny tiles, or using one huge pic. (IIRC original Hexen had limitation for image size (320x240), I am not sure about Vavoom though.) If you ask my opinion on this, I'd prefer to make map of several big pieces (let's say 128x128 or 256x256 or so). As I mentioned earlier, we do not have a need to fit everything in 640x480 screen, since it's not difficult to make scrolling map if needed. Then, ofcourse, we need pics for player-the-traveller, and the pics for map objects. Ah, yes, and the pics for arrows, which should be shown on road junctions, but that's low priority. By the way, I suppose that any map objects could be animated if wanted.
Fri, 14 Sep 2007 11:27:45

RambOrc

Actually I plan the map to be a static image like in <!-- m --><a class="postlink" href="http://downloads.orcishweb.com/koraxdev/ramborc/dsamap.jpg">http://downloads.orcishweb.com/koraxdev ... dsamap.jpg</a><!-- m --> , the only animation on it would be the red curving line showing your progress from the last location you left when entering the travel map. In most cases, travel would be along roads and paths already drawn on the map, in a couple of cases you'd reach an intersection when there is none indicated on the map, these would be the paths that lead to dungeons far away from anything. If you reach a location on the travel map, you must enter it. Most locations have more than one exit to the travel map, depending on which one you choose you end up facing a different direction from a location, i.e. if a location has a road leading east and west and you come from the west, you enter the location at the western exit and you need to traverse the location in 3D - in many cases, fight through it - to reach the exit on the eastern end if you want to continue eastward beyond this location.
Fri, 14 Sep 2007 11:33:53

Crimson Wizard

I see. Well, how map entrances will be drawn there - simply like common markers with a name or by custom pics?
Fri, 14 Sep 2007 11:40:38

RambOrc

If you mean on the travel map, there are none - you just travel along a road and when you reach a location, a popup notifies you and after clicking OK on it you are transferred to the 3D engine part of the game. Some locations like cities are clearly indicated on the map so you know where you'll arrive, other locations you have to know where to look for them, from e.g. descriptions in a book found in the library (turn right then twice left on the mountain path).
Fri, 14 Sep 2007 17:32:39

Crimson Wizard

We will probably have to create new line special for "Exit to Travel map". Only way I found to trigger Travel map properly is to substitute Intermission with it; intermission can still be available, but it should be triggered elsewise somehow. (In vavoom intermission is called everytime map is left, it only skips hub text if it is not needed). But it is not a good idea to use some predefined map value for TravelMap (e.g. TeleportNewMap (99, 0, 0) ), I think. So, it is better to use a new line special.
Mon, 17 Sep 2007 13:35:25

Crimson Wizard

Code for Travel map is not ready yet, though, I think, you may alredy begin planning map data. Here's syntax: <r></r> -road <m></m> - map entry road is defined as a number of linked road points: <r>(x,y,a,c)(...)(...)...</r> x,y - road point position a - is this point active (visible) initially (0 or 1) c - colour (optional, 0xRRGGBB); default is white I think. To make road junctions simply make the road point of road 1 have same coordinates as rp of road 2. map entries: <m>x,y,a,mapId,spawnpos,pic,message</m> x,y, - position a - if this entry is active (visible) initially (0 or 1) mapId - I think this should be equal to warp index spawnpos - position to spawn player at pic - (optional) graphic which represents map entry (name of graphic lump); default is '' (empty name). message (optional) - a text description shown when player is about to enter this map; default is "". Map entries should have same coordinates as one of the road points to be accessible.
Mon, 17 Sep 2007 16:35:46

RambOrc

Basic question, if I don't want a road section between two crossroads or entry points to be a straight line, do I need to add a bunch of road points? For a simple curve, that might mean like a dozen road points between two crossroads that are only 20 pixels or so away from each other.
Mon, 17 Sep 2007 17:09:10

Crimson Wizard

I was thinking about curves, and have one idea, but I just didn't think this will be important on first stages. Idea is to add extra parameter, "curve" to a road point description, that would define curve factor for a road segment between this point and the next one in the road list (if it exists). Basically, "curve" value should be a relation between length of vector from point1 to point2 and length of normal build from this vector's central point to the curve maximal offset. Well, I hope I my explaination is understandable. <!-- s;) --><img src="{SMILIES_PATH}/icon_wink.gif" alt=";)" title="Wink" /><!-- s;) --> For example, if one wishes a curve which would form a semicircle. In that case "curve" parameter should be 0.5. So, road point definition should look like this: (x,y,a,curve,colour) This still would require a number of road points, if you wish to make a complex path. Maybe there are better ideas for that?
Mon, 17 Sep 2007 20:39:46

RambOrc

Sounds good, though the difficulty will be to make these align with the paths drawn on the map.
Tue, 18 Sep 2007 08:42:18

Crimson Wizard

I have an alternative variant in mind, which is totally different, though requires use of stand-alone tool to compile map data. Assuming you use advanced graphical editor to draw map, the one that allows to create layers, you may paint map background on one layer and paths on another. Then, if you save layer with paths as a common bitmap with plain background, it may be analysed by the tool mentioned (since we know background color, all other pixels are roads). Ofcourse some extra specifications should be made to easen analysis process, pointing out road starts and ends for example. This may be done by predefined color (e.g. red pixels) or in extra data file with coordinates. Road data then may be stored as a long list of directions "where road goes next". Since we know starting position of a path, each next pixel may be described as -1,0,+1 (along both axes). Hmm, wow <!-- s:roll: --><img src="{SMILIES_PATH}/icon_rolleyes.gif" alt=":roll:" title="Rolling Eyes" /><!-- s:roll: --> This will take more time to code, ofcourse. If you'd prefer this one, I suggest we leave map without roads for awhile, since map entries could be placed with more ease and player could be allowed to move freely on map using cursor keys.
Tue, 18 Sep 2007 12:30:57

RambOrc

Of course I'm using layers in the image. Yesterday I set one layer for the background, i.e. the foliage, mountains and rivers, one layer for roads, another layer for roadpoints that define the roads (this layer would contain a copy of the full roads now with a different color I guess) and one layer for map entries so any data can be quickly extracted.
Tue, 18 Sep 2007 14:43:53

Firebrand

Conceptually speaking, the second variant of the travel map concept sounds more interesting, using layers will make things look A LOT better, since maps can be a bit more detailed IMO, showing the road, for example in more colors than just a red line <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->. But code wise it sounds a bit more complex, I don't know how much you've planned on it, but for me it sounds like it's going to take some time, since it'll need methods to "scan" the whole image layers to determine which parts are going to be drawn and which won't, but if you have already started these, it's OK, we could start coding something simpler and then enhance it as we can IMO.
Tue, 18 Sep 2007 15:11:50

Crimson Wizard

Firebrand, you have totaly misunderstood what I was speaking about <!-- s;) --><img src="{SMILIES_PATH}/icon_wink.gif" alt=";)" title="Wink" /><!-- s;) --> I am not going to write a tool to descript multi-layered image format or such, I was saying about saving roads layer into separate common bitmap to analyse IT. And I am pretty sure we will use single-layer map image in game with all layers merged. (I doubt Vavoom supports drawing multi-layered formats)
Tue, 18 Sep 2007 15:49:22

RambOrc

Exactly, the map will be a static bitmap with only a red line being drawn on it when traveling, else no animation. Oh yes I can use any 256 colors bitmap, not just the Hexen palette, right? If yes, what about the popup windows when you enter a crossroads or location, do they have to be part of the same 256 colors palette?
Tue, 18 Sep 2007 16:27:26

Crimson Wizard

RambOrc, IIRC you may use true color as well since Vavoom does not uses 256 color palettes.
Tue, 18 Sep 2007 17:35:59

Firebrand

But the image format would have to be PNG AFAIK, but it's not any problem, right? <!-- s:wink: --><img src="{SMILIES_PATH}/icon_wink.gif" alt=":wink:" title="Wink" /><!-- s:wink: --> Now I understand what you mean with this, sorry <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->. Sounds better.
Tue, 18 Sep 2007 18:53:52

RambOrc

I'm using PNG for the image but I can export it into any other format if needed, just tell me what format you want it in.
Tue, 18 Sep 2007 20:39:54

Firebrand

Let's try it in PNG format then <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->. If the format needs to be changed it's going to be pretty easy then.
Mon, 24 Sep 2007 13:07:08

Crimson Wizard

So, can you show use your map, RambOrc?
Mon, 24 Sep 2007 13:53:16

RambOrc

Picture only or do you need coords too?
Mon, 24 Sep 2007 14:15:47

Crimson Wizard

Picture <!-- s;) --><img src="{SMILIES_PATH}/icon_wink.gif" alt=";)" title="Wink" /><!-- s;) --> As for coords. As I said, I think we should forget about road coords for a while, then, there probably should be different syntax for map entries. I came to thought that it'd be better if compiled road data is put in separate file, so map entries will have their own file. This allows to use syntax, similar to mapinfo's one. E.g: entry x,y warp 1 spawnpos 0 active 1 pic 'mypic' info "A gloomy dungeon awaits you ahead..." <!-- s;) --><img src="{SMILIES_PATH}/icon_wink.gif" alt=";)" title="Wink" /><!-- s;) -->
Mon, 24 Sep 2007 22:36:08

RambOrc

I'm still testing things, I want to come up with objects first that can be multiplied easily (like a mountain object that can be multiplied to create a mountain range).
Tue, 25 Sep 2007 09:28:12

Crimson Wizard

You mean, to draw it on map picture?
Tue, 25 Sep 2007 10:05:36

RambOrc

I use Macromedia Fireworks which is object oriented, meaning if I draw a little mountain I can define it as an object and then copy and paste it any number of times, and modify the size or proportions of each new mountain object separately, then move them around to create a mountain range that consists of a bunch of small mountains that are all a bit different. And I can modify any one of them any time in the future since they are all objects.
Tue, 25 Sep 2007 11:25:23

Crimson Wizard

Ah, Fireworks, I had acquiantance with it once. I remember it also allows to apply different effects on custom object like emboss, shadow etc. Used it to draw several images with subtle 3d look <!-- s;) --><img src="{SMILIES_PATH}/icon_wink.gif" alt=";)" title="Wink" /><!-- s;) -->
Tue, 25 Sep 2007 12:46:46

RambOrc

Yep, though once you apply certain advanced filters, it flattens the object into a bitmap. Not so good if it contained vectors.
Tue, 25 Sep 2007 15:27:40

Firebrand

Almost any good picture editor can do that now, even save the picture with layers if you need it <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->. It sounds interesting to use this kind of drawing method, because if there's something that might be changed it's just a matter of changing coordinates in the map files.
Mon, 08 Oct 2007 14:23:01

RambOrc

Quick update, still working on it, not really happy with the current version.
Thu, 03 Jan 2008 16:10:57

Crimson Wizard

Ok, I succeded in writing a simple tool for generating map data from a plain bitmap. It assumes that bitmap should have only 3 colors used on it (bitmap can be any color depth except monochrome, what I mean is only 3 colours used): background = white common road = black road starts/ends and crossroads (joints) = red (255,0,0) Tool writes a binary file wich stores number of roads and exact paths using same method as I explained earlier above: each road has a start determined by X,Y coordinates, followed path is written as X&Y deltas (-1,0,+1). Actually, now I need only a support for reading binary lumps in Vavoom progs to implement these roads in game (I can convert them to text and parse like text, but I don't like the idea, mainly because this will increase data size). Meanwhile I'll be enhancing the "tool" to make it edit map entries data as well (stored as a separate file).
Thu, 03 Jan 2008 17:35:40

Firebrand

Vavoom now has a ParseScript (or something like that) class that can read any kind of text lumps easily <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->, it might come handy when designing this concept IMO.
Sun, 06 Jan 2008 21:06:49

RambOrc

Sounds good, I have been tweaking the graphics a bit more but I am still very unhappy with the results (why isn't one of the artists working on this thing?).
Mon, 07 Jan 2008 09:02:25

Crimson Wizard

Maybe you draw it simplified for the first time, so we could have something to remind how our game world should look like.
Sat, 22 Mar 2008 17:33:35

RambOrc

Well here you go, it couldn't be much more simple. <!-- s;) --><img src="{SMILIES_PATH}/icon_wink.gif" alt=";)" title="Wink" /><!-- s;) --> [img:11tt2g8v]http://downloads.orcishweb.com/koraxdev/koraxrpg/krpgmap.jpg[/img:11tt2g8v] The whole map where SE takes place is just a small part of the world, basically one big valley. The big town is at river that flows through much of the country, that's where you start. Eastwards is a main road going through another fair-sized town towards the middle of the valley, and after that the road turns southeast through a desert. To the north and south of the valley are high mountain ranges. I drew in a couple of villages, but there will be probably more than just three (this is a raw draft after all). There will also be some habitats that will not be marked on the map, so you will have to stumble upon them.
Fri, 04 Apr 2008 15:40:23

RambOrc

Upon seeing the speed at which simple buildings can be created (especially if you can't enter them), it looks feasible to have a large number of villages so there will be a lot more roads and locations on the final map. While the city is set on a river bank on a plains and the town will also be on the plains, villages due to their smaller size can be in any kind of locations, like on top of a hill, the side of a mountain, the bottom of a basin etc. BTW the visual style of the map could be something like this <!-- m --><a class="postlink" href="http://downloads.orcishweb.com/koraxdev/ramborc/dsamap.jpg">http://downloads.orcishweb.com/koraxdev ... dsamap.jpg</a><!-- m --> or anything else a 2D artist comes up, I just wish one of you would play around a bit with the current concept drawing and do some tests on how the map could look. Feel free to start something completely different as well, due to the nature of the travel map locations can be put just about anywhere and so the map can cover a lot more than one valley.
Fri, 04 Apr 2008 19:42:37

Firebrand

In the art side of this I think we could make some sample squares of different terrains (plain, swamp, rivers, lava, etc.). Then using some tools in any decent drawing programs to draw using these samples as color, we can combine and easily create any kind of layouts for the travel map <!-- s:-) --><img src="{SMILIES_PATH}/orc2.gif" alt=":-)" title="Smile" /><!-- s:-) --> . I'll try to make something like the first image you provided Ramborc (the one that is aint like <!-- s:wink: --><img src="{SMILIES_PATH}/orc9.gif" alt=":wink:" title="Wink" /><!-- s:wink: --> ).

Back to the Korax Forum Archives