MAMEWorld >> Programming
View all threads Index   Flat Mode Flat  

Sune
Connected
Reged: 09/21/03
Posts: 5648
Loc: Lagoa Santa, Brasil
Send PM
lmao
09/03/09 05:12 AM


> http://www.gamasutra.com/view/feature/4111/dirty_coding_tricks.php

Don't know how many remember Force 21, but it was an early 3D RTS which used a follow cam to observe your current platoon. Towards the end of the project we had a strange bug where the camera would stop following the platoon -- it would just stay where it was while your platoon moved on and nothing would budge it. The apparent cause was random because we couldn't find a decent repro case. Until, finally, one of the testers noticed that it happened more often when an air strike occurred near your vehicles. Using that info I was able to track it down.

Because the camera was using velocity and acceleration and was collidable, I derived it from our PhysicalObject class, which had those characteristics. It also had another characteristic: PhysicalObjects could take damage. The air strikes did enough damage in a large enough radius that they were quite literally "killing" the camera.

I did fix the bug by ensuring that cameras couldn't take damage, but just to be sure, I boosted their armor and hit points to ridiculous levels. I believe I can safely say we had the toughest camera in any game.


S







Entire thread
Subject Posted by Posted on
* Dirty Coding Tricks Andrew 08/31/09 01:09 PM
. * Re: Dirty Coding Tricks Moose  12/23/09 06:14 AM
. * lmao Sune  09/03/09 05:12 AM
. * Re: lmao krick  09/03/09 10:35 AM
. * Re: lmao StilettoAdministrator  09/03/09 05:14 PM
. * Re: lmao keshbach1  09/03/09 11:12 PM
. * Re: lmao Moose  10/09/09 02:55 PM
. * Re: lmao R. Belmont  10/14/09 08:16 PM
. * Re: lmao AaronGiles  10/15/09 04:52 AM
. * Re: lmao GamesMaster  10/26/09 05:39 AM
. * Re: lmao Heihachi_73  11/03/09 01:49 PM
. * Re: lmao R. Belmont  10/15/09 04:22 PM
. * Re: lmao PiModerator  09/05/09 02:33 PM
. * Re: lmao JWallace  09/04/09 06:39 PM

Extra information Permissions
Moderator:  Pi 
0 registered and 1 anonymous users are browsing this forum.
You cannot start new topics
You cannot reply to topics
HTML is enabled
UBBCode is enabled
Thread views: 5730