adum said in the other thread he'd made it harder to figure out from the code - that certainly scuppered my first few attempts. The message displayed depends on the levels having the right numbers of blocks in them, and my first attempts were all based around not instantiating all the blocks, and/or setting the block count to 1 rather than properly counting the blocks.
Neither method works properly because the password just comes out wrong. I wonder whether this is what adum anticipated? I was a little disappointed that my next stab worked without a hitch - that is, making blockDied always signal the end of the level, regardless of the actual remaining block count.
I remember I decompiled the class objects, simplified them by hand, figured out how to calculate each character, and wrote a script that output the string from the level table.
The first eleven letters I got by simply playing it. The last two I got with an memory editor, setting the block count to 1. Works not always right, but I saw from the known first letters, that this is a bit tricky. Two tries, and I got the last two letters.
snibril wrote:The first eleven letters I got by simply playing it. The last two I got with an memory editor, setting the block count to 1. Works not always right, but I saw from the known first letters, that this is a bit tricky. Two tries, and I got the last two letters.
This is what I did in both Breakout-challenges - so the extreme one was not harder than the usual.
I hate KISS, but after my first attempt to modify "blockDied" failed, I went the same way like tog - making all borders to bounce and left the applet alone.
Changing the levels so that they consist only of one block showed that the solution seems to be based on the number of blocks?!
Private field S$5S in BreakoutGame contains the level number.
I introduced an additional field 'level' with public access and replaced every
use of S$5S with 'level' (simply changing the access modifier didn't work,
probably a glitch in the bytecode editor).
Then I subclassed BreakoutApplet and added the following code:
i did it modifying only a single byte (in the java bytecode), i found where the lives are subtracted(by changing all the possible subtracts in the file that were just before a itol bytecode decompiling each one), and changed it to add, boom i can never ever loose, now the last level was still a @$%^ but i eventually got it.
(i wish there was a program like ollydbg for java files heh, one that can run the class without any form of source code)
Just wrote some code that grants me a bonus non stop and restarted the game until i got triple bonus Then u will never have to worry about having no more balls
Hmm, I first let the blockadd not to increment but set to 1 ... and got wrong password.
Next attempt was to blockdied sets the count to 0 ... and failed to write password correctly !!!
Than I have played by hand (OK ... I let my doughter to play, but I was more successfull anyways) and I got first three letters equal to the 2nd attemt.
I have tried changing last letter on remembered password from 2nd attempt ... and failed.
Finally I have returned to the blockdied method and writen password well.