Sign in to follow this  
code_nerd

Where to start for RTS games?

Recommended Posts

Hello community, i am quite new to game programming and i now plan to code a small RTS game. I think of something like a very simple version of C&C I or Warcraft... i think this is a possible project if i plan a couple of years to finish it (doing it alone except sound), or? Now I`d like to know what ressources are best for me to read (Tutorials, books) i found "Strategy Game Programming With Directx 9.0", but the comments on Amazon are not the best (it doesn`t seem to cover a whole game, which is also quite important for me). Any suggestions what i should read? GFX are not so important for me, i`d like to do more in designing a funny game, so gfx like the first C&C would be more than enough (is this already called 3D!? Or is it this "iso whatever"?). What i really like to read would be a tut/book that covers a complete RTS game inc. the game loop and worldeditor. Or maybe you can give me a "walkthrough" what to read best for my purpose. Many thanks for your time.

Share this post


Link to post
Share on other sites
Well to be honest, there exists no such book that I am aware of. Right now I believe I have the 3 main resources for RTS game programming:
Strategy Game Programming With Directx 9.0
Isometric Game Programming With DirectX 7.0
Real Time Strategy Game Programming Using MS DirectX 6.0

Other than that there are not that many resources. There used to be this great page someone made that contained about 20 or so lessons for a RTS game, but I cannot find that page any longer. I will see if I can dig it up somehow.

Your other alternative is to use something like Torque and get the RTS library for it. That will cost you about $150, but is the sure easy way make a rts game. Other than that you are on your own with 'what to do'. THere are tons of various RTS demos out and about you could probabally look at, but none will teach you what you need.

I think the strat game programming book is actually decent. Nothing actually tells you or walks you through making a real game. Rather they tell you all the techniques you will need to use and so on. Basically you will be taking a whole bunch of ideas and merging them into one product.

Hope this helps some. Feel free to ask anything else about those books or rts stuff, but the main thing is that there really isn't much avaliable nowadays. There is a game that has released source code, Glest that you could also learn from as well. On that note, take a look at this game as well. It was made using GLFW, a framework for OpenGL.

- Drew

[Edited by - Drew_Benton on February 8, 2005 5:44:48 PM]

Share this post


Link to post
Share on other sites
>Other than that there are not that many resources. There used to be this great
>page someone made that contained about 20 or so lessons for a RTS game, but I
>cannot find that page any longer. I will see if I can dig it up somehow.

wow, such a page would def. help, would be very cool if you could
find it again.

The books you mentioned, has anybody actually read on of these? The comments
on amazon are not the best, so i am not sure if i should buy them... and
in germany here, they don`t have many english books in store, so i can`t take
a look myself.

>you should look at Machinations. it's an open-source rts using openGl. with
>that, tutorials, and practice, you should get yours to work :-). you can find
>the source here.

Thanks, i will take a look on the code, the GFX are 3D (i don`t want GFX like
these, more these oldschool Iso2d (or Iso3d?) stuff they used for Warcraft or C&C 1) but the gameloop will be the same i suppose.

BTW, How exactly is the GFX style of C&C I and Warcraft called? Is it Iso-2d, or
Iso-3d or what?

Share this post


Link to post
Share on other sites
The graphics style the original Warcraft and C&C are using are either isometric (2D) or plain 2D without overlapping. (As what I've seen, Warcraft 1 looks like the latter).

About the book, I've never read it, but no book could teach you how to build a full-featured game, even if it's just because of the fact that by doing things /wrong/ you learn how - and more importantly why to do something the other (good) way.

As for open source RTS games, you'd surely be able to learn a lot from them, but not if you don't have any coding experience. And even then, you might be easily overwhelmed by the amount and complexity of the code.

So, if I'd be you, I'd do this:
- If you aren't into programming already, pick up a language and get into the thing. Make yourself comfortable with statements, loops, functions, classes, and above all, the standard library supplied by the languages. Most tutorials and books teach you all of this.
- If you came that far, then get into game programming. Learn the basics of the API you want to use, and start experimenting a bit. Make some smaller games and see if you like to do it.
- If so, start focussing on an RTS. First get in your head what exactly you want to make, and slowly start progressing towards it. Make a nice menu, a basic map that can be scrolled, add some objects/buildings, and get the functionality implemented.

Good luck with your project, and don't forget keep us informed :P

-
Sijmen Mulder

Share this post


Link to post
Share on other sites
>- If you came that far, then get into game programming. Learn the basics of the
>API you want to use, and start experimenting a bit. Make some smaller games and
>see if you like to do it.

Yes, i think i am that far ;)

