Also I'm sure that with 10,000 + lines of code there is much scope to create modules?
AGK has modules? Or are you just suggesting breaking-up the program into separate files?
Yeah, I mean breaking up the code into sections that can be reused ( or easily separated ) and use #insert rather than have one huge single source.
What took up all those lines of code was the way I was checking to see if I was in collision with an orb or one of the pieces of food and repeated for all twelve levels . I think that accounted for 4000 lines . I do like the end result though and it plays good but yeah I probably could have been a lot more economic with my coding . Code folding sounds good and yes insert could of been used but I just wanted to make it all in one piece. I was reading somewhere that some games are around 1000000 million lines of code so they must break it up. so nearly half my program was taken up by collision routines . with some clever programming I could of probably got it down to 500 by reusing the code for each level but just chose to copy and paste huge chunks of it which was very quick to do . I nearly wrote not quite but nearly 12 games if you know what I mean.
I nearly wrote not quite but nearly 12 games if you know what I mean.
When I think about it now it was crazy but it did the job very well
xlength = object1x-object2xylength = object1y-object2ylength = sqrt( xlength + ylength )if length < 1 then collide