Game Development Community

Questions about RTSkit

by Jonathan M · in RTS Starter Kit · 01/12/2005 (7:22 pm) · 5 replies

Hi,
I have some questions about the RTSkit I hoped I could have answered while my team is in the Planning stage.

1. Does RTSkit have any built in collision detection? I noticed the units walked through rocks and trees. If not, can this be scripted?

2. Does RTSkit handle unit AI or have default unit actions like 'target-seek' for AI computer opponents? Will this have to be hardcoded if not?

3. Does RTSkit have any means of handling Line of Sight and darkening or shadowing of 'un-viewed' terrain in the game window? I noticed this was implemented by someone in the minimap. Can it be scripted?

4. Does RTSKit handle individual weapons physics or have any physics (i.e. for a V2 rocket firing or a hail of arrows) at all? If not does this have to be coded into the engine or scripted?

5. Does the RTSkit have any unit pathfinding algorithms(for navigating complex maps with collision detection on) or must these be coded/scripted?

6. Can the Camera zoom interval be changed via script?

7. Can the 'create server/join server' section of the codepath be removed for a single player campaign?

8. Can the terrain/worlds be dropped in favor of a custom modeled interior for a map, i.e. a Spacestation interior map?

9. Can the RTSkit engine be modified via script to the point that you can create a 'squad based' RTS (Warhammer40K) or a 'hero based' RTS (Warcraft)?

10. Whats the maximum units per scene tested/known?


Thanks a lot guys. I've been impressed the the excellent developer support on these forums and the incredible work you guys have done. I downloaded the 'villager-build' zip and I was superbly impressed. Keep up the good work!

#1
01/12/2005 (10:57 pm)
Some very nice questions, and I just wanted to post that I "intend to post!" answers to them as best I know come tomorrow...just didn't want you to think this post was being ignored!
#2
01/13/2005 (3:31 am)
Hi, thanks for the questions and interest. :) I tried to provide good answers below, though I unfortunately had to be a little terse, since it's late and there's a lot to cover here...

1. Does RTSkit have any built in collision detection? I noticed the units walked through rocks and trees.
It doesn't come stock with a pre-defined collision scheme, but you can implement your own without too much trouble. Depending on your game design and the kind of collision scheme you want, this could be very easy to do in script.

We didn't ship a collision detection scheme in the default RTS SK because collision detection for RTS' can be very design specific. For example, the collision scheme in WarCraft3 is *very* different from what you might want to have in a small-squad, tactical strategy game.

If you want to do simple WC3-style collision, it's very easy to do, and (as long as you don't have very fast moving objects) you could even implement the entire system in script (though it'd be faster in C++).

If nobody else does it before me, I'll probably provide an example collision implementation for the RTS SK in the resources here in the forums sometime in the next several weeks. I know people are interested in it, so when I get time, I'll provide an example. I don't really feel comfortable putting something like this that would be hard to customize and is very design-specific into the core RTS SK, but providing an example in the resources is certainly an option. We'll think more about whether to provide a default implementation in the core SK too.

2. Does RTSkit handle unit AI or have default unit actions like 'target-seek' for AI computer opponents? Will this have to be hardcoded if not?
The response here is very similar to the above for collision detection. AI is another area that gets very design-specific, very quickly. Also, we had to cut off the features of the RTS SK at some point... otherwise there's no way we could've justified selling it for so cheaply. Remember too, this is a "Starter Kit"... it's not meant to give you everything you need, but enough to get you up and running making your game much faster than you ever could on your own. It does a very good job of that.

Like collision detection, I may be providing an example implementation in the next several weeks here in the resources section, if one of the awesome guys out here doesn't get to it before I do.

3. Does RTSkit have any means of handling Line of Sight and darkening or shadowing of 'un-viewed' terrain in the game window? I noticed this was implemented by someone in the minimap. Can it be scripted?
To be clear, you're asking about "fog of war" on the terrain / in the game world, right? This is a topic that has come up before in the forums here. Please check out the previous thread on the subject, where a very nice, informative discussion between Stephen, Ben, myself, and others formed. Reading that thread should answer all your questions. I'm sorry I don't have the link handy, but a quick search should turn it up in no time at all.

(continued...)
#3
01/13/2005 (3:36 am)
4. Does RTSKit handle individual weapons physics or have any physics (i.e. for a V2 rocket firing or a hail of arrows) at all? If not does this have to be coded into the engine or scripted?
I'm not sure I understand the question. Are you basically asking whether weapon projectiles can have physics applied to them? If so, yes, they can. And these can be scripted. However, I'd make a few notes here:

First, in order to save network bandwidth, RTS projectiles aren't networked. So, iby default, you could have "physics" on projectiles, but this would really just be for client-side-only rendering. At least, you'd need a very predictable, deterministic physics set-up on your projectiles if you did want the physics to be for anything more than looks, so that the server and client simulations match up corretly. Really though, you should consider the trade-offs here carefully. Doing a rough projectile simulation is usually a great solution for these systems... eg I fire a projectile, it travels at x m/s and has y% chance to hit. Even for strategy games with a relatively small number of units to manage, such a simplified projectile system can look great. If you don't use such a system projectilies can very quickly eat-up network bandwidth on their own, and especially if you have strange physics being applied individually too them. This is not a defect in Torque or the RTS SK (in fact, Torque's networking is, honestly, the best around, so if you were going to do something like this in any engine, Torque would be the best choice). If I understood your question correctly... doing that stuff is simply costly, in any environment, so you'll want to be very careful about how you design and set-up a projectile physics system, if you truly want to have one.

