Quote: "That's the way I see it anyway, Cash and Hex might know better, maybe they could have a look and give us an idea of what elements take up the most code, might be interesting to compare different types of game with how much code goes where."
Here's an approximate breakdown of my code for anyone that is interested. To each his/her own method of coding; as for me, I like to break things down into fundamental modules so after months of not working on the game I can just take a quick glance and instantly get up to speed.
This may be much more info than you need on my game but it's 10 o'clock in the morning, the parcel delivery man woke me up prematurely at 8:00am and I couldn't get back to sleep, plus I’ve got nothing else to do till the afternoon.
01 COD.dba (1700), variable declaration and initialization
02 actor.dba (900), handles controlling the main protagonist
03 anime.dba (3200), handles protagonist 118 animations
04 audio.dba (220), handles game audio (sound and music)
05 buttons.dba (160), logs keyboard input and key combinations
06 camera.dba (260), controls the different types of cameras
07 clothes.dba (180), handles changing all the actors clothes
08 combat.dba (1770), handles all combat interactions
09 console.dba (840), controls the in-game console
10 credits.dba (220), handles the game credits (few so hard coded)
11 debug.dba (290), displays debug info on the screen
12 eanime.dba (2080), handles antagonist(s) 97 animations
13 effects.dba (1510), handles all game special effects
14 enemyAI.dba (1660), handles the behaviour of the antagonist(s)
15 filter.dba (340), texture filtering (lighten/darken, colour etc)
16 free.dba (280), so I don't have to keep track of entity ids
17 hud.dba (1620), handles the functionality of the HUD
18 imaging.dba (170), texture manipulation (sub sample, merge etc)
19 loading.dba (400), handles loading and progress bar
20 main.dba (60), main game loop, calling all other functions
21 maths.dba (270), all mathematical calculations
22 mesh.dba (40), mesh manipulation
23 physics.dba (770), handles all game physics
24 score.dba (120), updating game score, checks, name entries etc
25 scripts.dba (100), enemy AI script interface
26 stage.dba (1930), load stages and controls interactive entities
27 system.dba (860), background loading, checks, setups, etc
28 timer.dba (160), handles the master time that affects motion
29 video.dba (140), handles the introductory video
30 weapon.dba (760), handles everything to do with weapons
31 weather.dba (400), handles the game weather (rain and snow)
32 world.dba (740), initial world load and setup
33 zone.dba (410), handles the fight zone and enemy allocation
You can subtract say 100 lines from each of the above on account of superfluous spaces and comments used to keep the code neat and tidy, it's just so that I can quickly pick stuff up again after long absences. Like I said before the editor is about 5,000 lines and the usual suspects for racking up the lines of code like enemy AI scripts, dialogue, setup info etc are all outsourced to text files.