So the game i want to design is a simple RTS with 2D-Isometric view (as i know
now from you).
So which API/Libs is the best to use for this 2D-GFX (i am from unix/securitycoding, so i don`t know much about Windowscoding except it uses a MessageQueue that you can hook with event statements).
Is Directx my tool of choice?

>- If so, start focussing on an RTS. First get in your head what exactly you
>want to make, and slowly start progressing towards it. Make a nice menu, a
>basic map that can be scrolled, add some objects/buildings, and get the
>functionality implemented.

Sounds like i did it with security all the time, well nothing new here
for me (i mean putting `lil peaces of wisdom together to build the thing
yourself).

Any tutorials for my 2-D RTS that could be worth reading out there? If please
post them here, many thanks in advantage. I am most interested in an
Worldeditor for iso-2d and the "scrolling a map" thing.

Many thanks to all posters, you already helped me quite a lot!
Really nice community here! :)

Share this post


Link to post
Share on other sites
Since I'm (somewhat) a moron (or, as some of you may know, teh sux0rz), i'd like to make a point clear: there is no such thing as iso-2D, this is a language abuse. The isometric word refers to a projection of a 3D world to a 2D representation. Its goal is to preserve distances (modulo a scaling factor).

iso-2D doesn't have a real meaning - projecting 2D to 2D in a way that will preserve distance is commonly known as scaling :)

(now, stop kicking me in the face with your feet, it hurts :D)

Regards,

Share this post


Link to post
Share on other sites
What kind of tutorial are you exactly looking for? I really don't think there are many tutorials that teach you how to make an RTS from the ground up.

On the programming/API thing though, if you're comfortable with C/C++ I'd go with SDL, Allegro, or other simular API's. (My preference goes to SDL due to it's simplicity, while it isn't so high level that it can be considered an engine. Just right for displaying some sprites and getting input/output.)

Share this post


Link to post
Share on other sites
well, scrolling a map is not quite a difficult thing. you will have to work with "real" coordinates (that is, if you have a map of 50x50 tiles and the tile size is 32x32 pixels, these "real" coordinates will span on the intervals for both x and y in [0..50*32-1]).

you will need a "viewport" of, let's say randomly :o), 640x480 with a (left, top) into that [0..50*32-1] interval. you will need to cut these values to the 50*32 - 1 - 640 and 50*32 - 1 - 480 so that when you will scroll, you won't go outside your map.

if you want to display the "viewport" simply loop for x in left/32 to (left+640) /32 and y in top/32 to (top+480) and display the tiles.

basically, there will be several scrolling "inputs": scroll by mouse, scroll by keyboard and scroll by scripting. meaning:

1. scroll by mouse: when the mouse is near the edge, scroll in that direction. in my rts engine, i have 8 controls (control as in gui controls) that are invisible and are placed at the screen edges. when the mouse is over on control, this control will simply notify for scroll the "widget" (i called it battlecontrol) that displays the map.

2. scroll by keyboard: simply affect left and top by a delta. in my engine, the battlecontrol "widget" has input focus, so it will simply affect its left and top.

3. scroll by script/triggers: you may want to do cinematics, eg move the viewport so that to show the player things on the map. there are many ways of doing it, i did it using a mission script that eventually asks the battlecontol to set the viewport left and top.

if you need, i can post more about rts topics. or you may take a look at my work PPTactical Engine. it's an opensource effort and it comes with some documentation (not on low-level topics, but on engine design).

Share this post


Link to post
Share on other sites
Quote:
Original post by Emmanuel Deloget
Since I'm (somewhat) a moron (or, as some of you may know, teh sux0rz), i'd like to make a point clear: there is no such thing as iso-2D, this is a language abuse. The isometric word refers to a projection of a 3D world to a 2D representation. Its goal is to preserve distances (modulo a scaling factor).

iso-2D doesn't have a real meaning - projecting 2D to 2D in a way that will preserve distance is commonly known as scaling :)

(now, stop kicking me in the face with your feet, it hurts :D)

Regards,


Iso-2D, and Iso-3D would mean 2 different things, and are examples of language Change. they refer to the 'view' the users sees, and how the view is generated. 2D Looks 3d, but is done totaly with 2D files, where as 3D takes a 3D model, and flattens it onto a 2D screen.

The term is 'correct' but 'incorrect', depending on who you are. :P understanding win.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this