Adventure Game - Coding Concept and Questions

Post your questions, suggestions and experiences regarding game design, integration of external libraries here. For irrEdit, irrXML and irrKlang, see the
ambiera forums
Post Reply
freetimecoder
Posts: 226
Joined: Fri Aug 22, 2008 8:50 pm
Contact:

Adventure Game - Coding Concept and Questions

Post by freetimecoder »

Hi,

I have been planning on how to best make a Myst-like Point & Click adventure game. However, I am far from the final concept, but I would like a bit of feedback and suggestions. This game is supposed to be a redesign of my first 'game' ever. Back in 2003 I hacked it together with Adobe's Image Ready by sticking many htmls together with imagelinks. Awful lot of work and it would seem horribly executed, but hey, I did not even know how to code at that time. It's a shame it all dissolved in a harddisk crash at the end. Since then, yes for about 9 years, I have sporadically tried to revive the project (with html, then basic, eventually c++), but it with my skills growing my goals did so as well. So it might as well still be a long time until i actually settle for a concept and make it a real project.

Now about that concept:
General Look
The general scenery would be a 360° skybox with prerendered textures applied to them. The camera will be placed in the center of the 3d world at (0,0,0). For animated effects video-textured meshes can be placed within the scene. Everything is without realtime lighting to make it impossible for the player to distinguish mesh objects from the background. Items that can be picked up are also managed by textured meshes, acting like layers above the backgroud. If the item is picked up, the mesh is made invisible, revealing the background behind it and vice versa if something is placed in the world.

Interaction
To interact with the game, the player can use buttons. Buttons itself are not visible to the player, e.g. when the player wants to move from one place to another he needs to point where he wants to go and, in case this is possible because of an invisible button, clicks to change his position. Buttons can also be handles to drag, rotate or to interact with by using a certain item, e.g. a key. Possible interactions are represented by the cursur: Possible movement with arrows, handles with hand-icons, item interaction with gears or the item icons themselves if they are in use. Reactions to the players interaction can be displayed by the button: Depending on its kind it can change the displayed image or movie.

Puzzles
Keypads, Wireboards and things like that will be 2D. Other than that they would be created the same way the scenery is: With buttons and layers.

Items
Items would be objects with a name, count and an icon. Picking up an item would be handled like this: There is a button and a layer with the item in the scenery. By clicking the button it becomes inactive, hides the layer, creates an item and adds it to the inventory. In case the player already has one of this kind the count of the existing one is incremented. Placing the item in the world works the other way around: With the item in use a button is clicked, decrements the players item count (and deletes it if the count hits 0), shows the layer of the item placed in the world and activates whatever effect is triggered by this action.

Variables
Aside from using items and buttons the player could solve a puzzle on the one end of the level, activating a machinery on the other end. For that purpose the main Game class will store global variables, which can be queried and set, e.g. bool xyz = game_instance.Query_Bool("has_player_solved_puzzle_xyz") or game_instance.Set_Int("rerouted_power_direction",3).

Sceneobjects
Every position the player can look around and even every puzzle scene is a sceneobject. It contains all the buttons, layers, textures and backgrounds. On game startup every sceneobject is created. However not all of its components are. To save resources the scenobjects have a Load and an Unload function that loads media data like textures and meshes respectively frees the memory. All sceneobjects that can be accessed from the one the player 'uses' at the moment will be Loaded once said one is entered to prevent to long loading times when transitioning. Once the player leaves for the next sceneobject, the Unload function is called (Yea heavy unecessary data access, maybe there is a better way). When transitioning to a different sceneobject, a OnTransitioningEnter function will be called on that object to allow the object to adjust to possibly changed global variables. The active scenobject will have an Update function called to update textures, meshes, animation etc. The active sceneobjects buttons will be linked to an event manager and use callbacks to the sceneobject.

Realization
Buttons will have a base class and inherited classes depending on their function. They will have methods for OnHover, OnClick, and OnLeave with a pointer parameter for the used item. The specialized buttons will have a method OnDrag and DragPercent or DragDegrees. The functions will use callbacks to inform the parent sceneobject of what is happening.

The thing is, I am really not sure how to realize the sceneobject class. The way it would be now is that I create a base class with all the above mentioned methods and create a inherited singleton for each place the player can be and programm it to do whatever it needs to do.
Another way would be to invoke scripts of some kind, but every attempt at getting something working like i wanted failed so far, because I don't quite get how script languages can be used when it comes to make a script run and interface only with a certain object.

Sooo, what do you think?
I know its a rough outline, but as I said before, it is not an urgent project. Any tips? I would like to get behind the mystery of scripting, but every in depth search on what to do with scripts eiter lead me to "you can to configurations with it..." or to massive programms like blender. Is there nothing in-between?

greetings
FTC
Post Reply