Flash Project Running Slow

Hey, I searched through the forums and it helped me with an earlier problem (regarding matrices) and so now I’ve come across a problem that is more difficult…

My flash project is so bloated by the objects that I create in it that it just runs wayyy too slow.

The gist of it, is that it’s a GTA remake, somewhat…atm, I’ve got a randomly created map that stores the locations of buildings using an array of arrays (array[0] = new Array(10); array[1] = new Array(10); etc…) which essentially makes a matrix. I planned on using this matrix later so I can put in “gems” (you need to collect them before the time is up!) or so I’ve got planned. Anyway, I create this 10x10 “city” and I think that the buildings bloat the project so much that it runs very slow.

What can I do to help? You’ll notice if you go to the edge of the city, that the gameplay is MUCH quicker…possibly because it doesn’t have the entire map loaded at that time (?). I’ve pondered making a real-time loader that would fill in the blocks as you travel towards them (using my previously mentioned matrix to place the blocks) but I wonder if the amount of code required would ruin its purpose.

any ideas???


Please take note that it’s in progress, and so don’t expect everything to be working (like you can run over the buildings and drive on forever…I’ll fix those once I get it speeded up!!)

Thanks y’all!

why dont you just make a jpg of the whole city map and mask it and have like a little cursor indicating where your are traveling at the moment it would be less of a strain to the computer

because with this method, a city is randomly generated, with that method, the cities are always the same and it’d ruin the fun if it was always the same city!

oh okay i didnt know that but that will be overkill for the processor rendering all the city beign animated and also to generate a city map based on where your location is at