Elements of RPG Game Making in TGB
by Ryan Ray Lynch · in Torque Game Builder · 02/26/2011 (9:47 pm) · 5 replies
Hello,
Before I dive into my topic, I would like to take a short moment to introduce myself. My name is Ryan, and i'm both new to the Torque community and the Torque Game Builder. I've been working with many different game making /kits/ throughout my life, but I recently decided to kick it up to producing games with an actual engine since i'm now attending college for Game Art/Design.
I'm starting this thread to get a basic understand of how basic RPG elements might would function in this engine. I have ideas on how they might work, but the TGB is much different compared to the game making kits I've used in the past. I feel like getting a better understanding on how these things work with the engine will help me get a kick start on my project.
I'll go through the elements i'm most curious about in a detailed list. I would like to note that i'm not looking for any scripting to be done, just maybe a basic description on how one would go about executing these in the TGB:
*A Message Window System:
In the previous tool I used to make games, there was a command called MWin(), which basically drew an image from the game's resource files onto the screen and placed text in it to form a dialogue box. You set the file's location, it's boundaries in which the text was printed, and what text it used, among other things, in the games Main script, which was then called to the screen with the MWin("Text printed in the box") funtion.
Exploring game files in the TGB (like the interactive scripting tutorial I purchased for example) I notice that each individual box with dialogue was created as an image and place withing the game's resource files, which is one way to go about it. However I feel like in an RPG that might end up being a lot of images to make.
Is there perhaps an easier way of executing a Message Window system that i'm overlooking?
*Map... or Scene Linking
I know this absolutely has to be possible, and is probably the easiest thing in the world to do. I will go ahead and admit that I've started reading the documentation, but did more skimming since I haven't had time to really delve into it. How exactly does scene/map linking work in TGB? In the previous tool I used, you would set which direction from North, South, East, and West would lead you to in the map's preferences, as well as use warp tiles for entering houses located throughout the map. Is there a similar method in the scene editor i'm overlooking? I was thinking it would be something along the lines of setting a transparent object on the map and upon colliding with it, it flips you over to another scene in a preset location.
*Slight in-game cut scenes
What I mean by this is only in addition to a Message Window System. Creating cut scenes with the tool I previously used required setting up scripts on the map that were activated upon contact. The scripts used commands that moved objects in certain directions or even certain points of the map with code, as well as did things such as played movies within the game's resource files, faded in/out music, and even advanced things such as clearing out the screen and drawing a whole new map with new objects placed onto it in order to create a separate cut scene.
I was curious as to whether or not there was a similar method in TGB, or if it was all purely done animated movie style and just a movie played on screen when activated. Maybe there's even another way to do this i'm completely overlooking.
I'll probably have many more questions in the future, but for now this is what i'm most interested in. This 2000 word limit is kind of making me antsy as well seeing as I've managed to turn a couple of simple questions into a wall of text.
I apologize for noobing it up on the forums! Like I said, i'm new to the engine and very curious as to how things function in this engine compared to a game making kit. Torque Script appears far more advanced to me in the sense that there aren't coding functions already built and listed out for you that do all the basic RPG functions. At least not that I've stumbled upon anyways.
Thanks!
Before I dive into my topic, I would like to take a short moment to introduce myself. My name is Ryan, and i'm both new to the Torque community and the Torque Game Builder. I've been working with many different game making /kits/ throughout my life, but I recently decided to kick it up to producing games with an actual engine since i'm now attending college for Game Art/Design.
I'm starting this thread to get a basic understand of how basic RPG elements might would function in this engine. I have ideas on how they might work, but the TGB is much different compared to the game making kits I've used in the past. I feel like getting a better understanding on how these things work with the engine will help me get a kick start on my project.
I'll go through the elements i'm most curious about in a detailed list. I would like to note that i'm not looking for any scripting to be done, just maybe a basic description on how one would go about executing these in the TGB:
*A Message Window System:
In the previous tool I used to make games, there was a command called MWin(), which basically drew an image from the game's resource files onto the screen and placed text in it to form a dialogue box. You set the file's location, it's boundaries in which the text was printed, and what text it used, among other things, in the games Main script, which was then called to the screen with the MWin("Text printed in the box") funtion.
Exploring game files in the TGB (like the interactive scripting tutorial I purchased for example) I notice that each individual box with dialogue was created as an image and place withing the game's resource files, which is one way to go about it. However I feel like in an RPG that might end up being a lot of images to make.
Is there perhaps an easier way of executing a Message Window system that i'm overlooking?
*Map... or Scene Linking
I know this absolutely has to be possible, and is probably the easiest thing in the world to do. I will go ahead and admit that I've started reading the documentation, but did more skimming since I haven't had time to really delve into it. How exactly does scene/map linking work in TGB? In the previous tool I used, you would set which direction from North, South, East, and West would lead you to in the map's preferences, as well as use warp tiles for entering houses located throughout the map. Is there a similar method in the scene editor i'm overlooking? I was thinking it would be something along the lines of setting a transparent object on the map and upon colliding with it, it flips you over to another scene in a preset location.
*Slight in-game cut scenes
What I mean by this is only in addition to a Message Window System. Creating cut scenes with the tool I previously used required setting up scripts on the map that were activated upon contact. The scripts used commands that moved objects in certain directions or even certain points of the map with code, as well as did things such as played movies within the game's resource files, faded in/out music, and even advanced things such as clearing out the screen and drawing a whole new map with new objects placed onto it in order to create a separate cut scene.
I was curious as to whether or not there was a similar method in TGB, or if it was all purely done animated movie style and just a movie played on screen when activated. Maybe there's even another way to do this i'm completely overlooking.
I'll probably have many more questions in the future, but for now this is what i'm most interested in. This 2000 word limit is kind of making me antsy as well seeing as I've managed to turn a couple of simple questions into a wall of text.
I apologize for noobing it up on the forums! Like I said, i'm new to the engine and very curious as to how things function in this engine compared to a game making kit. Torque Script appears far more advanced to me in the sense that there aren't coding functions already built and listed out for you that do all the basic RPG functions. At least not that I've stumbled upon anyways.
Thanks!
#2
I'm considering putting it into some kind of kit, but I'm not sure how the kit-making process works here.
02/27/2011 (7:39 am)
I've been progressing on an RPG in TGB for years now. It's definitely not the easiest type of game to make with TGB. I built a dialogue system like you describe out of sceneObjects and multiple scenewindows. I'm pretty happy with the results. I put a screen shot in my 2007 blog of course I've made progress since then http://www.garagegames.com/community/blogs/view/13379I'm considering putting it into some kind of kit, but I'm not sure how the kit-making process works here.
#3
@Ronny
Thanks for pointing me in the right direction with what I was curious about. I kept hearing about the GUI system but never really knew it could be used for the message window.
You mentioned gameWindow.loadLevel("levelname") which I didn't even know existed. I've been taking the interactive scripting tutorial which has only taught me console commands so far. I've purchased the Game Programmer's guide to torque so hopefully this'll help despite it seeming to be more focused on T3D.
Also, I was planning on getting the Adventure Kit at some point. Glad to see someone recommending it!
@Joe
Ah, it not being the easiest doesn't sound too good.
I'm planning a pretty simple RPG so hopefully it won't be too difficult. The battle system isn't even going to be turn-based, rather I was planning more of a Tales Of battle system where you enter a random encounter battle, move/attack/cast freely until the battle is finished.
But your dialogue system looks nice! Hope you find out how to put it up as a kit.
02/27/2011 (3:26 pm)
Thank you both for your responses.@Ronny
Thanks for pointing me in the right direction with what I was curious about. I kept hearing about the GUI system but never really knew it could be used for the message window.
You mentioned gameWindow.loadLevel("levelname") which I didn't even know existed. I've been taking the interactive scripting tutorial which has only taught me console commands so far. I've purchased the Game Programmer's guide to torque so hopefully this'll help despite it seeming to be more focused on T3D.
Also, I was planning on getting the Adventure Kit at some point. Glad to see someone recommending it!
@Joe
Ah, it not being the easiest doesn't sound too good.
I'm planning a pretty simple RPG so hopefully it won't be too difficult. The battle system isn't even going to be turn-based, rather I was planning more of a Tales Of battle system where you enter a random encounter battle, move/attack/cast freely until the battle is finished.
But your dialogue system looks nice! Hope you find out how to put it up as a kit.
#4
Using the Adventure Kit you'd already have some of the major subsystems you need in place, actually. So it can be easy :)
02/27/2011 (4:20 pm)
Every scene you create has the .loadLevel() and .endLevel() methods. They also have .schedule(), which allows you to load a transition in the frontmost scene and have that level end after a number of seconds, for instance.Using the Adventure Kit you'd already have some of the major subsystems you need in place, actually. So it can be easy :)
#5
02/27/2011 (6:33 pm)
Actually, unless it's been updated very recently the Game Programmer's Guide to Torque is aimed at TGE 1.4. Much of this information is still relevant and all of it is generally useful for T3D, but there are some significant differences.
Torque 3D Owner Ronny Bangsund
Torque Cheerleaders
T2D has a GUI system you can use to design message boxes, optionally with some custom graphics. Add them to a layer as needed, hook functions to buttons to make stuff happen. There is a styled text control available (check TDN for documentation beyond the included). There are already some simple message boxes defined, but they really use this GUI system, so you can re-skin them and make your own custom appearance for a game.
(Tangent: I use several layers of scenewindows, and generally no GUIs unless I need lots of text. Background, actual level, HUD layer, transition layer from back to front. When using sprites as GUI elements you can have fun with animation. The regular GUI system is very static, apart from a few scrollers and list widgets.)
Map linking:
It's up to you how you do this, really. If the scenewindow you load your levels into is called gameWindow, you just call gameWindow.loadLevel("levelname"), and that's that. If you get fancy, like in my example above, you load an animation covering the screen into the frontmost window while the potentially large next level loads in the background, and make the transition animation go away when done. WHEN you do all of this is the only real question. Respond to player sprites entering a trigger area, certain items being picked up, a boss monster being slaughtered, whatever the criteria.
If we take a Zelda-like example with alternative screens for entering houses, you could have the big game world on a main scene and put another in front where you load interiors. Then you just call interiorWindow.endLevel() or whatever. Doorways just have a trigger on them to load the right level. You'll probably make a few custom behaviours, then when you have those in place the editor becomes a level builder for YOUR game.
Cut-scenes:
The "easy" way: Load a Theora-compressed movie into a movie control covering the screen.
The other way: Pretty much as you described above. Use the level builder, set up paths and triggers etc. You could design each cut-scene as an overlay level (everything you don't put graphics on is transparent, so this is an excellent option) with an attached script.
In the level you add sprites which need to be in the cut-scene, and name the scene something unique. Then you make a class for the cut-scene which calls the right scripts, and maybe pushes away some of the controls so the player can't run away, then returns and ends the cut-scene level when all of it has finished playing out.
For a quickstart you could buy the Adventure Kit, which covers overhead-ish movement, animation and a non-loading interiors way of entering buildings.