Search found 907 matches

by Karai17
Wed Feb 05, 2020 7:56 am
Forum: Libraries and Tools
Topic: Simple Tiled Implementation - STI v1.2.3.0
Replies: 843
Views: 306597

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: 843
Views: 306597

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: 843
Views: 306597

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: 843
Views: 306597

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: 843
Views: 306597

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.
by Karai17
Tue Dec 24, 2019 1:36 am
Forum: Libraries and Tools
Topic: Simple Tiled Implementation - STI v1.2.3.0
Replies: 843
Views: 306597

Re: Simple Tiled Implementation - STI v1.2.3.0

Object layers support Tile Image Objects as part of the TIled spec, so you could use an object.
by Karai17
Wed Dec 18, 2019 6:47 pm
Forum: Libraries and Tools
Topic: Advanced Tiled Loader - No longer maintained
Replies: 260
Views: 96684

Re: Advanced Tiled Loader - No longer maintained

I guess my question is why did you take the time to update this very old library when there is already one that works with love 11?
by Karai17
Wed Dec 18, 2019 5:05 pm
Forum: Libraries and Tools
Topic: Advanced Tiled Loader - No longer maintained
Replies: 260
Views: 96684

Re: Advanced Tiled Loader - No longer maintained

To what end? STI works just fine and is much, much lighter fundamentally.
by Karai17
Sat Jun 22, 2019 5:38 pm
Forum: Support and Development
Topic: Having problems with an AABB Collision Function
Replies: 3
Views: 4486

Re: Having problems with an AABB Collision Function

function love.update(dt) if not CheckCollision(player.x, player.y, player.w, player.h, blockx, blocky, blockw, blockh) then if love.keyboard.isDown("a", "left") then textx = textx + player.spd * dt blockx = blockx + player.spd * dt end if love.keyboard.isDown("d", "right") then textx = textx - play...