Jump to content
  • Advertisement
Sign in to follow this  
trevaaar

Writing an RTS

This topic is 4849 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I'm planning my first RTS. Unfortunately I know almost nothing about writing an RTS [crying]. I do know DirectX and C++ fairly well, so that isn't a problem. The main issue I have is the game specific logic (AI, unit/building management, map techniques, scripting, etc.). I can't seem to find any good books on the subject of RTSes either. I've read "Strategy Game Programming With DirectX 9.0" but it was next to useless (I even reviewed it here to say so), covering very little useful material. Does anybody have any serious recommendations on where I can learn RTS programming? [help]

Share this post


Link to post
Share on other sites
Advertisement
Perhaps you are getting in over your head a bit?

You didn't give much info about it. Is it 2d or 3d ? Is is multiplayer(god I hope not)

A 2d RTS probably wouldn't be much different than most other tile based games.

Any more info?

Share this post


Link to post
Share on other sites
Yes I may be in a bit over my head... any suggestions for something simpler (not too simple though, I can write Tetris in my sleep)... Most of what I need to know is not really graphics related (as I said before, I already know DirectX passably well). What I need to learn is stuff like AI, unit management, resource management and scripting.

Share this post


Link to post
Share on other sites
Hi,

I'm working on one too.

I restarted a lot, because every time I came to a point, I thought of a "better way" to do it.

Make a mini RTS with just a couple of different unit types. No bulding, just so they can move around and attack each other. Give them statemachines for the AI.

This way you lern a lot and you will know better how to do the stuff.

Once you know statemachines and goal base ai stuff. Buildings and a techtree won't be that hard.

[edit]
a good book for ai and movement (which is part of ai)
Mat Bockland: Programming Game AI by Example
[/edit]

Share this post


Link to post
Share on other sites
If you have done a game before, that will help the most.
other than that you will probably do many things wrong the first time (as dragongame mentioned).
You will need a landscape render engine (2d or 3d), then you need to render units and objects on it and finally put everything to life with findway, AI, effects, explosions and general game logic (you should write a concept how a typical game is played when you start with this stuff).

And as always I suggest starting with a very small project and not working for years on a RTS on your own.

Share this post


Link to post
Share on other sites
Yeah man, that book was freaking useless... (the "strategy game programming" one)

Anyways, as far as I know, there isn't really any good place that will teach you how to make an RTS from start to finish. Here are some assorted thoughts:

1. Read articles: pathfinding, decision making, terrain analysis. Don't bother with complex things like squad tactics at this point, imo... Recommended books: AI Game programming wisdom, Game Programming Gems, AI Game programming by example which has already been mentioned.

2. Make small demos which exhibit some aspect of RTS programming. For example a demo that shows pathfinding through dynamic, complex environments.

3. If you do decide to go ahead and start an RTS on your own, I'd suggest using a pre-existing engine to handle a lot of the "dumb stuff" for you, like rendering basic models, handling low level resources, etc.

4. You could try joining an existing online RTS project. This way you can see what others have done, get straight to the "fun" part of the coding, and potentially have something really good to show on your resume if you go into the game industry. Check out 0 AD by Wildfire Games if you're interested. This is a huge, ambitious project which probably has at least 1 or 2 years more until it will be complete, but the result will be amazing on an epic scale :) I worked with them a couple of years ago, and since then I've been keeping my eye on this project, so I can tell you that these guys have what it takes to finish their game. These guys are serious though, so only apply if you can work 15+ hours a week, and can commit to at least 6 months.

Anywyas, you should also consider what your goal is... Do you want to become a better game programmer and learn new things? Do you want to create something to show employers? Is your goal creating the RTS for its own sake?

If you want to learn and improve, there's no reason you need to write an entire freaking RTS to do it- so make small demos.

If you want to create something for employers, either do small demos, or join an existing group like Wildfire games.

If your goal is to create an RTS and you don't care about anything else, then go ahead and create an RTS. You might spend lots of hours doing tedious work like GUI and polishing/tweaking, so it's not the best way to improve as a programmer. There's also a good chance the project will fail, so you may end up with nothing to show employers. But, if making an RTS is what you really want to do and you got the determination to spend years of your life on it, go for it

Hope that was somewhat helpful :)

roos

Share this post


Link to post
Share on other sites
A RTS Game is as hard to make as you decide. Most of the problem is to display a lot of units at the same time and still have the game running smoothly. Then of course make the AI a worthy opponent, which in fact is a major problem!

If you decide to make a 3d RTS, think about having the logics/gamecode running in 2D. Like you can have 3d models instead of sprites.. However, there are a couple of keythings to check out before you start. (if you know all the graphics code).

1. Statemachines (so that you can controll AI for each unit easily)
2. A* / Pathfinding (so that your units won't collide, and find the right path)
3. Tools, you will need a mapeditor, if you're not using another games mapformat.
4. Scripting. I recommand LUA and the 3:rd party lib; LuaBind. It will get you started very fast!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!