Skip to content

Undead Highway

-migrated-

This discussion is linked to Undead Highway. View game

16 posts

Re: Undead Highway

Posted Oct 11, 2010 1:34 am

Unlimited ammo
66 34 93 d6 d1 d2 61 34
66 34 02 d6 d1 d2 61 34

Zombies deal no damage
5e 8c 02 24 0a 68 8c 02
5e 8c 02 24 00 68 8c 02

One hit kills (use with above AoB only!)
5e a2 02 24 ?? 68 a2 02
5e a2 02 24 01 68 a2 02

This post was imported from an account that no longer exists!
Previous Name: phreneticus

Re: Undead Highway

Posted Oct 11, 2010 3:58 am
Quote from: "phreneticus"
Unlimited ammo
66 34 93 d6 d1 d2 61 34
66 34 02 d6 d1 d2 61 34


whats the 93 opcode. id look it up, but i always have so much trouble finding the op code list.

Re: Undead Highway

Posted Oct 11, 2010 4:09 am
Quote from: "satanicgurrl"
Quote from: "phreneticus"
Unlimited ammo
66 34 93 d6 d1 d2 61 34
66 34 02 d6 d1 d2 61 34

whats the 93 opcode. id look it up, but i always have so much trouble finding the op code list.

93 = decrement

You can change it to 91 (increment) so your ammo increases instead of decreasing, but I decided to NOP it out, so it actually doesn't change at all.

This post was imported from an account that no longer exists!
Previous Name: phreneticus

Re: Undead Highway

Posted Oct 11, 2010 4:17 am

kool thanks man. im actually kind of embarrassed that i couldnt figure that out with some simple reasoning skills.

Re: Undead Highway

Posted Oct 11, 2010 4:39 am
Quote from: "satanicgurrl"
kool thanks man. im actually kind of embarrassed that i couldnt figure that out with some simple reasoning skills.

Well, there is something weird about the OP codes 93/91 and a1/a0 though.

Imagine this sourcecode:

Code: [Select]

function damage

health = health - 1

This can look in RawData like this:

//66 a8 09
_as3_getproperty health
//24 01
_as3_pushbyte 1
//a1
_as3_subtract
//61 a8 09
_as3_setproperty health

Which allows you to edit the subtracted value and actually change if the value (in this case 1) get's subtracted (a1) or added (a0).


Or it can look like this:

//66 a8 09
_as3_getproperty health
//93
_as3_decrement
//62 04
_as3_kill <4>
//62 03
_as3_kill <3>
//62 04 <4>
_as3_kill
//61 a8 09
_as3_setproperty health

On this way, you can edit if the value gets subtracted (93) or added (91), but you can't change the actual subtracted value, which really sucks. The weird thing is, that both have the same source code, but if it's the first or second option seems to depend on the game.

I'm not sure if everything I wrote is 100% accurate, but it should give you an idea on how it works. (broken image removed)

P.S.: Yes, I know that there is also multiply and divide, but I wanted to keep it simple.

This post was imported from an account that no longer exists!
Previous Name: phreneticus

Re: Undead Highway

Posted Oct 11, 2010 3:48 pm

If I'm not wrong, at least in C/C++/Java, decrement is written as --<variable name> or <variable name>--.
Same goes for increment. Perhaps the compiler does some sort of optimization and turns <variable name> - 1 into a decrement. Anywho, this wasn't useful at all =P

Re: Undead Highway

Posted Oct 11, 2010 5:02 pm

The same applies for PHP scripting.  Optimization wise, (--$i;) works more efficiently than ($i--;) even though they both do the same thing.  After 1 million repetitions, the --$i seems to work about .05 seconds faster than the other.  Granted, that's not a lot, but if you do whatever it is a few billion times a day, it adds up.


Everything's coming up KongHack!

"When you know nothing matters, the universe is yours" ~Rick Sanchez

Re: Undead Highway

Posted Oct 11, 2010 5:50 pm
Quote from: "The Ignorant Masses"
(--$i;) works more efficiently than ($i--;) even though they both do the same thing.

really??? preincrement and post increment do the SAME thing?

try this out for me. i really dont know with php.

Code: [Select]

$i=3;
$i-=$i-----$i;
print $i;//output im thinking is 2 or 1 or 3
$i=3;
$i-=--$i-$i--;
print $i;//either -1 or 4

Re: Undead Highway

Posted Oct 11, 2010 6:19 pm

If I understood correctly what one of my professors said, it's something related to post increment returning the value and incrementing after that. Returning the value would cause a small, imperceptible delay in one use, but this delay would sum up to something "big" after tons of iterations.

Or something along those lines =P

Re: Undead Highway

Posted Oct 11, 2010 10:14 pm

It's all simple, really.

Code: [Select]

$a = 5;
$b = 5;

$a++; //Output: 6
++$b; //Output: 6
As can be seen, they both give the same output. However, let's think of a more complicated case:

Code: [Select]

$i = 5;

3 + (7 * $i++)
// $i was multiplied by 7 before incrementing. Therefore, the output is 38, and $i = 6

$i = 5;

3 + (7 * ++$i)
// $i was incremented before multiplying by 7. Output 45, $i = 6

I don't know if post or pre decrementing are different in terms of speed.

Edit: Just thought of a nicer way to explain it.
Pre-increment/decrement wraps the expression within parentheses, post-increment/decrement does not.

Code: [Select]

$i++;
(++$i)

4 * $i++;
4 * (++$i);

Re: Undead Highway

Posted Oct 26, 2010 3:24 pm

The reason why post increment is a bit more expansive the pre-increment is this

If you think in function term,

Code: [Select]

int pre_increment(int &i){
    i=i+1;
    return i;
}
int post_increment(int &i){
   int j= i;
   i=i+1;
   return j;
}

A good compiler would ignore the difference between i++ and ++i on a single statement, but when u use the operator in an expression the compiler will need to allocate a register and copy over the old value first before increment, then use that register instead for calculation.  That is the reason for the performance hit.

Re: Undead Highway

Posted Oct 26, 2010 3:32 pm
Quote from: "whatever"
If I'm not wrong, at least in C/C++/Java, decrement is written as --<variable name> or <variable name>--.
Same goes for increment. Perhaps the compiler does some sort of optimization and turns <variable name> - 1 into a decrement. Anywho, this wasn't useful at all =P

C/C++/Java =/= Flash

Flash and those have not much in common.

This post was imported from an account that no longer exists!
Previous Name: phreneticus

Re: Undead Highway

Posted Oct 26, 2010 7:00 pm
Quote from: "phreneticus"
Quote from: "whatever"
If I'm not wrong, at least in C/C++/Java, decrement is written as --<variable name> or <variable name>--.
Same goes for increment. Perhaps the compiler does some sort of optimization and turns <variable name> - 1 into a decrement. Anywho, this wasn't useful at all =P
C/C++/Java =/= Flash

Flash and those have not much in common.


I beg to disagree. Flash runs on a virtual machine, pretty much like Java, and Java was written in C++. Then again, there are some libraries that allow you to mix flash with c++. The three of them are OO languages and apart from a few minor differeces, I'd say they are pretty much alike. If you know one of them you can learn the others is no time.

Anywho, not gonna argue about that =P

Re: Undead Highway

Posted Oct 26, 2010 7:09 pm
Quote from: "whatever"
Anywho, not gonna argue about that =P

Then don't post at all, since I would disagree with you now and prove my point.

This post was imported from an account that no longer exists!
Previous Name: phreneticus