MIKE'S STORY


PROGRAMMER'S NOTES


Introduction

I didn't really expect to polish off finish Mike's Story, much less release it.  I started it just to see if I could reinvent a few wheels all by myself.  As it progressed, though, I became happier about where it was going and began to feel it might be worthy of distribution.

Mike's Story is written in Euphoria for DOS.  It is "pure" Euphoria, containing no calls to C routines or machine code.  There are no third-party include libraries used, only those distributed with Euphoria and ones I wrote myself.  Mike's Story is not platform-independent because it relies on DOS graphics routines.  If someone would like to port it to Linux, I would appreciate seeing the end result.

A secondary goal for the program was that it would be a good model that someone else could use to explore a few concepts of game design.  I tried to document it well enough that a beginning coder could grasp what I was doing.  In that respect, I want you to feel free to look through all of my code and see how things were done.  You can change things to see how they affect the game.  And if you don't break the game a few times, you aren't doing it right. :)


Concepts

Mike's Story is a tile-based RPG, in the style of 1980's and early 1990's computer games.  The world is made up of rectangular tiles, each representing a different type of terrain.  A tile can be passable or impassable, regardless of the type of terrain on it.  Each tile has a zone number which determines the type of wandering monsters that can appear there.

A tile can also have a special event number.  When the character enters a tile with a special event number, that event is launched.  This is the method used to create establishments (inns, shops and trainers) as well as plot points and atmosphere.

The game uses several include files, which each hold routines related to one aspect of the game.  The file game.e holds all of the information that makes up the story.  This allows different stories to be easily created using the basic game engine.


Files

The development library should contain the following files:
bldmap.ex    a map building program
mainmap.e    the world map for the game 
prgrmr.txt   programmer's notes (this document)
rpg.ex       the game
rpgchar.e    include file for the main character
rpggame.e    include file with the story elements
rpggen.e     include file holding general purpose routines
rpgglob.e    include file holding global declarations
rpgitem.e    include file for items
rpgmap.e     include file for the map
rpgmnstr.e   include file for monsters (the opponents you may run into)
rpgscrn.e    include file for processing the screen
rpgspcl.e    include file for special events
rpgtrn.e     include file for terrain
rpgwin.e     include file for popup windows


Map Builder

The map builder initially loads a default world entirely composed of grassland set to zone 1.  Use the cursor keys to move around the world.  The selected tile is highlighted in white.

The T key will cycle the highlighted tile through all of the available terrain types.  To make it easier to repeat terrain over a large area, the system will remember the last terrain type set and will start the cycle at that point for each new tile you change.

The P key will toggle a tile as passable or impassable.  Impassable terrain will be marked by a large X.

The Z key will allow you to enter the zone for the tile.  You will be prompted to enter a number between 1 and 99 to indicate which zone the tile should be.  Like the terrain, a system is in place to make it easy to repeat a zone over a large area.  When you press Z and the current zone is different than the last zone that was set, the tile will be set to that zone without prompting you.

The space bar will set the special event for a tile.  You will be prompted to enter a number between 1 and 99 to indicate which special event should be triggered when the character enters that tile.  Keep in mind that if a special event tile has a zone that could have monsters, it is possible for the character to encounter a wandering monster before the special event occurs.

The A key will save the map as a new file name.  You will be prompted to enter a file name.  Maps are saved as Euphoria include files.  If you omit the .e at the end of the file name, the system will add it for you.  Keep in mind that this is a DOS game and files must therefore adhere to the 8.3 naming standard.  Unless the rpg.ex program is changed, it will expect the map to be named mainmap.e.

The S key will save the map with the current file name.  If no file name has been determined, you will be prompted to enter one.

The L key will load a map from a file.  If you enter a name that does not end in .e, the sytem will append .e to the end of the name before looking for the file.

The M key will display a large-scale map in the top left corner of the screen.  This map will show the entire world, with one pixel for each tile.