Adventure Game Structure
3 posters
Page 1 of 1
Adventure Game Structure
The following is an idea for the structure of a simple flash adventure game. This far from comprehensive, more a concept.
consider the following type of gameplay
https://youtu.be/hhEZ6ui_JE8
A minimalistic engine is requried for this
Most adventure games revolve around an inventory system, triggers, actions, dialogue trees, and a lot of context-sensative structures and events.
Assume an adventure game such as SHM where there is no inventory, no such thing as triggers and no dialogue trees. All of these systems are replace with what is essentially log structures. Each room is its own object and manager and references the following static objects to determine what to do next.
Required arrays:
This system simply performs checks on structures based on the current situation, rather than using complex states and events. A typical scenario under this system might play out like this.
Allowing room objects to query for accumulated information means that very little preliminary work must be done in creating the basic game engine.
consider the following type of gameplay
https://youtu.be/hhEZ6ui_JE8
A minimalistic engine is requried for this
Most adventure games revolve around an inventory system, triggers, actions, dialogue trees, and a lot of context-sensative structures and events.
Assume an adventure game such as SHM where there is no inventory, no such thing as triggers and no dialogue trees. All of these systems are replace with what is essentially log structures. Each room is its own object and manager and references the following static objects to determine what to do next.
Required arrays:
- Code:
current_inventory[] //what is in your possession
inventory_history[] //everything that has been obtained throughout play
places_visited[] //rooms the player has visited
character[] //array of characters
//characters are arrays of strings (their conversation with the player)
This system simply performs checks on structures based on the current situation, rather than using complex states and events. A typical scenario under this system might play out like this.
- player clicks on "spoon"
- player adds "spoon" to inventory
- room object removes "spoon" from room
- player clicks on door
- room object determines door is a path to another room
- player loads other room
- player cilcks on a bowl of cereal in this second room
- the second room checks the player's inventory for a "spoon" string
- "spoon" is found in player inventory
- player eats cereal
Allowing room objects to query for accumulated information means that very little preliminary work must be done in creating the basic game engine.
Nate- Posts : 70
Join date : 2011-06-14
Re: Adventure Game Structure
Allowing room objects to query for accumulated information means that very little preliminary work must be done in creating the basic game engine.
I agree. There should be no reason for complex code in a game like this.
The only problem would be to make sure all specific triggers are met and keeping up with all of them.
The idea would have, as you suggested just something like this:
inventory { Candle, Note, Unidentifiable Object, Watch }
inventory history (past?) { Hall Key, Chamber Key, Torn Letter, Old Picture }
Places Visited (in order from latest to oldest with repeated elements removed) { Front Hall, Hall Door, Main Chamber, Table, Dining Room, Entrance, Pathway }
characters {
Neil { "Did you steal the diamond ring from the corpse?", "Which way to the crime scene?", "Hello." }
Paula { "I see. Good day.", "That's a rather quick assumption.", "You do? Tell me.", "Do you know what happened?" }
}
The ONLY big thing I could see a problem with would be item history EVENTS. Such as "Emblem sits on podium.", "Secret door revealed by switch". Etc. That sort of thing.
While I do agree with a log system, I'd also suggest perhaps coming up with a more well-defined approach to it.
And as far as Dialog goes, we can just write a Binary Search Tree heap and have options branch off onto those other selections. I can write a program to make dialog scenarios and save it as a file. (C++)
MaverickProgrammer- Posts : 63
Join date : 2011-06-14
Re: Adventure Game Structure
MaverickProgrammer wrote:
ONLY big thing I could see a problem with would be item history EVENTS. Such as "Emblem sits on podium.", "Secret door revealed by switch". Etc. That sort of thing.
The point of the inventory arrays is so that at any given time, when an event is supposed to be triggered like placing an emblem on a podium, the room will be able to figure out when it should do that based on input and the user's progress. Here's another simplified example.
- user walks into room with podium
- make sure emblem is not in user's past inventory
- user clicks on podium
- room object detects podium has been clicked upon and looks in the user's inventory
- Code:
if(user.has(emblem)){
place emblem on podium
open secret door
room.say("a secret door is revealed to you")
}
else{
user.say("There's an impression here...")
}
This kind of structure eliminates the need for complex events and triggers.
Nate- Posts : 70
Join date : 2011-06-14
Re: Adventure Game Structure
Right but what if it's NOT this current room the item does something for? Like what if placing an item on the podium activates power to a safe on the other side of the house? And THEN you must flip a switch/solve a puzzle/do another event to actually open it?
MaverickProgrammer- Posts : 63
Join date : 2011-06-14
Re: Adventure Game Structure
There obviously are limits to the design, but one possible solution would be to return an invisible solution item upon completion of a puzzle and place that within the player's inventory. That way upon entering the other room, that room object will scan to see if the puzzle has been solved and open the secret door in THIS room.MaverickProgrammer wrote:Right but what if it's NOT this current room the item does something for?
It's not very elegant a solution, but it's not the only one.
Nate- Posts : 70
Join date : 2011-06-14
Re: Adventure Game Structure
Ah that's a nifty idea. The strings would need to be properly labeled though.
MaverickProgrammer- Posts : 63
Join date : 2011-06-14
Re: Adventure Game Structure
Yeah the structure merits more thought, but as a concept, I think it's a functional, simple way to approach that kind of game design. If inter-room scenarios like that can be avoided, things shouldn't get too out of hand.
Nate- Posts : 70
Join date : 2011-06-14
Re: Adventure Game Structure
Can't really help with the programming stuff but just shouting out that I <3 games like this. Doom RPG and Orcs & Elves for the Nintendo DS are awesome stand outs for me, definately reccomend these
BenJohnson- Posts : 15
Join date : 2011-06-20
Re: Adventure Game Structure
BenJohnson wrote:Can't really help with the programming stuff...
Both Brian and I are self-taught programmers coming from an art background. Maybe you should give it a shot. I'm sure he would be more than willing to help you and I could probably send a few helpful resources your way.
Nate- Posts : 70
Join date : 2011-06-14
Re: Adventure Game Structure
I'm always come from a programming background. I took a break at one point and got my hands dirty with art and music for a while. so that's not -entirely true-.
MaverickProgrammer- Posts : 63
Join date : 2011-06-14
Re: Adventure Game Structure
Okay. My bad. I guess I'm special.
Forget everything I said, Ben. No one can be as awesome as me.
Forget everything I said, Ben. No one can be as awesome as me.
Nate- Posts : 70
Join date : 2011-06-14
Re: Adventure Game Structure
Nate wrote:Okay. My bad. I guess I'm special.
Forget everything I said, Ben. No one can be as awesome as me.
MaverickProgrammer- Posts : 63
Join date : 2011-06-14
Similar topics
» What is Done and what is Not (Game art)
» This Game is Public
» Like, whoa. (Trippy dream I had that sounds like a decent starting point for a horror game)
» This Game is Public
» Like, whoa. (Trippy dream I had that sounds like a decent starting point for a horror game)
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|