Jcw87 / c2-sans-fight

Undertale Sans Fight Clone
http://jcw87.github.io/c2-sans-fight/
540 stars 527 forks source link

Add bonus damage at the very end #16

Closed CrimsonFork closed 7 years ago

CrimsonFork commented 7 years ago

I was to lazy to mention yet, but at the end when Sans throws the soul he deals additional damage if you're not at 1 HP yet. Like here.

Jcw87 commented 7 years ago

I'm aware of this, though I probably won't add it until I add a screen shake.

CrimsonFork commented 7 years ago

Makes sense somehow, and doesn't affect the gameplay anyway

Jcw87 commented 7 years ago

I've added a screen shake, so slam damage is now dished out in the final attack. Fun fact: Undertale has two screen shake effects. One used for the sans fight, and one for everywhere else.

CrimsonFork commented 7 years ago

May you give a short description on how you figured out how the screen shake works and how it works, pls? -- Diese Nachricht wurde von meinem Android-Gerät mit K-9/p≡p gesendet.

Jcw87 commented 7 years ago

Decompiler. I found another one that generates C++ code in addition to game maker's assembly language, making reading through it easy instead of being a chore.

The Sans screen shake has an intensity value. For both x and y, the intensity is randomly multiplied by 1 or -1 and then added as a view offset. Every frame, the intensity is decremented until it reaches 0, at which point, the effect is over.

CrimsonFork commented 7 years ago

So, there's no connectipn to the actual attacks, right? -- Diese Nachricht wurde von meinem Android-Gerät mit K-9/p≡p gesendet.

Jcw87 commented 7 years ago

The larger gaster blasters trigger a screen shake with an intensity of 5 when they fire, the slam triggers a screen shake with an intensity of floor(heartspeed / 3) when the heart hits the edge of the combat area (heartspeed is measured in pixels per frame).

CrimsonFork commented 7 years ago

Alright, thank you.

Am 7. Juni 2017 21:20:10 MESZ, schrieb Jcw87 notifications@github.com:

The larger gaster blasters trigger a screen shake with an intensity of 5 when they fire, the slam triggers a screen shake with an intensity of floor(heartspeed / 3) when the heart hits the edge of the combat area (heartspeed is measured in pixels per frame).

-- You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/Jcw87/c2-sans-fight/issues/16#issuecomment-306897954

-- Diese Nachricht wurde von meinem Android-Gerät mit K-9/p≡p gesendet.

CrimsonFork commented 7 years ago

I really don't want to spam you with my lack of knowledge about programming, but can you please explain a little more about this whole compiling thing, or give me a link to where I can learn more? I just don't understand why you can read out the behavior of the screen shake, but not how jumping works or the hitbox sizes.

Jcw87 commented 7 years ago

The decompiler is made to convert the game maker bytecode to something readable. The bytecode is derived from gml scripts and code written with the visual editor. In an engine like game maker, hitbox sizes are typically handled with object metadata instead of code, and while the decompiler uses this metadata to some extent, it doesn't write it out to a file. To view it, I would either need to find a tool that would do this, or write my own. As for the heart jumping, I haven't actually taken a serious look at the scripts for the heart yet. There's a lot of things in there, as it needs to handle everything the heart does in the whole game. Sifting through a massive amount of game maker assembly code is not my idea of a good time. Having the c++ output will make this less of a chore though, so I may get around to it eventually.

CrimsonFork commented 7 years ago

All right, thanks once again.

Am 9. Juni 2017 06:05:09 MESZ, schrieb Jcw87 notifications@github.com:

The decompiler is made to convert the game maker bytecode to something readable. The bytecode is derived from gml scripts and code written with the visual editor. In an engine like game maker, hitbox sizes are typically handled with object metadata instead of code, and while the decompiler uses this metadata to some extent, it doesn't write it out to a file. To view it, I would either need to find a tool that would do this, or write my own. As for the heart jumping, I haven't actually taken a serious look at the scripts for the heart yet. There's a lot of things in there, as it needs to handle everything the heart does in the whole game. Sifting through a massive amount of game maker assembly code is not my idea of a good time. Having the c++ output will make this less of a chore though, so I may get around to it eventually.

-- You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/Jcw87/c2-sans-fight/issues/16#issuecomment-307289878

-- Diese Nachricht wurde von meinem Android-Gerät mit K-9/p≡p gesendet.