Jump to content
  • Advertisement


This topic is now archived and is closed to further replies.


RTS concept ?

This topic is 6589 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 on going forward with a multiplayer RTS, and I have some questions I must consider before venturing forth : - Let''s suppose I have CBuildings, CUnits, CPlayers and CMap, 1) Should I make Buildings & Units dependants on players or on map ? 2) Should I use a Class for each building ? 3) Same for Unit ? 4) What are the trap-holes in this kind of game, based on ur personnal experience ? 5) Did I forgot something to consider ? Regards, el-nino

Share this post

Link to post
Share on other sites
OK, These are my answers (or how I''m planning on doing it in my RTS)... I''m sure someone''ll disagree with me.. lol

1) Each map location points to the building/unit there (to make collision detection easier) and each building somehow references the player that owns it (either an ID or a pointer)

2) Yes you should have a general Building class that defines all the basic, common properties nad behaviour of ALL buildings, and then each individual building TYPE (individual buildings are instances of that class) that does something different to all the others should inherit from this class

3) Again.. have a general class that defines basic behaviour, then child classes for individual unit types, and instances of these classes as individual units

4) Balancing can sometimes be a pain.. especially if you''re trying to play and balance at the same time.. Watch several other ppl playing it and see what they get frustrated with, or are able to do that they shouldn''t do...

5) With respect to what?? the map? overall? or what??

Share this post

Link to post
Share on other sites
On your fifth question. What about a story? I think a good story is a REQUIREMENT in RTSs. Just like an RPG.

The Shining Knight

Share this post

Link to post
Share on other sites
Thanx for the replies !

Well, I was looking for model of structure for such a game;

For example, I''ve considered and started to work on different classes, but I don''t want to hit a dead-end, so it''s why I ask what I should be aware of..

For example, how would you design a Tile on a map ?
I''ve used a lot of things in this class, like

- pointer to CRessource (if any)
- pointer to CBuilding (if any)
- pointer to CImage( with different functions like animate...)

- char * m_szDescription;
- and lots and lots of others variables...

I just want your suggestions on how to design a map for a complete game (in the way of C&C) and what are the main considerations ?

Thanx again,



Share this post

Link to post
Share on other sites
Here''s how I woudl do buildings. This may not be the best way, but it woudl lend to highest user-customizability, something that i find to be important in games. Think what Half-Life would be without mods....

Anyway, I say making a generic CBuilding class. This class is structured so that a set of properties (ick, i mean variables, VB is destroying me! ) defines how the building acts and what it does. Lots of games implement this style of thinking to at least some degree, including WarCraft II (although they still hard-coded more than i would like). The class should be versatile that a building can be anyting from a power plant to a unit factory to a telsla coil, or maybe a combination. Then the properties merely need to be read in from data files, and the values loaded into an array of instances of the CBuilding class. Simple enuff? (at least in concept, it may take a bit of coding to do it right, but u will NOT be disappointed).

Here''s an example:

Let''s making a "town hall", Warcraft style, although using a slightly different property system. Here''s an example of properties that we might be setting to true, written in plain English. Any other properties would be set to False, and there would certainly be quite a few "other" properties

* Building Style - Normal (other choices might included Defending)
* Can Train Units - yes
* Units That Can Be Built - 1, 2, 3 (1 would be peasant, and 2 would be the Keep updgrade and 3 would be the castle upgrade. such a list could contain any number of trainable units. may also include data for placing the unit training buttons in specific place on menu)
* Can Acccept Gold- True
* Can Accept Wood - True
* Health - 1200
etc etc u get the idea

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!