SOLVED Object-based slopes with no "precize collision" in 2d platformer

Is that even possible?

To elaborate a bit: i have a platformer engine, mostly created by tutorials of Shaun Spalding but with some my own tweaks (different approach to moving platforms, one-way platforms, etc)

All of which are object-based (not using tiles) and non-precize. Basically, all of that is just regular rectangle hitboxes.

So my question goes more like: is that possible to create slopes while using rectangle hitboxes with non-precizion collisions and with no tiles?

i tried to google some advices, but everything have either this or that.
sorry in advance if question is stupid, thank you in advance if you're still gonna answer)
 

Liam Jacobs

Member
It MIGHT be possible through the use of collision_line. I'm almost certain there is a way to do this if you know the maths involved... but why?

When it gets to the point of having to write a custom collision system on top of already using GMs built-in one, surely it'd just be easier and more functional to just use precise collisions?
 
It MIGHT be possible through the use of collision_line. I'm almost certain there is a way to do this if you know the maths involved... but why?

When it gets to the point of having to write a custom collision system on top of already using GMs built-in one, surely it'd just be easier and more functional to just use precise collisions?
Thats exactly what i tried to do. failed, of course. your point is valid and gonna give a try to "precise" approach. just wanted to be sure that there isnt much alternatives i may not know about.

About "why not use precise collisions" - im just not entirely sure that such thing will not slow game down a lot. even in a case when "precise" instances wont run any step-code.
I understand that "think too early about polishing and optimization" is a thing, but thats just how i roll - im trying to optimize every thing that i can optimize early, so it wont bite me in my behind later.
 
Top