Author Topic: Yuuutu engine block/platform death bug fix  (Read 4770 times)

lemonxreaper

  • Administrator
  • Spike Dodger
  • Posts: 222
  • Do you even needle?
    • View Profile
Yuuutu engine block/platform death bug fix
« on: June 27, 2013, 12:39:49 PM »
Some of you may have noticed that you can die from weird circumstances in the Yuuutu engine (maybe in others too I havent tested) such as: standing on the edge of a miniblock when there's a spike there, standing on a platform with a spike just under it or on the same level, or that one pixel align in my game where the spike kills you through the miniblocks.
You may have also noticed this in several places in IWKTK2 (mainly the kill the guy room).

---------------------------------------------------

why this happens: gamemaker reads its events from top to bottom each step, the event for the player to be pushed out on top of miniblocks or platforms and be spared from death is after the playerkiller collision detection. normal blocks are before which is why it doesn't happen with them.

-------------------------------------

solution: since we cannot reorder the events in GM that easily we need to simulate playerkiller collision at the end of the step.

---------------------------------------------

code: in player object (and player2 if on yuuutu engine) go onto collision with playerkiller and delete the code in there.
add a step event and pick end step, put in the following code:

if place_meeting(x,y,playerKiller) { with(player){killPlayer();} }

---------------------------------------------------------

Hopefully this will help and isn't too much of a mess, I'm not great at writing such things up.  :BloodTrail:

Thanks to Sephalos  for giving me GML for the solution  :4Head:
« Last Edit: January 10, 2015, 08:33:48 PM by lemonxreaper »
Just pretend I have a cool picture like Zero.
Completed Fangames: https://dl.dropboxusercontent.com/u/4678222/Complete%20Fangames.txt

Sephalos

  • Spike Dodger
  • Posts: 228
    • View Profile
  • Playstyle: Gamepad
Re: Yuuutu engine block/platform death bug fix
« Reply #1 on: June 27, 2013, 12:56:41 PM »
I'm glad we took the time to find this fix.
I've been wanting to make a fangame using only 16x16 blocks and smaller tilesets.

:ItsBoshyTime: o o o o o

lemonxreaper

  • Administrator
  • Spike Dodger
  • Posts: 222
  • Do you even needle?
    • View Profile
Re: Yuuutu engine block/platform death bug fix
« Reply #2 on: June 27, 2013, 01:02:17 PM »
Yeah we did good  :4Head:
smaller tiles levels can be cool, that one stage in I wanna make it breaking out takes advantage of them in interesting ways.
Just pretend I have a cool picture like Zero.
Completed Fangames: https://dl.dropboxusercontent.com/u/4678222/Complete%20Fangames.txt

gabisthebest

  • Wannabe
  • Posts: 22
  • Why play Aiwannas? Because...
  • OS:
  • Windows 8.1/Server 2013 Windows 8.1/Server 2013
  • Browser:
  • Firefox 34.0 Firefox 34.0
    • View Profile
    • My Youtube channel
  • Playstyle: Keyboard
Re: Yuuutu engine block/platform death bug fix
« Reply #3 on: January 03, 2015, 12:36:11 PM »

... then add an event, on press G and put in the following code:

god +=1
if god >= 2{
god = 0}


What do you mean by pressing G and what is the event?

lawatson

  • The Kid
  • Posts: 331
  • I do things and I make things.
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Chrome 39.0.2171.95 Chrome 39.0.2171.95
    • View Profile
  • Playstyle: Keyboard
Re: Yuuutu engine block/platform death bug fix
« Reply #4 on: January 07, 2015, 03:00:14 PM »
(click to show/hide)

smoke weed everyday

gabisthebest

  • Wannabe
  • Posts: 22
  • Why play Aiwannas? Because...
  • OS:
  • Windows 8.1/Server 2013 Windows 8.1/Server 2013
  • Browser:
  • Firefox 34.0 Firefox 34.0
    • View Profile
    • My Youtube channel
  • Playstyle: Keyboard
Re: Yuuutu engine block/platform death bug fix
« Reply #5 on: January 08, 2015, 07:34:22 PM »
Thanks for the precision, but after putting all the codes I needed to test the god mode, I try to run a random fangame with these and I don't know how to activate

Zurai

  • Community Manager
  • Spike Dodger
  • Administrator
  • Posts: 170
  • OS:
  • Windows 7/Server 2008 R2 Windows 7/Server 2008 R2
  • Browser:
  • Chrome 39.0.2171.95 Chrome 39.0.2171.95
    • View Profile
  • Playstyle: Keyboard
Re: Yuuutu engine block/platform death bug fix
« Reply #6 on: January 09, 2015, 08:19:02 AM »
Thanks for the precision, but after putting all the codes I needed to test the god mode, I try to run a random fangame with these and I don't know how to activate

:FailFish:
Stop by and say hello at www.twitch.tv/zurairofl :PogChamp: