Skip to content

Bomb diggity (405 points)

-migrated-

This discussion is linked to Bomb Diggity. View game

4 posts

Re: Bomb diggity

Posted Sep 5, 2009 6:03 pm

I'll have a look - but not 'til tomorrow (got beer to go out and drink) - it should be easy to stop the counter counting...

Re: Bomb diggity

Posted Sep 5, 2009 8:46 pm

Using speedhack in CE to slow it down and improve the controls, I got all medals but the 15 minute one. I eagerly await to see your progress with a time countdown method.

Re: Bomb diggity

Posted Sep 6, 2009 9:09 am

Stop the bomb coutdown on the tutorial level:
96 08 00 04 01 08 19 04 01 08 19 4e 51 4f =>
96 08 00 04 01 08 19 04 01 08 19 4e 02 4f

Stop the bomb countdown for the rest of the game:
96 08 00 04 01 08 44 04 01 08 44 4e 51 4f =>
96 08 00 04 01 08 44 04 01 08 44 4e 02 4f

In scripting terms, each bomb is an instance of an object which has it's owner timer counter (countdown), this is reduced in the bombOnEnterFrame() function, so in code:

Code: [Select]

function bombOnEnterFrame()
{
if (gameEnded)
{
return;
} // end if
--this.countDown;

This is represented in bytecode as:

Code: [Select]

#828//8e 18 00 62 6f 6d 62 4f 6e 45 6e 74 65 72 46 72 61 6d 65 00 00 00 07 69 00 2b 08
_defineFunction2 'bombOnEnterFrame' [0 params]() //regCount[0x07], flag[0x69], end offset is: #1341
//96 02 00 08 00
_push "gameEnded"
//1c
_getVariable
//12
_not
//9d 02 00 05 00
_if true goto #835
//96 01 00 03
_push undefined
//3e
_return
#835//96 08 00 04 01 08 44 04 01 08 44
_push register1 "countDown" register1 "countDown"
//4e
_getMember
//51
_decrement
//4f
_setMember

The important bit, for us is where the --this.countdown happens, and we want to stop countdown reducing, so we replace the decrement op-code (0x51) with a no operation (NOP: 0x02).