The Return of Adventure Games
Growing up I never really took a shine to adventure games. I was very impatient and didn’t like to be mentally bested by a game. Only recently am I starting to see the appeal. My girlfriend is creating an HTML5 adventure game for her thesis (using Crafty) so I was introduced to the greats such as Day of the Tentacle.
It would be a sin to not mention the massive success of Double Fine’s new adventure game project. This alone shows how nostalgic this genre is to many many gamers.
This led me to think about implementing the genre for mobile devices and browsers. The genre is almost perfect for casual gaming. You can solve small puzzles in pockets of spare time and none of the immersion is lost.
This then led me to think about a framework for building adventure games where various callbacks would help construct the puzzles and gameplay. Typically adventure games are built up of:
- Scenes
- Actors
- Items
- Dialogue
- Actions
Scenes being small rooms or areas the player can explore to find items and solve puzzles. Callbacks for scenes would include entering a scene, exiting a scene.
var Intro = Class(Scene, function(supr) {
this.init = function(opts) {};
this.onEnter = function(previousScene) {};
this.onExit = function(nextScene) {};
});
Actors would be NPCs that can initiate dialogue and potentially reveal information or a piece of the puzzle if the player says the correct things. Actors could also be part of the scene that isn’t an item but reacts when used with an item.
var NPC = Class(Actor, function(supr) {
this.init = function(opts) {}
this.onPush = function() {};
this.onPull = function() {};
this.onOpen = function() {};
this.onClose = function() {};
});
Items are things inside scenes that progress the plot and can be used to solve smaller puzzles. These usually have the biggest impact on gameplay and contribution towards a resolution. Some callbacks for items would be using an item, combining an item with another item or combining an item with an actor.
var MyItem = Class(Item, function(supr) {
this.init = function(opts) {};
this.onUse = function() {};
this.onCombineItem = function(otherItem) {};
this.onCombineActor = function(otherActor) {};
});
Dialogue usually has a few options about what you want to say to an actor which will either trigger another line from an actor, conclude the conversation or progress the plot. You could make some lines of dialogue have the same effect or a line of dialogue could be key to solving a puzzle. Callbacks would be when the player selects a line of dialogue.
var TalkingDude = Class(Actor, function() {
this.onDialogue = function(lineSpoken) {};
});
Actions are how the player interacts with items, scenes and actors. Callbacks would be placed on Actors and Items for various actions such as open, close, push, pull, use, etc etc.
var MyItem = Class(Item, function(supr) {
this.init = function(opts) {};
this.onPush = function() {};
this.onPull = function() {};
this.onOpen = function() {};
this.onClose = function() {};
});
I know this isn’t anything concrete but it is my interpretation of building an adventure game with the intention of modular and ultimate reuse. I intend to do more tinkering to come up with some working demos and maybe even design a JSON format to build scenes and lines of dialogue.