Simple Tiled Implementation - STI v1.2.3.0
Re: Simple Tiled Implementation - STI v1.2.3.0
do you need proper physics for your game? box2d might be overkill. it might be worth looking into using the bump plugin instead
Last edited by Karai17 on Sun Nov 21, 2021 10:55 pm, edited 1 time in total.
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
Here is the ZIP archive for the game. I am using LÖVE2D 11.3 with master branch of STI.
- Attachments
-
- bulldozer.zip
- (2.68 MiB) Downloaded 888 times
Re: Simple Tiled Implementation - STI v1.2.3.0
Hum . . . interesting suggestion: use bump instead of Box2D. I want to push the rocks (well, I want my grandson to push the rocks); that is quite simple. I will read about bump and consider switching. Thanks.
Will AABB make all the rocks effectively rectangular? Will they rotate when pushed at an angle? Much to think about.
Thanks again for the suggestion.
P. S. So, am I going off the beaten path?
Will AABB make all the rocks effectively rectangular? Will they rotate when pushed at an angle? Much to think about.
Thanks again for the suggestion.
P. S. So, am I going off the beaten path?
Re: Simple Tiled Implementation - STI v1.2.3.0
i don't think bump is able to rotate, everything would be a rectangle.
you're not necessarily going off the beaten path, but it's worth mentioning that box2d is a full physics engine which is almost always overkill. i think the LHC library can do rotations bit there is no current plugin for sti.. but you could make one!
you're not necessarily going off the beaten path, but it's worth mentioning that box2d is a full physics engine which is almost always overkill. i think the LHC library can do rotations bit there is no current plugin for sti.. but you could make one!
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
I made a smaller 8 x 8 map with one rock and added print statements to the Box2D plugin. I begin to understand: Each collidable tile has a corresponding static collision rectangle, but it is offset by a factor of two. Similarly, the rock has a dynamic collision rectangle. I just need to follow the code logic till I find where the tile polylines are replaced with rectangles and where the factor of two is added. Same with the rock. This will be easier that making a HC plugin from scratch.
Why does a four vertex polyline get a newEdgeShape instead of a newChainShape.
I will look at HC to see if it can do what I want. Can STI work without a plugin, with hand made HC code?
Why does a four vertex polyline get a newEdgeShape instead of a newChainShape.
I will look at HC to see if it can do what I want. Can STI work without a plugin, with hand made HC code?
Re: Simple Tiled Implementation - STI v1.2.3.0
The plugin is how the data from STI gets inserted into the Box2D world. You could write custom code to handle it but it woudl have to effectively do what a plugin would have to do anyway so if you're gonna write HC code, may as well wrap it up~
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
Good point! If I decide that HC can do all I need, it is better to make a plugin for it than to put the code in my game.
Re: Simple Tiled Implementation - STI v1.2.3.0
Karai17,
What is the meaning and purpose of oy in sti/init.lua ?
Thanks.
What is the meaning and purpose of oy in sti/init.lua ?
Code: Select all
newInstance.oy = tile.r ~= 0 and tile.height or 0
Re: Simple Tiled Implementation - STI v1.2.3.0
I believe that is an offset value for staggered maps.
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 to your encouragement, I am making progress. Some problems remain: 1) Not all walls are present. 2) There a double offset for the rock. 3) The rock triangles are not bound together. This is great!
Who is online
Users browsing this forum: Bing [Bot] and 0 guests