I'm in the process of making a game right now, and I made a map with the Tiled map editor and am using ATL to load it, I got it to display and everything properly but I'm a bit lost as far as how to do collision, can anyone tell me how to go about doing it ? and please if you can, keep in mind i'm not very good yet, thanks. XD
Here is the .love
http://www.filedropper.com/wip
I want to make it so the player collides with the stone tiles.
How do I do collision with Tiled ?
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
- VetruvianSprite
- Prole
- Posts: 12
- Joined: Tue Sep 24, 2013 3:35 am
- Location: Pennsylvania
How do I do collision with Tiled ?
I love a nice D.R.Y. K.I.S.S.
Re: How do I do collision with Tiled ?
Technically there are two parts you have to do: (1) Access the collision information from the map and (2) Do the actual collision stuff.
In which part do you need help?
In which part do you need help?
Check out my blog on gamedev
- VetruvianSprite
- Prole
- Posts: 12
- Joined: Tue Sep 24, 2013 3:35 am
- Location: Pennsylvania
Re: How do I do collision with Tiled ?
Well honestly, both.micha wrote:In which part do you need help?
I love a nice D.R.Y. K.I.S.S.
Re: How do I do collision with Tiled ?
I learned a lot from the tutorial on Exploding Rabbit. It does collision and uses Advanced Tiled Loader, so hopefully exactly what you need.
Check out my blog on gamedev
- VetruvianSprite
- Prole
- Posts: 12
- Joined: Tue Sep 24, 2013 3:35 am
- Location: Pennsylvania
Re: How do I do collision with Tiled ?
bekey wrote:if you right click on the stone tile in the tilesheet and give it a property called "obstacle" or "solid" or "poophole" and then when you iterate over the tiles on your map inside the code, you can say something like:
Code: Select all
for x, y, tile in map("Layer_Name"):iterate() do if tile.properties.obstacle then -- Make it solid, lel end end
Where in the program would I want to put this?
I love a nice D.R.Y. K.I.S.S.
Re: How do I do collision with Tiled ?
Would anyone mind going into a little more detail on how to make obstacle tiles solid, as in the above for loop?
Who is online
Users browsing this forum: Ahrefs [Bot], Bing [Bot], Semrush [Bot] and 5 guests