Hi, I just found out about love and I will be watching some tutorials in order to understand how to make games with it.
I always wanted to re-create a flash game that I loved called dottie.
Image here:
Basically when you click on start here, your curso becomes a dot, if you touch any wall or obstacle you explode.
I would like to know how you would approach collision detection.
I have a basic knowledge of how it works for platformers, but in this case, I don't know how to to approach it properly.
In my mind there are 2 layers, the back layer and the front layer, the front layer is where I place all the obstacles and walls etc.
But how do I check if the dot is hitting anything?
Also should I use SVGs instead of images for scalability?
Thanks a lot.
How to approach my game idea
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: How to approach my game idea
Well, these are no ordinary platformer collisions for sure! I've been thinking about some possibilities but in the end, my conclusion is that using a collision bitmap as an ImageData object would work best (or maybe use the alpha of the top layer directly), via ImageData:getPixel. Other options I've considered and rejected are polygons and love.physics shapes.
One problem is the mobile parts. But the fact that the player is a dot plays to your advantage here: if you use a Transform object for handling position and rotation of each mobile part, you can also use inverseTransformPoint to see where the dot is relative to it, and check for collisions accordingly (separately from the main track).
One problem is the mobile parts. But the fact that the player is a dot plays to your advantage here: if you use a Transform object for handling position and rotation of each mobile part, you can also use inverseTransformPoint to see where the dot is relative to it, and check for collisions accordingly (separately from the main track).
Re: How to approach my game idea
Thanks a lot for the answer. Actually I think that to make things easier, I am going to opt for black and white and put some retro shaders on to make it more old style.
With this I think I can also check the color itself, so if anything is black, then it's a collision point.
With this I think I can also check the color itself, so if anything is black, then it's a collision point.
Re: How to approach my game idea
Why wouldn't polygons work here? This is exactly area where polygons work well AFAIK.pgimeno wrote: ↑Tue Nov 19, 2024 11:18 pm Well, these are no ordinary platformer collisions for sure! I've been thinking about some possibilities but in the end, my conclusion is that using a collision bitmap as an ImageData object would work best (or maybe use the alpha of the top layer directly), via ImageData:getPixel. Other options I've considered and rejected are polygons and love.physics shapes.
One problem is the mobile parts. But the fact that the player is a dot plays to your advantage here: if you use a Transform object for handling position and rotation of each mobile part, you can also use inverseTransformPoint to see where the dot is relative to it, and check for collisions accordingly (separately from the main track).

Re: How to approach my game idea
Looking at the concentric circles, it seems it would need a LOT of segments to get an accurate representation, and checking could become slow, especially compared to the simpler pixel-oriented checking that is possible in this case.
Who is online
Users browsing this forum: Ahrefs [Bot], Google [Bot], prostokiriuha and 6 guests