5. Does the RTSkit have any unit pathfinding algorithms(for navigating complex maps with collision detection on) or must these be coded/scripted?
No it doesn't. Again, this was a feature we couldn't justify implementing in such an inexpensive Starter Kit.

Moreover, if you just need basic pathfinding, there are dozens of really great implementations available online or in books like AI Game Programming Wisdom 2. Doing RTS pathfinding, especially such that it arbitrarily supports the very wide variety of environments Torque-based games are capable of throwing at them is a major chunk of work, but if you just want a basic, passable pathing system (a la WarCraft 3), it's not hard to get up and running at all. Again, there are numerous outstanding resources online and in books to pull from on this issue.

6. Can the Camera zoom interval be changed via script?
I actually don't remember off-hand if this is set in script or the source code. You can grep for a function called something "setOrbitHeight" though to determine for sure yourself. I'm sorry I can't answer this one definitively. I'm on a brand new laptop, and I don' thave my work environment set-up yet, so I don't have access to the RTS SK code here. However, I'm sure someone else can jump in and answer this one very quickly, or, like I say, you can search for it yourself too.

(continued...)
#4
01/13/2005 (3:40 am)
7. Can the 'create server/join server' section of the codepath be removed for a single player campaign?
It's easy to create single player games.

8. Can the terrain/worlds be dropped in favor of a custom modeled interior for a map, i.e. a Spacestation interior map?
You'd have to some custom work (and some of it would be rather heavy lifting) to do this. In some places (the RTSUnit processTick() function, and the methods it relies on, in particular), the RTS SK assumes that there is terrain to walk on.

9. Can the RTSkit engine be modified via script to the point that you can create a 'squad based' RTS (Warhammer40K) or a 'hero based' RTS (Warcraft)?
The features that the RTS SK provide were all designed to be as flexible and extensible from script as possible. For the most part, we achieved our goals there. So, yes, the RTS SK can be modified as such from script. That said, if you want to create a full game, you're simply going to have to do some things in C++, somewhere along the timeline of the game's development. Well, speaking in absolutes often gets you burnt... I should say that most any game design would require some custom C++ work. But, our goal with a Starter Kit isn't to eliminate all custom work you might have to do, but to give you a big leg up in your game development, and provide a nice, basic framework on which to build your game and realize your specific design.

10. Whats the maximum units per scene tested/known?
The maximum number of units per scene depends on a number of factors. Some very important factors include the complexity of your unit art, and of the operations you're performing per-unit. So, there's no way to give an honest, straight answer to this question. Still, you can see a previous thread in this forum which did some nice profiling on the RTS SK with various numbers of units running around. You can also see from the SK's screenshots that we've had a *lot* of units going at once, and on very low-end hardware. So, we're very happy with the RTS SK's performance as-is.

Hope those answers helped some. See you around more, I hope. :)
#5
01/13/2005 (6:44 pm)
Excellent answers thus far, thanks a lot! I didn't expect a GG developer to answer them! wow, i'm impressed. Thanks again. This really helps put alot of things in perspective for me.

I'm not a game developer by any means. My 3D experience is programming a few chapters in a few Direct X beginner books and getting a Triangle on screen. I've -have- however been programming standalone business and network applications for year and years with the goverment. Now I'm trying to convince several of my gov programmer friends that making a game in Torque is not only possible, but doable. I've been working hard on the RTS kit to get to the point where I can understand it and hopefully suitably impress them into joining the project.

The community support here amazes me. My brains turns to soup when I have to do 3D math so I have a feeling i'll be visiting these forums quite frequently. :)