Game Development Community

Pipe Dream or Possibility?

by J. J. Franzen · in Torque Game Builder · 04/04/2010 (5:24 pm) · 10 replies

So, I've been toying with the idea of having my own go at making a 4X game in the vein of Master Of Orion and Galactic Civilizations. I'm looking at doing so with TGB, but all the examples I've looked at all seem to be action oriented. Is TGB adaptable enough to use for a turn based strategy title? If so, does anyone have some pointers where to look for tutorials et. al.
Also, I'm not a programmer by trade but I know enough Java/Python to be dangerous. Am I fooling myself in thinking that I can figure this out? Any advice/guidance you folks could provide would be deeply appreciated. Cheers,

J. J. Franzen
Technology Supervisor
South Park Studios

About the author

Recent Threads


#1
04/04/2010 (9:45 pm)
There's nothing stopping the engine from being used in such a way. You basically want buttons all over the place? TGB provides that either with plain old GUIs, or sprites which respond to clicks.

You'll find some pointers at the top of the page, under Support. All current documentation is linked from there, and you can find your way to TDN from there. Some tutorials and behaviours you might find useful are on that wiki, although some of the tutorials are for older versions of the engine.

If you can produce something useful in Python or Java (for example a windowed program which handles file opening and saving), you should be at an advanced enough level to learn TorqueScript.
#2
04/04/2010 (9:55 pm)
I've been digging around and come across a match three tutorial which I've gone through. Am I wrong or is TorqueScript inspired by C#? It looks similar at least. Anyways, yeah it doesn't seem impossible to make it work. Alas, all the examples and demo materials are for action/realtime games. I guess I'll have to just buckle down and muscle through all the tutorials. Good thing I have too much free time, eh? Thanks for the feedback. Cheers,

J^2
#3
04/04/2010 (10:36 pm)
TorqueScript is older than C#. Microsoft stole the suffix ;)

Turn-based isn't so hard. Accept input, perform actions, lower action points/movement points/whatever, start calculating research when End Turn is pushed. There is so much you DON'T have to do if you are making a turn-based game :)

Just plan out the typical turn sequence. What do you want to enable the player to do? Will you be allowing hotseat multiplayer?

A turn could be something like this:
1.Check which player's turn it is and display a clear notification - use a GUI element with an OK button linked to a function hiding this. All you need is a text box and a button.
2.Calculate the player's research advances and income.
3.Let's assume you have in-turn actions (moving troops, buying upgrades) and between-turn actions. Make it possible to move stuff at this point, and spending resources to get other stuff. Ships, armies, planetary scouts, whatever. If combat is an in-turn, calculate as movement is completed.
3b.If you feel like being *extra* helpful, keep track of how many options are left - when there are no more actions the player can take (everything is too expensive, armies are exhausted), flash the End Turn button.
4.After clicking End Turn, automated stuff happens. If combat is between-turn, calculate all the violence now.
5.Random disasters, discoveries and such go here. Repeat from 1.

You probably don't ever have to worry about checking for collisions, since you can just tell any sprites to move to the right positions. The most advanced actiony stuff you need might be particle effects (they're fun, and can do very complicated things without premade graphics).

All of the above will need quite a bit of scripting, but it's also mostly monkeywork. You can add variables to objects on the fly so that you can keep track of what planet they're around without checking for visual proximity. A simple script call can move a sprite to another's position.

All the input can happen via buttons, each having a function call that checks what's possible. Some open another GUI control with further options, others just shift numbers around. Play around with bare GUI elements and see what you can make with them.
#4
04/04/2010 (11:59 pm)
So far nothing I don't think I can't wrap my head around. Only thing I'm really worried about is AI as I've never even dealt with anything remotely like that. I'll deal with that can o worms when it jumps out and bites me though. In the mean time, I've been digging through the docs and while I can find reference for all the elements of the GUI, I can't seem to find a single tutorial on how to use GUI Builder. Am I missing something? The only link I can find that even mentions GUI Builder is:

http://www.garagegames.com/docs/torque/general/pt02.php

and that autoforwards back to http://docs.torquepowered.com/

Is there a reason the docs are gone? Has GUI Builder been replaced with something better? Any lil nudge would be appreciated.

J^2
#5
04/05/2010 (1:46 am)
AI programming is the art of looking good while faking it. Maybe you can come up with some canned strategies based on playtesting to *look* clever :)

There might be a GUI bit in one of these: t2dtutorials.com/
It's not very hard to use the GUI builder once you know it…but it suffers from a dreadful GUI :P
#6
04/05/2010 (9:32 am)
Franzen,

You can definitely do this with TGB. I started working on something similar to this a while back. It was a Turn Based Space Strategy game, that switched to real time when resolving battles. I actually made some decent progress on it. It could generate an entire galaxy(a big grid) of solar systems where each solar system had different planet types and resources. I could build ships, give them move orders, and engage in combat when two enemy ships entered the same solar system. I only stopped working on this because I wanted real time networking for the multiplayer which TGB doesn't really support. I am waiting for the release of Torque2D and I will pick this game back up.

Anyway, what you want is definitely do-able. The only thing I suggest is to figure out a way to manage all the data that you'll have to keep track of. I integrated TGB with a sqlite database to keep track of everything(The status of every ship, construction queues, etc,etc.)
#7
04/05/2010 (9:45 am)
Excellent. Good to hear Kenneth. That sounds strikingly similar to what I'm thinking of, sans real time combat. I'm leaning more towards Civ Rev in space, but with a more complex combat system akin to a TCG where you have a stack of cards ("commands") which can be either aggressive or defensive ("Fire Phasers!" or "More power to shields!"). I think this would add an interesting element to the game to keep the combat more interesting then the usual rock, paper, scissors style combat you see in many turn based games.

If I may ask, how long did it take you to get to where you are now, and what level of programmer/designer were you when you started?

J^2
#8
04/05/2010 (11:58 am)
I've got a Bachelors in Computer Science and have helped release a few games for the DS. At the time I think I had TGB for about 7 months before I started working on this project. Before TGB I had never worked with Torque. So I guess I have a decent amount of programming experience but I am by no means a master of it.

It took me about 4 months of work to get where I am on this project. But that's just because I only had a chance to look at it on my free time after work. And sadly there were a lot of days where I was just too tired to even think about it. If I had worked on it diligently every day then I probably could have cut that time down in half.


Your game concept sounds pretty fun. It will be interesting to see how that turns out. Good luck with it!
#9
04/05/2010 (1:41 pm)
Good to know. And thanks for the encouragement. It'll probably take me months to get into the groove, but hopefully things will be calm enough at work that I will be able to dedicate most of my time to this. Going through the tutorials out there now. Seems pretty straightforward so far. I'll post once I have something more to ask/tell. Cheers,

J^2
#10
04/05/2010 (4:21 pm)
Quote:Am I fooling myself in thinking that I can figure this out?

Certainly not! It's those who think they can build their game without having to figure anything out who are fooling themselves. :-)