00:00
00:00
Notakin
just your average ordinary bisexual pixel artist, not much
🪳

Age 22, He/Them

Pixel Artist

Pico's School

Behind you

Joined on 10/1/20

Level:
25
Exp Points:
6,578 / 6,940
Exp Rank:
6,833
Vote Power:
6.65 votes
Audio Scouts
3
Art Scouts
6
Rank:
Town Watch
Global Rank:
48,188
Blams:
30
Saves:
148
B/P Bonus:
2%
Whistle:
Normal
Trophies:
6
Medals:
919
Supporter:
1y 17d

Room Service Devlog (2-22-24) - "Sticky Landing"

Posted by Notakin - February 22nd, 2024


It's 2's day!

(Actually it's a Thursday and it's 2024 but you know what I mean.)

And not too long ago I announced development of my side project, Room Service, and shown its prototype footage from my YouTube. Today I got something pretty neat to show you, Here's more footage on the Project: NG Twitter:

https://twitter.com/PROJECT_NG1/status/1760764361680073085


And as you see the game looks more polished than the last few days ago, let me show you a small little trick on how I made the ground collisions seem pixel perfect.


"Sticky Landing"


iu_1165872_8231511.gif


As you can see from this gif here, the character is always sticking to the pixel of the ground after landing on the ground, In GameMaker this doesn't do that by default, and pixel perfect collision is hard to code, That I have an easier solution to that, not as tedious as coding it all in,


Here's how it works


iu_1165873_8231511.gif


The red line you see on the ground is known as the "Character Y Snapper", it snaps the character right back to its bottom y position, since it's a 1x1 game upscaled 3x each 6x6 pixel is considered a 1x1 pixel to them, thus sending the player back down on the very pixel where they're neither away or in the ground. Only after they land, or is close to landing.


Here's a better look on how it works.

iu_1165875_8231511.gif


You can see from the y position string that it's an even number every time they land.

And the jump_land_timer prevents the player from landing as soon as they leave the ground, making it too sticky.


Why am I doing this method exactly besides this being hard to code otherwise?

Here's what it looks like without the y snapper:


iu_1165874_8231511.gif


If you squint you can see that they sink below or float above the ground a bit each time they land, which causes an inconsistency,


Here's a better look:

iu_1165876_8231511.gif


You can notice how the y position is inconsistent.


With the y snapper placed on the ground it makes the landing seem more polished and pixel perfect without having to code the pixel perfect collision detection.


That's pretty much it for today, tomorrow I shall discuss the door mechanics.

Ciao!


Tags:

1

Comments

Comments ain't a thing here.