The Dink Network

Screen Edge and Screenlock Issue

December 26th 2013, 01:54 AM
goblins.gif
So I think it's a common issue that when the screen is locked sometimes the edges of the screen act funny. I actually have two issues that I'd love to know if anyone has discovered a solution to.

1. When walking against the edge of the screen diagonally, sometimes you can walk through hardness, allowing the player to get stuck if they end the screenlock while in the hardness. This seems to mostly happen when going diagonally right through the bottom side of a screenlocked screen.

2. If you stand at the bottom of a screen that is screenlocked, you can avoid damage from touch damage enemies.

The only solution I can think of to solve my problem would be to temporarily cover the entire bottom edge of the screen with a wide hard object, but it would be great if there was a simpler way...
December 26th 2013, 02:23 AM
custom_robj.png
Robj
Jester He/Him Australia
You feed the madness, and it feeds on you. 
I do remember I once thought of a fix for the second error.. the not taking damage from the touch damage enemies. Only problem was it was in one of my many lengthy skype chats with Kyle, and I never implemented it in a dmod, and I can't remember what it was lol. I know it was a simple but awesome fix though, I'll try and look through my skype chat history to see if I can find it. Or I could just think of it again, but that would require me to use my brain, and I can't really be bothered right now, maybe later.
December 26th 2013, 02:39 AM
goblins.gif
Hehe, thanks, I appreciate it Robj.

If I remember correctly there was actually a boss in the beta of your current DMOD that you could abuse this against (early on in the game).
December 26th 2013, 05:15 AM
custom_robj.png
Robj
Jester He/Him Australia
You feed the madness, and it feeds on you. 
"If I remember correctly there was actually a boss in the beta of your current DMOD that you could abuse this against (early on in the game)."

Haha yeh, that was actually what inspired me to come up with the fix... although I then didn't implement it because that boss was quite hard and I left it there as a "If the player can find it, they can exploit it" type secret.
December 26th 2013, 05:50 AM
custom_fish.png
SabreTrout
Noble He/Him United Kingdom
Tigertigertiger. 
IIRC, the first issue can be fixed by placing a hard sprite at the point Dink would be able to walk over the scenery. Could be wrong about that.
December 26th 2013, 06:32 AM
custom_magicman.gif
magicman
Peasant They/Them Netherlands duck
Mmmm, pizza. 
I thought that screenlock-walk-around-hardness bug had been fixed in 1.08. Apparently not completely
December 26th 2013, 08:28 AM
goblins.gif
@Magicman
Yup, it was only "mostly" fixed. Still a big improvement over how it used to be though, so I'm not really complaining.

@Sabretrout
I've tried placing hard objects at the point you can pass through but that doesn't appear to make a difference.
December 28th 2013, 12:05 AM
wizardg.gif
Paul
Peasant He/Him United States
 
Huh, I didn't know this bug was still around. But one thing I remember doing back in the days when it was even worse was to make an invisible sprite that instead of being hard, would "push" Dink in it's touch routine.
December 28th 2013, 02:14 AM
goblins.gif
Ohhh that sounds perfect, THANK YOU Paul! =)

I think I can make it really easily too. I'll let you know how it works after I tried it.
December 28th 2013, 07:33 AM
goblins.gif
Success! I made a new script called "blocker.c" and it basically just moves Dink to the proper location if he passes the bottom right edge. I put the script on a big blue hole sprite included with Dink and placed the sprite right where I don't want Dink to be able to move, as if it was a hard sprite. Here's the script (requires &jug global variable or to change to ints):

//if dink touches a sprite with this script, he will be moved to slightly to the left of that sprite
//essentially used to prevent Dink from passing glitchy edges on screenlocked screens
//designed to be used with the big blue hole sprite for best positioning
void main( void )
{
	//allow touch procedure
	sp_touch_damage(&current_sprite, -1);
}
void touch( void )
{
	//get Dink's position
	&jug = sp_x(&current_sprite, -1);
	//subtract it by the distance from the hole's x to the hole's side
	&jug -= 25;
	//move Dink to the new position (which is directly to the left of the hole)
	sp_x(1, &jug);
}


Thanks very much Paul! It doesn't solve the bottom of the screen hiding from touch damage thing but I think I'll just leave that in. It isn't a very big deal anyways. I'll just make sure that if there are any battles I absolutely don't want the player to be able to hide from touch damage on I won't make a bottom side open with a screenlock.

Thanks guys.