The Daily Click ::. Projects ::. TAHC2
 

Project: TAHC2
Project Started: 20th October, 2009 Last Update: 8th April, 2012
Project Owner: 3kliksphilip Project Members: Mr_Tom James Luke
Project Type: Secret Project Progress:

The Levels
Posted 24th Oct 09, by 3kliksphilip  
One of the biggest differences between this game and others is how it loads and saves levels. The game is played on a single level, so updates to code and graphics are really easy to do. When the player walks off the side of the screen, it remembers his X and Y position, as well as which level he has moved to. It then clears the screen and loads up all of the objects within in the next level from an array.

As well as making it easy to change the code and stuff, this allows the levels to be TOTALLY destructible. In fact, up until 1.36 the walls could be blown up, but I removed them and redid them because I got a BAD OBJECT for them, and because they were made using a very slow process of rendering, which I'll explain below.

SLOW PROCESS
All objects have an invisible base object, which stores all of the information about the object. Every 00:01 seconds, and the object is close enough to the player, it creates a picture of itself and a shadow of itself. Every 00:01 add 1 to calue B of the picture and shadow, when Value B is greater than 2, destroy.
PROBLEM: It slows down the computer when there are too many objects on screen. However, it is still the way that moving objects are drawn, because the fast process doesn't work with them.

FAST PROCESS
As soon as objects are close enough to be viewed, create a shadow and picture. If they're too far away to be seen, destroy again.
PROBLEM: Can't update damage models, can't be used with moving objects.

NEW EXPERIMENTAL METHOD
Same as the fast Process, only every time the object moves / is damaged, it creates an object that deletes the current picture and shadow and replaces it with a new one.
PROBLEM: Can't update objects which are in the air because they won't be touching the base object... though I could create the updater thing at the correct height to tag the picture of the objects and hope that it works, but it probably won't because it'll get confused with objects of the same type that are just lying around further up screen.

It sounds horribly complicated, but when you've got huge play area with thousands of objects, it will KILL the computer unless you optimize it as much as possible. So far I'm pleased with what I've done, though for the destruction update I really will have to find a new way of drawing the objects.

Posted by Chloe Sagal 25th October, 2009

this is what I spent most of my time on OMG! Zombies!
most of the concepts i didnt get to add because I was too busy trying to get a mass amount of smart objects while still being able to run at full speed. That was a pipe dream.

i love the idea of destryoing the levels. it definatly adds some pizzaz. hope you can get it to work the way you want it to.
 
Posted by cake 10th November, 2009

What about using flags?

Any time you need to update a tile, turn one of its flags on, then have periodic checks for tiles with flags on and do updates to them.
 


 



Project Forums


Favourite

Advertisement

Worth A Click