• RTS Programming.
    15 replies, posted
Hay guys at the moment im looking for advice really and anything to point me in the right direction. Basically im in my second year of learning programming at university. i am studying "Computer games software development" and i am outlining a project to start and do over time. I am learning c++ and c#. Id prefer to do it all in c++ to be honest Basically the whole concept is going to be an RTS game, but i am going to start working on 3D. now next semester im doing 3d maths and physics, so get those lovely 3d matrices rolling........ But anyway on to the point, basically my RTS game is going to follow the idea that warzone 2100 was built on, but not the same, as that's just silly! (oh and don't forget plagiarising!!) - [url]http://wz2100.net/[/url] Each vehicle is based on a series of parts, where as i will have a template which you choose armour type, weapon, propulsion and a special slot for extra stuff(like say a shield) now there are classes of templates, so tank(small large and heavy), bike, aircraft and boat(not sure really). Now how i would assume you do it is the template (so the actual main body part) has a bone structure, and each part a bone structure too. if this makes sense? obviously im posting this because im not sure Also last thing is i wanted to ask is actual 3d engine programming. what graphics engine do people suggest as a whole? and does anyone know of any recent books that i might be able to get hold of to help me with engine programming??
It does make sense, yes. You are talking about 3D mathematics, but there really isn't that much involved. You need to know basic linear algebra (e.g. what is a vector and what does it mean to transform it with a matrix). Even if you have to write this stuff yourself, you really just need to look up the formulas on the internet, implement them in some function and you're done. And then, the choice of the graphics engine has some factors. Such as, how low-level do you want it to be. What features it should support out-of-the-box or easily implementable. What platforms it shall support. I had a good book about game programming, but I don't remember the title and I gave it to a friend.. It's midnight here, so I can't ask him...
[QUOTE=ZeekyHBomb;18805148]It does make sense, yes. You are talking about 3D mathematics, but there really isn't that much involved. You need to know basic linear algebra (e.g. what is a vector and what does it mean to transform it with a matrix). Even if you have to write this stuff yourself, you really just need to look up the formulas on the internet, implement them in some function and you're done. And then, the choice of the graphics engine has some factors. Such as, how low-level do you want it to be. What features it should support out-of-the-box or easily implementable. What platforms it shall support. I had a good book about game programming, but I don't remember the title and I gave it to a friend.. It's midnight here, so I can't ask him...[/QUOTE] Its only eleven(evening) here! erm well im looking to go around the medium graphics scale. so around the same kind of quality of spring(RTS engine which TA spring uses) - [url]http://springrts.com/[/url] But i wouldn't expect such good qualities. ive been reading articles on terrain and such and once i have a decent amount of knowledge of creating a basic engine (low polys and such) ill probably start work on testing out terrain. The 3d maths i am going to be fine with, as second semester covers it all. got basic knowledge of 2d matrices and such. platform wise im going to build it solely on win32/64 with thread optimisation and the likes. But at the moment need help on the actual design of the vehicle structures(how it will all work) and buildings. think that answers most of your questions.
Post below beat me to it.
BAM: engine database - [url]http://www.devmaster.net/engines/[/url]
[QUOTE=Chandler;18805432]BAM: engine database - [url]http://www.devmaster.net/engines/[/url][/QUOTE] had a look at some, but that doesn't resolve my main question, although it is bloody useful! looked through a few of them. so many i couldn't take my pick.
no one?
I'd have an enum of the available types per part, so e.g. [cpp]enum ArmorParts { ARMOR_IRON = 0, ARMOR_TITAN = 1, ARMOR_EFIELD }; enum CannonParts { CANNON_REGULAR = 0, CANNON_SUPEREXPLOSIVE, CANNON_EMP, CANNON_BIOLOGICAL };[/cpp] And then factories with a simple switch: [cpp]ArmorPart *CreateArmorPart(ArmorParts type) { switch(type) { case ARMOR_IRON: return new IronArmorPart(); case ARMOR_TITAN: return new TitanArmorPart(); case ARMOR_EFIELD: return new ElectricalArmorPart(); default: Log.err((format("Trying to create invalid armor-part %1%\n") % type).str()); return NULL; } }[/cpp] Using the base-class ArmorPart and letting other parts inherit from that, you can create various effects, extend it rather easy with new types as well as modify them easily. Another idea is to embed a scripting-language and defining the units and the parts there.
that might be an idea. basically when i design it aswell i need to think about modding capabilities. this is just an offhand thing. but i will load all the data from an outside source(so in the main game directory. im learning up a bit on more advanced IO schemes for my game. so i mean encrypted data files and models etc, like a usual game. but chances are it will end up not working ... always happens :P it is possible to load enums from file when defining?(obviously with the right inputs)
You mean enumerate at run-time? Well, you can do that using a map. The first entry would be a string, representing the name (e.g. "Iron Armor", "Titan Armor", "Electron Shield"), and the second a pointer or something to the construction-function. I don't know how script-functions get stored in memory, but that might just as well be different from language to language. The factory would then become alike this: [cpp]ArmorPart *CreateArmorPart(const string &type) { map_iterator iter = armorPartsMap.find(type); if(iter == armorPartsMap.end()) { Log.err((format("Trying to create invalid armor-part \"%1%\"\n") % type).str()); return NULL; } return ScriptEngine::execute(map_iterator->second); }[/cpp]
Ah yeh that makes sense. for actually scripting im not sure which language might be best, got a few choices. python and lua are the most common(not sure, but most i hear about). might get a mock up of the blueprint system for the vehicles this christmas. but got two other games to finish ¬_¬ (yay for text based games, and xna)
GameMonkey is a scripting-engine specifically created for games. Googles v8 also looks promising. I also took a look on AngelScript quite a while back. I don't remember much about it, but maybe it's worth a try. For a small game like this, performance shouldn't be too critical and these scripting-languages will execute fast enough for you. I'd say look at their Syntax and C++-integration to just make the choice a matter of personal preference.
What you'll want to do is start with units and unit ai, then work on projectiles and stuff. Then work on buildings, cash, gui ect.
Well if i get a solid idea, i might take it to a game company as a proposition. Thats how portal came about, uni students made a 2d mock up and valve bought the idea form them and put them to work on it. would be nice. but id ned to find a company willing. ive got the whole backstory as well. getting a writer to write it up and such. should be building a site within the next 2 years to present the idea as well. so any help is wicked!
[QUOTE=geinome_warr;18838295]Thats how portal came about, uni students made a 2d mock up and valve bought the idea form them and put them to work on it.![/QUOTE] It wasn't 2D. [url]https://www.digipen.edu/fileadmin/website_data/gallery/game_websites/NarbacularDrop/[/url]
Try out OGRE - it's just a graphics engine, not a game engine, but it's very clearly documented with tonnes of tutorials that outline pretty much everything in terms of user interface for an RTS. I think one of the demos might even be a simple one.
Sorry, you need to Log In to post a reply to this thread.