I Wanna Community

Fangames => Game Design => Programming Questions => Topic started by: lemonxreaper on June 27, 2013, 12:39:49 PM

Title: Yuuutu engine block/platform death bug fix
Post by: lemonxreaper 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:
Title: Re: Yuuutu engine block/platform death bug fix
Post by: Sephalos 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
Title: Re: Yuuutu engine block/platform death bug fix
Post by: lemonxreaper 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.
Title: Re: Yuuutu engine block/platform death bug fix
Post by: gabisthebest 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?
Title: Re: Yuuutu engine block/platform death bug fix
Post by: lawatson on January 07, 2015, 03:00:14 PM
(https://puu.sh/ecILN/51c26ac9de.png)
Title: Re: Yuuutu engine block/platform death bug fix
Post by: gabisthebest 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(https://www.iwannacommunity.com/forum/Smileys/TwitchTV/atkCry.png)
Title: Re: Yuuutu engine block/platform death bug fix
Post by: Zurai 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(https://www.iwannacommunity.com/forum/Smileys/TwitchTV/atkCry.png)

:FailFish: