|
|
Or, use your gamerDNA username: (more...)
| ||||||
| |
![]() |
| | LinkBack | Thread Tools | Rate Thread | Display Modes |
| | #1 (permalink) |
| Registered User Join Date: Jul 2002 Location: Los Angeles California
Posts: 231
+8 Internets | Organizing a large project Anyone have some good reading material on how to organize a large project? My code is starting to get up there in size, right now its over 15k lines of code and I have a feeling it may top off at 30k before the engine is fully developed. I'm doing a lot of refactoring right now since I finished my dreambuildplay project. |
| | |
| | #2 (permalink) |
| Cracker ass cracker Join Date: Nov 2004 Location: Cave
Posts: 652
| Like my code at work, class libraries are your friend. Organize your code with namespaces and dlls based on their category. Example I have condev.tools - holds various objects that just help other code condev.physics - holds physics objects such as AABB objects condev.convert - will convert things for me. ie Collada to my model format and vice versa condev.command - handles all my command queues and base command objects this promotes reusable code so you spend less time reinventing the wheel. PS - 15k is nothing :P
__________________ Waiting for [mmo name] to save us from [last mmo we were waiting for] |
| | |
| | #3 (permalink) | |
| Registered User Join Date: Jul 2002 Location: Los Angeles California
Posts: 231
+8 Internets | Quote:
![]() 15k is probably about the size of a very basic minor system in a real engine im thinking... what do full engines go for now a days? is it 100's of thousands or larger? But to someone who has yet to write a very large program, 15k looked like a lot hehe. | |
| | |
| | #4 (permalink) |
| Registered User Join Date: Aug 2002 Location: Paris
Posts: 375
+1 Internets | I don't remember if this is already the case, but I strongly advise you to use some kind of versionning tool if you do not already. It's a must have, even for a personnal project like what you are working on. SVN is free and quite easy to setup for instance. |
| | |
| | #5 (permalink) |
| Registered User Join Date: Aug 2002
Posts: 3,902
+11 Internets | i think the old quake2 engine was a half a million lines. but that doesn't mean anything, its all about optimization. what good is 50 lines of code if 3 can do it faster? one thing to look at is how can you optimize the code better.
__________________ -its clobbering time |
| | |
| | #6 (permalink) |
| Registered User Join Date: Jul 2002 Location: Los Angeles California
Posts: 231
+8 Internets | need to write it first.. I wont start optimizing until I get to a point where it needs to run faster. I don't write 10 lines of code where 3 will work, but I also don't try to work out how to write a block of code to be the fastest it can be if its only goingt o be called every few cycles. |
| | |
| | #8 (permalink) | |
| upper management material Join Date: Nov 2002 Location: Orlando, FL
Posts: 2,198
+17 Internets | Quote:
CodeProject: Simple Source Line Counter in C# for C#. Free source code and programming help It ended up that the UI takes the most code. Oh and each of those categories below is a folder with multiple .cs files. I tried to distribute the code files into folders in a logical way. | |
| | |
| | #11 (permalink) | |
| collector of stuff Join Date: Feb 2006 Location: constitution beach
Posts: 863
+9 Internets | Quote:
Notes to help organize large code projects(some have been stated): 1.) Name and locate stuff appropriate within namespaces and classes that make sense. 2.) Use a version/checkin system. CSV(long time since college but I think that was free), always MS Source Safe for those in the standard windows business world, probably about a thousand other solutions out there too. Just check on google. 3.) It's hard to make a full UML diagram for a large project, especially if you program as you go because this is a personal thing. But do try. At the bare minimum map out a full high level-architecure, and at least classes and their basic function. 4.) Test again when you are done testing 5.) Set goals and checkpoints. Stick to them. Don't feature creep. Learn the resource triangle! I'm sure there are more as well. I've worked on huge software projects at both small and large companies as both developer and manager so I have a decent amount of experience and it still sucks. There is always crap that gets by or some idiot sales guy who tells you 2 days before it due that he just promised the client something that doesn't exist and now wants me to have my team stay all weekend to get it in! Fuck those dudes, I just tell them to screw now. | |
| | |
| | #12 (permalink) | |
| Registered User Join Date: Aug 2002 Location: Paris
Posts: 375
+1 Internets | Quote:
I will second the use of unit tests. But even though it look simple, it's not. Making good and relevant unit tests is not an easy task and is difficult to learn alone if don't have a minimum software developement experience but in the end the effort is worth it. As for the whole "optimize early" versus "optimize later" debate, I'm more on the later side. A program using a good algorithm will always be faster than an ultra optimized (and impossible to maintain/expand) program using a shitty algorithm. There are indeed some stuff you can think and do early on but it really depends on what you are doing. Last edited by Throag; 02-04-2009 at 03:04 AM.. | |
| | |
| | #13 (permalink) | |
| collector of stuff Join Date: Feb 2006 Location: constitution beach
Posts: 863
+9 Internets | Quote:
Been a long time since college.What I meant by optimize early was as you said...per function, per equation. If you write shit and then wait until your entire project is done until you notice that your crappy method of sorting/searching/calculating is taking 30 seconds it can often be too late. Or perhaps you change it to make it short and fuck up the job it does in some odd way you didn't realize the rest of your code relied on. Chain reaction type thing. | |
| | |
| | #15 (permalink) |
| upper management material Join Date: Nov 2002 Location: Orlando, FL
Posts: 2,198
+17 Internets | Haha the VG jokes never get old. ![]() Actually, the content folder is the vast majority of the MB size of the game (music, textures, models). However, there are no lines of C# code in it. Content is basically just raw data. |
| | |
![]() |
|
| Thread Tools | |
| Display Modes | Rate This Thread |
| |