Search found 892 matches

by Karai17
Fri Feb 21, 2020 8:40 pm
Forum: Libraries and Tools
Topic: Simple Tiled Implementation - STI v1.2.3.0
Replies: 811
Views: 214618

Re: Simple Tiled Implementation - STI v1.2.3.0

Yeah, custom layers are just layers that you dump your own data into. You can use one layer for tonnes of objects, it just allows you to order the draws so that your objects draw over and under other layers correctly. As for the crash, I am uncertain about that. Can you share a .love example I can t...
by Karai17
Fri Feb 21, 2020 1:47 pm
Forum: Libraries and Tools
Topic: Simple Tiled Implementation - STI v1.2.3.0
Replies: 811
Views: 214618

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 indepen...
by Karai17
Thu Feb 20, 2020 1:01 pm
Forum: Libraries and Tools
Topic: Simple Tiled Implementation - STI v1.2.3.0
Replies: 811
Views: 214618

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 sin...
by Karai17
Mon Feb 17, 2020 3:44 am
Forum: Libraries and Tools
Topic: Simple Tiled Implementation - STI v1.2.3.0
Replies: 811
Views: 214618

Re: Simple Tiled Implementation - STI v1.2.3.0

can you send me a .love file that i can test with?
by Karai17
Sun Feb 16, 2020 7:51 am
Forum: Libraries and Tools
Topic: Simple Tiled Implementation - STI v1.2.3.0
Replies: 811
Views: 214618

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?
by Karai17
Wed Feb 05, 2020 7:56 am
Forum: Libraries and Tools
Topic: Simple Tiled Implementation - STI v1.2.3.0
Replies: 811
Views: 214618

Re: Simple Tiled Implementation - STI v1.2.3.0

What I meant was that they *shouldn't* be globals, but the way you've defined them, they are. Globals are bad except in extremely specific cases and you should do your best to avoid them at almost all costs.
by Karai17
Tue Feb 04, 2020 11:14 pm
Forum: Libraries and Tools
Topic: Simple Tiled Implementation - STI v1.2.3.0
Replies: 811
Views: 214618

Re: Simple Tiled Implementation - STI v1.2.3.0

hi5! I noticed that you have sx and sy as args but you don't actually use them, and that your px and py values are actually globals. You may want to tidy that up a bit before submitting a plugin. ;)
by Karai17
Tue Feb 04, 2020 4:07 pm
Forum: Libraries and Tools
Topic: Simple Tiled Implementation - STI v1.2.3.0
Replies: 811
Views: 214618

Re: Simple Tiled Implementation - STI v1.2.3.0

The map.layers table is set up to both be an array and a hashmap, so you could override map.draw or create your own map.parallax_draw function and just loop through the layers table and draw them based on their parallax speed. local map = sti("maps/01.lua") map.custom_draw = function(self) for _, la...
by Karai17
Fri Jan 31, 2020 10:01 pm
Forum: Libraries and Tools
Topic: Simple Tiled Implementation - STI v1.2.3.0
Replies: 811
Views: 214618

Re: Simple Tiled Implementation - STI v1.2.3.0

additional tutorials and plugins are very much welcome! feel free to make a pull request if you'd like the tutorial added to the main repo. credit yourself and all that too~
by Karai17
Mon Dec 30, 2019 6:48 pm
Forum: Libraries and Tools
Topic: Simple Tiled Implementation - STI v1.2.3.0
Replies: 811
Views: 214618

Re: Simple Tiled Implementation - STI v1.2.3.0

it would seem that the object's name is not the exact same in your code and your map. strings are case sensitive.