in case the images didn't work here's the link to the bool:
https://love2d.org/imgmirrur/oEY5eqF.png
and the border issue
https://love2d.org/imgmirrur/h1ZZM6U.png
Simple Tiled Implementation - STI v1.2.3.0
-
- Prole
- Posts: 8
- Joined: Mon Dec 30, 2019 1:09 am
Re: Simple Tiled Implementation - STI v1.2.3.0
I be developing stuff.
Re: Simple Tiled Implementation - STI v1.2.3.0
Hm... very strange. Are you using a release version of STI or the master branch in github?
STI - An awesome Tiled library
LÖVE3D - A 3D library for LÖVE 0.10+
Dev Blog | GitHub | excessive ❤ moé
LÖVE3D - A 3D library for LÖVE 0.10+
Dev Blog | GitHub | excessive ❤ moé
-
- Prole
- Posts: 8
- Joined: Mon Dec 30, 2019 1:09 am
Re: Simple Tiled Implementation - STI v1.2.3.0
I'm using a release version, 1.2.3
I be developing stuff.
-
- Prole
- Posts: 8
- Joined: Mon Dec 30, 2019 1:09 am
Re: Simple Tiled Implementation - STI v1.2.3.0
Okay I just cloned the latest version from the github, problem is still there though.
I be developing stuff.
Re: Simple Tiled Implementation - STI v1.2.3.0
can you send me a .love file that i can test with?
STI - An awesome Tiled library
LÖVE3D - A 3D library for LÖVE 0.10+
Dev Blog | GitHub | excessive ❤ moé
LÖVE3D - A 3D library for LÖVE 0.10+
Dev Blog | GitHub | excessive ❤ moé
-
- Prole
- Posts: 8
- Joined: Mon Dec 30, 2019 1:09 am
Re: Simple Tiled Implementation - STI v1.2.3.0
I pmed you the sample.love of my game
I be developing stuff.
Re: Simple Tiled Implementation - STI v1.2.3.0
For your collision issue, I don't think you're actually adding the player to your physics world. box2d_init parses the map into a physics world, but you will need to then add your player to that world manually. I believe the process here is to create a new fixture and shape but it's been a while since I've looked too deeply at box2d. Some example code that may help is here: https://github.com/karai17/Simple-Tiled ... ua#L46-L66
I will note that if you plan to do more simple collision detect/rejection and don't need to actually simulate physics, the bump plugin is probably a better fit. It deals with efficiently colliding axis-aligned boxes instead of a full simulation.
As for why it's drawing strangly... I suspect that's a bug in the plugin that I will have to deal with. It may have something to do with the "infinite map" feature you're using, perhaps unknowly? If you switch your map in Tiled to have a fixed size, it might fix that bug. Let me know if it does and I'll try to address it.
I will note that if you plan to do more simple collision detect/rejection and don't need to actually simulate physics, the bump plugin is probably a better fit. It deals with efficiently colliding axis-aligned boxes instead of a full simulation.
As for why it's drawing strangly... I suspect that's a bug in the plugin that I will have to deal with. It may have something to do with the "infinite map" feature you're using, perhaps unknowly? If you switch your map in Tiled to have a fixed size, it might fix that bug. Let me know if it does and I'll try to address it.
STI - An awesome Tiled library
LÖVE3D - A 3D library for LÖVE 0.10+
Dev Blog | GitHub | excessive ❤ moé
LÖVE3D - A 3D library for LÖVE 0.10+
Dev Blog | GitHub | excessive ❤ moé
Re: Simple Tiled Implementation - STI v1.2.3.0
Hi there,
I'm quite new to STI and I'm currently using it successfully to create maps with some collision inside (with Box2d).
A quick question though: after init, when I have loaded and displayed all the layers, it is a good idea to "update" a layer to add some collidable tiles ?
I want to add new static and collidable elements, maybe animatable.
I'm trying to do something like:
but it does not work (crash)
I tried adding the tileid in the object of the layer, itdoes not work either (no crash, but may need some call to update).
Is it a good approach or should I use a custom layer (just as in the tutorial for sprites) ?
Thanks in advance
I'm quite new to STI and I'm currently using it successfully to create maps with some collision inside (with Box2d).
A quick question though: after init, when I have loaded and displayed all the layers, it is a good idea to "update" a layer to add some collidable tiles ?
I want to add new static and collidable elements, maybe animatable.
I'm trying to do something like:
Code: Select all
map:setLayerTile("walls", gx, gy, tileid)
I tried adding the tileid in the
Code: Select all
data
Is it a good approach or should I use a custom layer (just as in the tutorial for sprites) ?
Thanks in advance
Re: Simple Tiled Implementation - STI v1.2.3.0
Once you init the collision world, you'd need to add new collision data to the world manually. You can swap tiles in and out of layers visually, but no collision data will be added by doing that. Basically, STI provides a graphical representation of your physics world, but they are otherwise independant systems.
STI - An awesome Tiled library
LÖVE3D - A 3D library for LÖVE 0.10+
Dev Blog | GitHub | excessive ❤ moé
LÖVE3D - A 3D library for LÖVE 0.10+
Dev Blog | GitHub | excessive ❤ moé
Re: Simple Tiled Implementation - STI v1.2.3.0
Thanks for your quick reply.
I succeeded adding static components by creating custom layers and adding manually all needed physics, so I think I am on the good path.
But I'm creating a lot of custom layers (one per static object). Is it OK to create a layer for every object in the game ?
Plus, I don't know how to change the tile in a given layer: I can replace any tile with an ID=0 and it removes it correctly.
But adding another tile ID is a no go (crash).
I succeeded adding static components by creating custom layers and adding manually all needed physics, so I think I am on the good path.
But I'm creating a lot of custom layers (one per static object). Is it OK to create a layer for every object in the game ?
Plus, I don't know how to change the tile in a given layer: I can replace any tile with an ID=0 and it removes it correctly.
But adding another tile ID is a no go (crash).
Who is online
Users browsing this forum: Ahrefs [Bot] and 4 guests