Writing an Adventure System - Part #1

Lua can be used for a great many things and it also makes development rapid and fun. However, like every rose has a thorn, the lua implementation in CoronaSDK comes with it's own thorns, it is sand-boxed, and does not allow a few key things that can make things so much more versatile, like loadstring() which is a real boon to execute external routines, which can be a double edged sword in terms of security. The other problem that CoronaSDK bring with it, is the not so wonderful experience with text input. Despite these handicaps, we shall attempt to see how to create an adventure game, as most of the article is more so about the idea and an attempt to revive the lost art of something called Interactive Fiction (the politically correct word for Text Adventures).

When I was young, my father said...This is not about the song from Cliff Richard but for christmas he gave me a computer, it was a ZX Spectrum one that would plug into a Television set and needed a tape recorder and magnetic tapes to load/save, I do remember carrying a 10 pack box of cassettes with all my favourite games and swapping them for new ones with friends. Right, in those times there were quite a lot of wonderful and not so wonderful programs, Of these one very popular genre was Adventure games, mainly text adventures. Now if there was a wonderful input system on the mobile touch devices, it would be so much easier. Somehow, we shall look past that little handicap of mobile devices and go over a few things like the idea of an adventure game and the structure and so on. For input we shall attempt to replace that with some icon based options that can be tapped and used.

So, first things first. What is an adventure game? An adventure game is made up of a simple idea that challenges the players ingenuity, wit and staying power. The idea is not speed, but cunning which is the key to solve this games and achieve success. The aim of the game is *Not* just to complete the game but also to explore the world, solve puzzles, interact, etc and that's how the player is challenged and retained to return to the game. The adventure game is like a story, like an Indiana Jones movie but the difference being that *you are* Indiana Jones or part of the story as some other character. The setting/location of the story can be anything on or outside the planet, a lost temple, an evil scientists lair, the wild west, the 20's the 60's a jungle, the school, the ocean, whatever you can imagine. The aim, explore the settings, as much as possible, keep alive and get the items, treasure, etc. RPG's are a modified modern version, but these rely a lot on powering up than solving puzzles and gaining articles. The Fable series are more like a RPG + Adventure game hybridised. Mechanarium and Samrost are good examples of puzzle solving games, Beneath a steel sky is a very good graphic adventure. DOT (Day of the tentacle) is another wonderful graphic adventure. So you do get the idea, if you have not seen or played any of these... :(

The game is a series of events in which the computer keeps informing you about the 'room' or location that you are in, the possible exits from that location and the items that can be found in the room/location. In graphic adventures (also called Point and Click Adventures) the items can be seen that are then picked up and therefore taken off the screen. The player, that is you will tell the computer what you want to do, this would either involve an action or movement like going to the next room or climbing up the stairs, or lowering yourself into the secret passage. The instructions in a Text Adventure are in the form of text commands in a few words like "Go NORTH", "LOOK", "EXAMINE AUMLET", "FIGHT GOBLIN", "RUN", "SPEAK WITH <character>", etc and in a graphic adventure you would click on the icon or a character on the screen to interact with that character.

Some games can go beyond and instead of a soloist, can provide you like in a RPG with a band of explorers, each with different abilities and these abilities can be developed throughout the game, but only one character is controlled at a time and the band follows the character being controlled. Others go beyond even this and kind of border into the types of WoW (World Of Warcraft) where multiple players come into this virtual world and interact with each other.

A very simple flow of events

         +-----------------------+
         |Start with a story line|
         +-----------+-----------+
                     |
         +-----------v-----------+
         |MAP your world on paper|
         +--+----------------+---+
            |                |
            |                |
  +---------v-----+   +------v--------+
  |People to meet |   |Objects to find|
  +------------+--+   +--+------------+
               |         |
            +--v---------v--+
            |Write the code |
            +------+--------+
                   |<---------------------------+
                   |                            |
            +------v--------+         +---------+--------+
            |Test/Play      +---------> Debug for errors |
            +------+--------+         +------------------+
                   |
        +----------v--------------+
        |Stop and have lots of fun|
        +-------------------------+

The Steps


Step One
The story. Create a storyline, Create the atmosphere, set the scene for the game, ask yourself, where is this all happening or where will this all take place? What is the mission, the quest, the goal, what is it all about? It can be set in ancient times, modern times, futuristic times, it can be a simple one as escaping from the caverns of doom or complex like the 12 tasks of Hercules. When you get a feel for the storyline, you have a broad outline of what the whole game would be about.

Step Two
Designing a map, you are creating a world, this world has to be defined and requires a lot of interesting place where lots of interesting things happen. Many of which can be unpredictable. The map helps you to lay out the whole new world physically and visually.

Step Three
The world needs to have characters, people, animals, creatures that you can meet, interact with, fight and battle with, befriend, tame, etc Some of them are key to the game while the others can be a key to the puzzle and the rest just to provide clues or make the feel o the game more realistic. However it is not important to have more characters than required, having them helps create realism in the game. In a text adventure, the audience in the stadium can be referred to as one character, but in a graphic adventure, it could be separate. However this is just a guideline, you can have the hot dog seller in the stadium in both the text and graphic adventures. These need to be set with a set of attributes, friendly, hostile, etc

Step Four
There need to be certain Objects scattered across the world rooms, these are the items that are essential to the success of the game, sometimes certain objects need to be combined to form a newer object, in graphic adventures these are resolved visually, but in a text adventure, it is entire to the literary talents and wits of the writer. One of the objects needs to be the final penultimate object that is what would help to determine if the game is solved and completed or not.

Step Five
This all needs to be carefully planned on paper, a lot of time goes into the planning, that way the plots etc are all quite solid and inter-related. Coding can be achieved anytime, the more important factor is the strong story, location and character/objects. If this was a graphic adventure, then all the assets in terms of the backdrops, objects, characters need to be visualised and drawn by the artists. These can be used as a story board.

Step Six
This is the final stage, which is writing and testing the game. Finding any bugs, it would require recoding and retesting.

Actually it sounds like an easy process, game writing is *not* a very short process, but generally is an interesting process. The advantage of an Text Adventure game is that the entire scenery and settings, etc are all powered by the imagination of the player. Where as in a Graphic Adventure, one can see what is there. A good writer can evoke some really vivid pictures in the player's mind with text, which cannot be competed against by any amount of amazing artists.

End of part 1

We will end the first part here, we shall revisit this next time and look at some programming techniques that we need to understand for writing an adventure game in general and then start work on our Lua engine for writing adventure games.

So if you have some ideas, let us put them together, and please vote for the same, be it your own or another persons idea, let us all develop it as we go along adding structure and imagination to it.

Comments

  1. i'd really love to participate, even if its just for the learning sake
    how can i help the project?

    ReplyDelete
  2. You can start with creating a plot /story at your end and follow the other tutorials, at the end, you can release your game on the marketplace, though it will be similar, it will still be different.

    cheers,

    ?:)

    ReplyDelete

Post a Comment

Popular Posts