Search found 6 matches

by waffleturtle
Mon Feb 26, 2024 3:33 pm
Forum: Support and Development
Topic: Trying to figure out collision with tiles in platformer game
Replies: 11
Views: 3812

Re: Trying to figure out collision with tiles in platformer game

You can start with point-to-slope collision: https://love2d.org/forums/viewtopic.php?p=255011#p255011 Than you can check all 4 points of your rectangles to check that the collision was true. That looks neat! I'll keep that thread bookmarked for future reference :) I figured I would try keep it very...
by waffleturtle
Sun Feb 25, 2024 5:01 am
Forum: Support and Development
Topic: Trying to figure out collision with tiles in platformer game
Replies: 11
Views: 3812

Re: Trying to figure out collision with tiles in platformer game

Thanks! I'll keep it in mind to not fret too much over optimization at this stage! I got something sort of working now. It's still a bit wonky but at least going in the right direction now. I ended up checking the direction of the player velocity and then test the closest two tiles towards that dire...
by waffleturtle
Mon Feb 19, 2024 1:10 pm
Forum: Support and Development
Topic: Trying to figure out collision with tiles in platformer game
Replies: 11
Views: 3812

Re: Trying to figure out collision with tiles in platformer game

Thanks guys!

I will switch my idea so it follows a proper tile system for the world collision instead like you suggest BrotSagtMist. I see the issue with performance is going to be bad for me. I will check out those articles too, this evening, RNavega!
by waffleturtle
Mon Feb 19, 2024 12:07 pm
Forum: Support and Development
Topic: Trying to figure out collision with tiles in platformer game
Replies: 11
Views: 3812

Re: Trying to figure out collision with tiles in platformer game

I see - I should probably have said blocks instead. But are you sure a physics library is the only way? I am sticking to square shaped collisions if that makes it simpler.
by waffleturtle
Mon Feb 19, 2024 11:56 am
Forum: Support and Development
Topic: Trying to figure out collision with tiles in platformer game
Replies: 11
Views: 3812

Re: Trying to figure out collision with tiles in platformer game

Hey thanks for replying - I am not sure I am getting the idea though. Would that work for like a platformer like Super Mario? Where does the player come into the collision calculation there? Not sure if it matters but the tiles I have are stored in this format: tiles = { tile1 = { x y width height }...
by waffleturtle
Sun Feb 18, 2024 11:32 pm
Forum: Support and Development
Topic: Trying to figure out collision with tiles in platformer game
Replies: 11
Views: 3812

Trying to figure out collision with tiles in platformer game

Hello! I am new to Love2d and trying to make my first little platformer game. I am trying to keep it somewhat simple so I am avoiding advanced 3rd party libraries and such for now to get a better basic understanding of concepts and such. I figured I start with a 2d platformer and it is going well th...