Hello, hello and hello again.
Sleep patterns have gon out the window. I've been working like an insomniac maniac on this the past few days. I have alot of updates to show!
List of updates since last post:
*Updated UFO lasers to have white highlight in center.
*Reconfigured lasers to handle up to 5 streams on screen (instead of 1)
*Added new spiky explosions
*Added explosion scaling, and explosion damage to all characters
*Civilians are now "blown away" by explosions
*Missiles, tracers and lasers all have collision and cause damage
*All entities can be destroyed, and have their own re-spawns (soldiers at barracks, hueys at helipad, tanks at base and aliens at mothership)
*Created new "shot handling" code to maximise efficiency when there are 500+ shots on screen
*began animating zombies.
Essential TO DOs:
*Add collision/damage/destruction of buildings.
*make entities avoid buildings more intelligently.
*add zombies
*player control
anyway. Heres a couple of update screenshots
THERE IS ALSO AN UPDATE VIDEO ON YOUTUBE. CHECK IT HERE!
@Paul112:
Thankyou dude. The civilian updating thing is relatively simple. If a civilian is behind the camera (not off screen but behind), and they're dead, or they've been off screen for too long then they are reposisioned infront of the camera. It can be a little pop-up, but it's a nice effect. The code for finding if they are behind or infront of the camera is quite elegant, checkit:
X=camera position x()
Z=camera position z()
TX=object position x(i)
Tz=object position z(i)
`object i is the current civilian
position object 102,X,0,Z
yrotate object 102,camera angle y()
move object 102,10
`object 102 is just a dummy hidden object
X2=object position x(102)
Z2=object position z(102)
if ( X2 - X ) * ( TX - X ) < ( Z - Z2 ) * ( TZ - Z )
`if the above line is true then the civilian is behind the camera
position object i,X,0,Z
yrotate object i,camera angle y()
move object left i,-100+rnd(200)
move object i,50+rnd(100)
endif
I'm using a bubble sort, so that I don't check every civilian every update, only a select few (those furthest from the camera, or dead).
I'm using the same equation to find if targets are within a 180 angle of fire for the guns. It's quite a useful little bit of code, and for the minute, the fastest way I can find of getting this data.
I want robotic legs.