how to make a Real-Time Strategy Game(RTS) using OpenGL

Started by
19 comments, last by stonemetal 16 years, 4 months ago
First of all,,what are the RTS games that used OpenGL?? how to make one?? do you know "Battle for Mandicor"?? the graphics are poor but the gameplay is good.. i mean,the collision,ai,Fog of war,etc. ive already made tetris 3d..im planning to make a "Mario" game..but for me its... uhmmmm,,,,i dont know..maybe BORING.. im sorry,,im poor in english.. so by the way,,i want to make an RTS game with 2D graphics!!! so please,,Professional Programmers,Artists,Game Designers..kindly help me.. THANKS!!!!!!!
Advertisement
Quote:so by the way,,i want to make an RTS game with 2D graphics!!!

Well....what are you waiting for then?

OpenGL is just a rendering engine, but if you've done a 3D Tetris using it already, you're probably familiar with it. (You'll need something to handle input etc, SDL for example.)

Quote:First of all,,what are the RTS games that used OpenGL??

Just search google/wikipedia. Probably the big ones which are cross-platform.

Quote:how to make one??

Well, you...you make one?

You will need something to hold your units. Make a unit class, and a game class which holds a list of all units. Then a rendering class (where you implement fog of war, sprite rendering, etc.). Then either put the logic in the game class or a separate class, then each update call getInput(), doLogic() and doRender(). And voila, StarCraft III is born.

But, honestly, your question is to wide to just give an answer to. Ask more specific things, like "I've implanted the A* path finding algorithm successfully, but the units sometimes go left instead of right. I believe the error is in this code sample." ~

"how do i make the great 2d rts?!! mario is to boring!" is not a good question.

Quote:i mean,the collision,ai,Fog of war,etc.

As it's just 2D and an RTS, you'll probably get away with a simple "bounding box" check between the units. There's probably a tutorial/paper on how to implement Fog of war somewhere on the internet. Just search.

Quote:ive already made tetris 3d..im planning to make a "Mario" game..but for me its...
uhmmmm,,,,i dont know..maybe BORING.. im sorry,,im poor in english..

I somehow think that you "copied" the "tetris 3d". Also, it might be boring when you start out. If it's your second game, don't aim too high. Go with something small, like a pong, simple space shooter (will learn you AI, collision detection, some scripting perhaps, 2D graphics etc.) etc.

Quote:so by the way,,i want to make an RTS game with 2D graphics!!!

Sure. We all do.

Quote:so please,,Professional Programmers,Artists,Game Designers..kindly help me..
THANKS!!!!!!!

Please ask more specific questions next time.
Check out my devlog.
hey thanks for your reply..

a*?? whats that??

question:
how to command the units to walk to a location and that/those units will avoid the rocks,trees,other units,etc.. i heard that's called "Avoidance"?? how is it done??


more simple games??? uhmm,, i dont know,,im too lazy to make games that doesn't enjoy me in the end.. like mario,,i really dont enjoy playing it.. sorry...

i really want to make RTS game..

im so sad that here in our country(philippines), we don't have teachers that teaches game programming..so im self-studying..

i really appreciate your reply guys...thanks!!!
Quote:Original post by macmoy
hey thanks for your reply..

a*?? whats that??

A* is a pathfinding algorithm. It makes entities find their way to a certain goal.

Quote:question:
how to command the units to walk to a location and that/those units will avoid the rocks,trees,other units,etc.. i heard that's called "Avoidance"?? how is it done??

Typically with a robust A* implementation.
Quote:more simple games??? uhmm,, i dont know,,im too lazy to make games that doesn't enjoy me in the end.. like mario,,i really dont enjoy playing it.. sorry...

i really want to make RTS game..

Don't take this the wrong way, but if you're too lazy to make a simple game, what makes you think you have the energy to make a complex one? Games are tricky applications to make. They require a LOT of boring extra work. That work can easily become even more tedious if you don't have experience from simpler things, since you'll end up redoing everything three or five times to get it right.

So do as the person above advised, make simpler games first. Much of what you do to create a simple sidescroller can be used in an RTS anyway.

Quote:im so sad that here in our country(philippines), we don't have teachers that teaches game programming..so im self-studying..

i really appreciate your reply guys...thanks!!!

Keep at it, and good luck.
-------------Please rate this post if it was useful.
aw..im sorry..i always push myself to create simpler games but when developing,,im losing my eagerness to make one..

why am i choosing to make RTS instead of simpler??

because i know in the end,,i can enjoy that game and its the start of making lots of RTS that can sharpen my skills..

what RTS game is made in opengl(C++)?? not BIG ones from example:blizzard,ubisoft..just the small ones..
Quote:aw..im sorry..i always push myself to create simpler games but when developing,,im losing my eagerness to make one..
Quote:Don't take this the wrong way, but if you're too lazy to make a simple game, what makes you think you have the energy to make a complex one? Games are tricky applications to make. They require a LOT of boring extra work. That work can easily become even more tedious if you don't have experience from simpler things, since you'll end up redoing everything three or five times to get it right.

--
Quote:what RTS game is made in opengl(C++)?? not BIG ones from example:blizzard,ubisoft..just the small ones..
Why don't you search (and find out)?

Honestly, I don't think the graphics API used is what "makes a good RTS". Most of the big ones probably have both DirectX and OpenGL support implemented. If you want to look at sourcecode for how "the small ones" has coded their graphics class, you should probably start smaller.
Check out my devlog.
Quote:
..im planning to make a "Mario" game..but for me its...
uhmmmm,,,,i dont know..maybe BORING..


O_O;;

Mario isn't BORING..

take care..!

Moving to For Beginners.
Expectations:
1) An RTS game should take you around 1-2 years to make by yourself
2) You will not find tutorials for making an RTS game


Advice:
It doesn't matter what games are made with what. C++ and OpenGL is a fine combination to make an RTS game, that's all you need to know. Most AAA games are made with C++. Most big publishers use DirectX b/c they already are forced to use it for 360 development & they don't care about supporting Mac and Linux. If you know OpenGL stick with it; there's no need to learn DirectX for your purposes.

The basic components you'll need to build for your game (in a rough order in which you'll need them):

Core Engine (framework that ties everything together)
Graphics system
Networking (if you will support multiplayer)
Physics System
Game Logic (ruleset/units/weapons/etc for the game)
AI system
Audio System
Particle System (a nice to have, not necessary for functionality)

Each of these are pretty vast areas and will require months to develop and understand.

As for how to move units research "A* Pathfinding" "Basic Physics"

For how to collide units research: "collision detection"

Like I said, each of these topics will take months to understand, so you can't possibly get full answers in this thread.

Think of this thread as a "where do I start" not a "how do i make this game" and you'll get a lot more out of it.

-me
Well, you haven't to code whole game. If you wanna create games, buy (or get) a licenced copy of game engine, which will take care of this. I'm writing a game engine and it's not easy to implement pathfinding, AI, physics, ... (and if you wanna create good rts. you need it. Well the truth is, that I use experimental algorythms for almost everything, which were tested just in demos, no game engine or game).

Try web www.devmaster.net, there's database of engines.

Althrough if you wanna create your own game using just programming - one small advice, build editors, it'll really help with building a rts game.

My current blog on programming, linux and stuff - http://gameprogrammerdiary.blogspot.com

This topic is closed to new replies.

Advertisement