Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / Need help on RTS

Author
Message
Red general
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: United Kingdom
Posted: 19th Nov 2002 22:21
Help…
I need it

I want to make a real time strategy game like command and conquer but in 3D! This is tricky as I only bought the software last week.

What I want to do is have a mobile construction vehicle which you can move around, and then turns into a construction yard (a fixed building from which all the buildings stem from). The player must then be able to make a barracks (for men) and position it.

On the right of the page I want to have a little window. On this window, when the construction yard is made, then a picture of the barracks appears on it, and when the barracks is set up, then pictures of men are added to it. These pictures are options of what to build and on clicking them, build the object (then men must appear near the barracks).

On clicking your men you must then be able to direct them, order them to attack, and see their health bar (which must go down when they are attacked). Buildings must also have a health bar which goes down when attacked. If the health bar of anything goes down to zero, that object must cease to be.

I also need for the player to start off with say $1million cash and each build takes money off this total. Once it reaches 0, they cannot build any more.

As well as that I need an AI player who will build one set of buildings and occasionally attack. It also must start with $1million cash.

Thank you for helping. If the script is too large to show on this page, then just e-mail it to me.

Thanks

P.S. include lots of Rem notes so I know how it all works
The Darthster
21
Years of Service
User Offline
Joined: 25th Sep 2002
Location: United Kingdom
Posted: 20th Nov 2002 00:17
You want someone to effectively make command and conquer for you? We can help you a bit, but since you only bought the software last week, I wouldn't advise making C&C 3d. I've had DB for a year and still not managed an RTS (not that I've tried too hard, seeing how hard it is). Ok.

MCV moving around - you'll need an MCV model, some terrain map to put it on (this will probably involve a textured matrix with different tiles, and a map collision array), a system to detect your 2d mouseclicks and translate them into 3d (tricky) then work out which unit has been clicked on/drag selected, unit selection flags, and a path finding algorithm (really tricky) so the MCV doesn't drive into the scenery. Another flag that is switched when the MCV is deployed to determine if you can build stuuf, if it can drive about etc, and another model of the deployed MCV.

Unit build window - you'll need to have produced sprites for all the unit types, plus the overall interface, and have lots of flags to determine which units can be built. Then a function to draw all the sprites in the right places, detect mouse clicks on the interface and start unit building with a timer function that doesn't allow any other units to be built simultaneously, then deploy the unit models near the barracks model, and add the unit to an array of units containing location and health data. Same kind of thing for buildings, but you'll need to place them on the map as well using the mouse.

Ordering men about - you'll need models of all the different units, plus cloned models to display more than one unit of the same type. Again, mouse click detection and pathfinding algorithms like with the MCV. A transparent sprite for each unit that displays a depleteable health bar, and flags for unit selection. Removal of the units from the unit array when the health is zero. The units must be able to attack, which means some sort of bullet collision system, unless the units are always accurate - possibly with a random attack strength for each burst of bullets. Deplete health of the unit being attacked in the unit (or building) array. Attack, moving, idle and death animations for each of the unit models will need to be made (quite hard according to some of the topics here). Explosion effects for destrction of tanks and buildings. Possibly lighting effects if you want the game to look nice.

Cash - a variable which holds the amount of cash you have, subtracted from if units are built, a simple check to see if the cost of the unit is less than the value of the variable.

AI - you really want to get some practice in before writing this. You'll need pathfinding algorithms, use the same ones as for player units, and also an order-giving routine, which will place buildings, send the ai units about and repair it's own base, not to mention different strategies depending on the sizes of armies, and the layout of the map. There's a lot involved in that.

So, any takers?
Red general
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: United Kingdom
Posted: 21st Nov 2002 17:09
Actually I only wanted advice and little snippets, but thanks for the advice, next time I will go more slowly. I owe you one... beer at my place anyone?

Thanks
Bye

Login to post a reply

Server time is: 2024-04-18 13:35:18
Your offset time is: 2024-04-18 13:35:18