Game Development Community

Best way to implement idea

by Robert Kelley · in Torque Game Builder · 07/09/2007 (7:12 am) · 8 replies

Myself and a few friends are currently designing an RPG with some puzzle elements. We recently purchased TGB and the Adventure Kit. The maps will be done through the Adventure Kit. My question to all the advanced scripters out there is whats the easiest way to implement the puzzle elements? Basically there will be triggers on our maps that will make various puzzles popup (think Sudoku). I've tried to do this through the tile maps themselves but it has gotten very confusing really quick. I recently started looking at maybe using a gui to do this. I'm not looking for code just the basic way to implement this. If you need more information to help, just let me know and I can get a little more detailed.

Thanks

Rob

#1
07/09/2007 (9:00 am)
You could literally pop up a completely new sceneGraph for each game (which would be associated with a GuiObject in your GUI), and play the puzzle game directly in the new scenegraph.

Effectively, you would be using the "main" sceneGraph as just the overview, and bringing up your mini-games as just that--mini-games within the main game.
#2
07/09/2007 (9:24 am)
Could another sceneGraph be created through the editor or would it need to be done in script? Sorry really new to this. I've done quite a few tutorials but implementing lets say Adventure Kit and the Checkers demo into the same level, I haven't seen how.

Thanks again

Rob
#3
07/09/2007 (9:28 am)
This would be done within the script of your "main game", and is an advanced topic in that tying together multiple sub-games under one overall "main game" could become a nightmare if you don't lay things out carefully.

This would probably be a really nice use of the Package concept within TorqueScript--something which is not particularly documented as to theory and use, but if you are familiar with packages in other scripting languages, it's pretty basic.

One theoretical way to look at packages is to consider them as "super-namespaces"...again, theoretically, putting things within a package is like adding an additional token to their namespaces, allowing you to run a subset of game functions for each package that you implement.
#4
07/10/2007 (7:51 am)
I can tell this specific way might be out of my league right now. With your experience, using static images and a gui, would it be possible to make a sudoku style puzzle that could popup using object triggers? I saw a tutorial to implement static / animated images into a gui. If this is possible, it might be a good way for me to go for now until I can learn more about TGB.

Thanks

Rob
#5
07/11/2007 (6:00 am)
Another way I might be able to design this would be to design each piece as a separate level and save the data out then load the puzzle in then once it's complete, re-load the level. I was afraid this would be too slow in execution and also somewhat cumbersome. Anyone have any input?

Thanks

Rob
#6
07/11/2007 (9:55 am)
You can also add a new scene window to the project (edit the mainscreen.gui file in a text editor) which would let you load another level into it. You have SceneWindow2D for the game and then MiniSceneWindow2D is where you load mini-games. You can use

MiniSceneWindow2D.loadLevel

to load a level like you are already doing and use

setVisible

to true and false as needed to make it visible. And the sceneWindow2D is unchanged, it just sits in the background until you go back to it.
#7
07/11/2007 (1:29 pm)
Thank you both for your input. time to get to work

Rob
#8
07/16/2007 (10:05 am)
With something like soduku which has a lot of tiles, a tilemap sounds like the best way to go. (using a gui you would have to make and arrange all the tiles manually as GUIBitmapCtrls or something) And because tilemaps are sceneobjects not guicontrols you would need to go with the approach of creating a new scenewindow (or making it visible) and loading the level in which your sudoku map is saved. Or if the tilemap is the only thing in your scene then you could just load the tilelayer into your scene's tilemap and accomplish the same thing. Or course if you have many different minigames and want to use the same scenewindow for all of them loading a separate level file for each one would make sense because they can all be completely different.