Writing an adventure system - Part #2


Quite a few people were interested in this topic, maybe the picture of Harrison Ford might have pulled them in. For those that actually came to see what an adventure game is all about, and would want to continue with this little experimental project, read on

This one should be called Part 1b, as it is not really the second part but a continuation to Part #1 where we are trying to lay the ground rules and understand a few things that we are going to go up against. Generally, this would not have been an issue as most of the planning for an Adventure game is about the creativity. The coding part is a small, very small portion. However on the mobile devices and specifically with CoronaSDK, let us address one major brick wall that we shall encounter, the input system.

To counter that, there is an amazing open source library written by bruno.simoes7, called the Floating Keyboard. His code displays a keyboard and switches between the various keysets, symbols/numbers/lowercase and uppercase. This is the ideal candidate for our entry system, the only issue is that it made for the iPad, so we might have to run our projects for the iPad while we work through the same. ( information can be found here )

Another issue that we will face is printing a paragraph of text, since corona has a newText() but no options for multi-line text etc, we will require to split up the paragraph of text into individual lines and display them. On the CodeExchange, there is another code that helps in just the same written by tom.knox7 which can be found here and just in case wwe need to display our text to highlight names or objects etc, we can use the other function written by vrodgers found here .

Planning the Game

So for those that are still here and want to proceed with this, let us try to first answer these basic questions.
  • What is the story behind our game?
  • Where is it that the action takes place?
  • What are the things that can or will happen?
  • What is the point or aim of the game?

Some wonderful inspirations are all around us, Look for Dragons and Dungeons, Robin Hood, Terminator, if you even look at a massive graphical adventure made with CoronaSDK, Forgotten Places - Lost Circus HD from Sungift Games. The story is where you travel back to a circus and it brings back memories as you solve puzzles and proceed with the game. Details here . Royalty, medieval times and quests have been one of the most popular themes, with a lot of magical creatures.

We can have a really interesting game if you, that are reading this can pitch in with ideas. So try to answer the above questions and let's get started...

Maps
While we create this wonderful imaginary world, we need to give it a physical dimension, on paper. Some adventure games have randomly generated areas, like in many of the Nintendo RPG type games.

For our purpose, we shall work with a fixed map, so your task is also to make a small world where your game is taking place, even if it a single room like in the movie SAW (part 1) you need a map to place objects in the room.

Suspense
Another little issue that needs to be resolved is the suspense part, an adventure game is really fun when the player has no clue about the locations and the wit, etc included in the game. Because we shall be sharing the source of the game, anyone can read the messages and the whole fun is lost as the messages would give an idea of how to solve the game. So, we shall make a routine that shall substitute/encrypt the text so that it is not easily readable by the casual roving eye.

SIDENOTE: There is an open source framework that I just hear of on 13th September 2011 via a tweet that helps/allows creating an adventure game, it is called Wibble Quest . It seems like a combination of Objective-C framework and a bit of ruby, haven't got a chance to look at it, for those that want to jump ahead and look at alternatives, you can go ahead and have a look.

right back to our point on obfuscating/crypting the text, so the messages, etc cannot give away the gameplay, if you were to read the code and you could see lines like
-(void) onUse{
  [self drink];
}

-(void) drink{
  if (drinksLeft > 0) {
    drinksLeft = drinksLeft - 1;
    [WQ print:@"You take a swig from Bubba, it's pretty refreshing"];
  }else{
    [WQ print:@"Oh.. Looks like Bubba is empty."]; 
  }
}
You know that there is a drink called bubba and it's refreshing, let's say the same code even had other things like the magic drink Dubba transports you to the crystal cave, now you do not want that to be known to the person reading the code, otherwise they know that there is a secret place called the crystal cave and you can reach it by drinking the Dubba drink. They can then search the code for where to find the Dubba, thereby ruining the fun and suspense factor of the game. That is the reason why we shall obfuscate/encrypt the text so thet even while you would type the same, you cannot get all the clues in plain text, so it will be a bit of fun, AND... you cannot remove the messages that say "programmed by Jayant C Varma" to say programmed by you ;)

Another thing is that since this code will be like live coding, we shall be creating functions to resolve things, not necessarily the most optimised way to do something, but will get the ball rolling.
So, while you are thinking of a plot and the physical world, let us make a small world of a few locations.

The Plot

The idea is simple, you, the player is the Co-founder of Adventure Mobile and are running a start-up, so the game is set in the offices of Adventure Mobile. The aim of the game is to release the Cool Framework that allows to create Mobile Apps. The issue is that the office needs to be setup, the computers need to be given to the developers, which will help setup the website, create the website, generate money, buy other equipment, etc and so on. The game is complete when you are able to release the framework. This is *NOT* a simulation so there will not be a varying quantities of resources and nor will it be like Farmville type apps where over time you can generate more.

The entire game is set in the office and therefore there are a few locations that you can navigate to, there are a few secret spots to find, and a couple of people that are there and a finite number of object that we can interact with.

if anyone has a better idea, please let me know, otherwise we shall continue with this idea/plot.

So till next time where we shall create the Map and create the list of our words, and other details.

Comments

Popular Posts