• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Legacy GM Trying to find an awesome SMOOTH collisions engine for a platformer game

Adam Games

Member
Hey guys,

So I'm gonna make a game for the Tropical Game Jam, and I'm looking for a bit o' help with programming SMOOTH player collisions.
(Don't worry, I haven't started making my game yet - just preparing 😝 )

This is for a top-down game (so no gravity).

Previously, I was set on a top-down game, but I've decided to keep my options open (to be ready for any surprise that the Game Jam's theme might present). Thus I am looking for engines for a PLATFORMER game too!

I have received some cool links & info about a TOP-DOWN engine from @RefresherTowel and @CMAllen .
So now my focus is on PLATFORMER engines.

What I'm looking for is:
An awesome SMOOTH collisions engine, extention, or scripts for a platformer game.
If anybody knows any great ones that I can download, I would love to see it!!!

However, even if you don't know of any programming assets, I would really appreciate any guidance, tips, or even code snippets to help me get started.

What I'm trying to achieve is for players to smoothly glide along surfaces of any angle.
To make things simpler, I am making all the surfaces either A. straight-lines or B. perfect circles.

Now that I am trying to find a platformer engine, gravity will be involved... so I am looking for something whether players will smoothly slide down steep slopes too.

Example image for collisions.png

^ The above image is what the collision masks would like look like.

I really hope for some answers! I am feeling my adrenaline slowly increasing as the Gam Jam approaches kick-off!!! 😁

-

UPDATE: I found the following tutorial about top-down smooth collisions: https://www.yoyogames.com/blog/432/buttery-smooth-tech-tips-movement

I shall try it out, and see if I can get it to work. Still open to ideas and tips though! I'll keep y'all updated.
The above tutorial is just what I needed! I got a top-down engine working well. Now my focus is on a platformer engine!

-

UPDATE 2: Found this tutorial about calculating angles in a platform game! Looks promising. I'll try it out .
 
Last edited:

Adam Games

Member
Don't know if you have a zero budget requirement but pixelated pope has a smooth collision engine which is quite good: https://marketplace.yoyogames.com/assets/1613/top-down-movement-collision

If you're new to GMS, there'll be a bit of a learning curve, but if you're already comfortable, it should only take an hour or two to get up to scratch with how to use the asset.
Thanks a lot for this, bro! Looks neat.

Have you tried it? Do you know if it works for any angle? It looks limited to only 45, and 90 degree angle shapes.
 

CMAllen

Member
Thanks a lot for this, bro! Looks neat.

Have you tried it? Do you know if it works for any angle? It looks limited to only 45, and 90 degree angle shapes.
Since it's @Pixelated_Pope work, I can tell he created a tutorial for how that all works. It's a two-factor collision system. It uses the basic grid system, which then does a second check that uses pixel-perfect collision mask checks. So it'll work with anything, any arbitrarily shaped or sized object or mask.

PRECISE TILE COLLISIONS BY PIXELATED POPE
 

Adam Games

Member
Thanks a lot for your help man.

I've actually got smooth collisions to work with the scripts in this tutorial!
https://www.yoyogames.com/blog/432/buttery-smooth-tech-tips-movement

It seems to be working for all solid shapes no matter what the angles!
If I run into problems, I'll look further into @Pixelated_Pope 's engine.


Cool! Looks like a pro engine. I'll keep it in mind.

-

To be honest guys, I'm not sure if I'll make a top-down game after all. I should keep the game-type open and flexible, as I need to follow also the theme of the Game Jam... :p

I'm looking into smooth platformer engines too. @Pixelated_Pope doesn't seem to have one. If you guys know of anyone else who does, I'd love to see it also!
 
Yeah, writing "platforming engines" is really, really scary.

Top down games all function the same, essentially. You press against a wall, you move along it in the direction you are pressing +- 45 degrees based on the wall's collision. That describes the physical interaction between the player and the walls for 99.99% of top down games.

Platformer games, however, are SO physics dependent, that it's nearly impossible to release an engine that will work for everyone who wants to make a "platformer". I mean, the difference between Sonic and Mario alone is big enough to dissuade me from building such a resource. What works for one doesn't work for the other, and the way you approach building Sonic compared to Mario is like building a game in a completely different genre. And if I choose one over the other, I'll get dozens of emails about "how could I use this to make a <the other game> like"... no thanks.
 
Top