Larger Games?
BlitzMax Forums/BlitzMax Programming/Larger Games?
| ||
So I'm currently programming my 4th attempt of a real time strategy game and with each attempt I've changed my approach entirely. A lot of the examples that come with Blitz are small, coded practically procedurally in 1 file and this effects the way its coded. I'm curious for large project, how is the code/files/syntax organized? How do you think a MMORPG like wow is organized? What approach is taken for large projects? |
| ||
I make a file for each type or group of types and that keeps it nice and simple :) |
| ||
The big MMORPG's are highly optimized database back-ends with multiple clustered servers etc... I would highly recommend that you just focus on making something with multiplayer capabilities before jumping into any kind of massive multiplayer scenario |
| ||
Try downloading the source for a major commercial title like Quake 3 to get an appreciation of the structure.. http://www.idsoftware.com/business/techdownloads/ You should aim for keeping code seperated as Nate suggested... If you code up a TUnit for yout RTS, imagine how you could use that type across several apps and not just the one you're doing now. Even if you think you'll never use it again, this approach helps keep things modular. If you're into OOP (if you're not you should be ;) ) you might decide on a base unit TBaseUnit, then later derive game specific units; TLandUnit, TFlightUnit etc. I'd keep all of those as seperate files. It doesn't mean you need dozens of seperate files to start with.. there's nothing wrong with coding TLandUnit and TFlightUnit inside the TBaseUnit source file while developing, but ultimately they probably won't want to stay there. You have to keep Type design and the dependencies tight too. If you take TBaseUnit over to another app, will you really want a TImage embedded in it for it's sprite? You could later take TBaseUnit into a 3d game, where it's represented by a 3d model -- again, I'm not saying you ever will, but having looked at your type design from that perspective will help you see where things really belong. |
| ||
I'm definitely not making a MMORPG, just curious about the structure/organization. Thanks for the link and the tips guys!! That helps out a lot!! A LOT!! I feel like with programming the more I learn the more I love it =D |
| ||
Computers are the only thing that will do what they are told... programmers are control freaks LOL |
| ||
Yea, i know some of them that would make terrifying dictators! |
| ||
I think there are two potential ways to approach larger projects with BlitzMax... 1. Go modular and build up a framework of modules. 2. Use a core bmx file to link all the dependecies together (helps prevent cyclic dependecies a problem I keep getting but that may be a design problem on my part!). NB both approaches are not mutually exclusive! I think it would depend upon the how large you are going? |