Curiosity Labs
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Adventure Game Structure

3 posters

Go down

Adventure Game Structure Empty Adventure Game Structure

Post  Nate Wed Jun 15, 2011 4:35 pm

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:
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.

  1. player clicks on "spoon"
  2. player adds "spoon" to inventory
  3. room object removes "spoon" from room
  4. player clicks on door
  5. room object determines door is a path to another room
  6. player loads other room
  7. player cilcks on a bowl of cereal in this second room
  8. the second room checks the player's inventory for a "spoon" string
  9. "spoon" is found in player inventory
  10. 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

Back to top Go down

Adventure Game Structure Empty Re: Adventure Game Structure

Post  MaverickProgrammer Thu Jun 16, 2011 7:38 am


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

Back to top Go down

Adventure Game Structure Empty Re: Adventure Game Structure

Post  Nate Thu Jun 16, 2011 10:20 am

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.


  1. user walks into room with podium
  2. make sure emblem is not in user's past inventory
  3. user clicks on podium
  4. 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...")
}
from that point on, the emblem will be in the user's past inventory. And the checks and events above will be ignored. If it is found in the past inventory, the room will know to load up the emblem on the podium and open the trap door every time the room is re-entered.

This kind of structure eliminates the need for complex events and triggers.

Nate

Posts : 70
Join date : 2011-06-14

Back to top Go down

Adventure Game Structure Empty Re: Adventure Game Structure

Post  MaverickProgrammer Thu Jun 16, 2011 12:02 pm

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

Back to top Go down

Adventure Game Structure Empty Re: Adventure Game Structure

Post  Nate Thu Jun 16, 2011 3:33 pm

MaverickProgrammer wrote:Right but what if it's NOT this current room the item does something for?
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.

It's not very elegant a solution, but it's not the only one.

Nate

Posts : 70
Join date : 2011-06-14

Back to top Go down

Adventure Game Structure Empty Re: Adventure Game Structure

Post  MaverickProgrammer Thu Jun 16, 2011 4:41 pm

Ah that's a nifty idea. The strings would need to be properly labeled though.

MaverickProgrammer

Posts : 63
Join date : 2011-06-14

Back to top Go down

Adventure Game Structure Empty Re: Adventure Game Structure

Post  Nate Thu Jun 16, 2011 7:00 pm

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

Back to top Go down

Adventure Game Structure Empty Re: Adventure Game Structure

Post  BenJohnson Thu Jun 23, 2011 8:39 am

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 Very Happy

BenJohnson

Posts : 15
Join date : 2011-06-20

Back to top Go down

Adventure Game Structure Empty Re: Adventure Game Structure

Post  Nate Thu Jun 30, 2011 3:48 pm

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

Back to top Go down

Adventure Game Structure Empty Re: Adventure Game Structure

Post  MaverickProgrammer Thu Jun 30, 2011 7:30 pm

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-. Very Happy

MaverickProgrammer

Posts : 63
Join date : 2011-06-14

Back to top Go down

Adventure Game Structure Empty Re: Adventure Game Structure

Post  Nate Thu Jun 30, 2011 7:51 pm

Okay. My bad. I guess I'm special.

Forget everything I said, Ben. No one can be as awesome as me.

Nate

Posts : 70
Join date : 2011-06-14

Back to top Go down

Adventure Game Structure Empty Re: Adventure Game Structure

Post  MaverickProgrammer Thu Jun 30, 2011 8:33 pm

Nate wrote:Okay. My bad. I guess I'm special.

Forget everything I said, Ben. No one can be as awesome as me.

Rolling Eyes

MaverickProgrammer

Posts : 63
Join date : 2011-06-14

Back to top Go down

Adventure Game Structure Empty Re: Adventure Game Structure

Post  Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum