Search found 906 matches

by Karai17
Fri Oct 16, 2020 9:30 am
Forum: Libraries and Tools
Topic: Simple Tiled Implementation - STI v1.2.3.0
Replies: 841
Views: 289993

Re: Simple Tiled Implementation - STI v1.2.3.0

The general problem that I can see is that STI needs to control the graphics state to draw the map correctly when transformed, and Luven's camera (as most cameras) also tries to control the graphics state, seemingly causing a conflict. When I removed luven's state-affecting function calls, both the ...
by Karai17
Fri Oct 16, 2020 5:18 am
Forum: Libraries and Tools
Topic: Simple Tiled Implementation - STI v1.2.3.0
Replies: 841
Views: 289993

Re: Simple Tiled Implementation - STI v1.2.3.0

Obviously not the answer you were hoping to hear, but I'm not trying to be rude or mean here. Luven as it is currently designed seems to have a lot of unnecessary code and a bloated API that doesn't really do much. The functionality of Luven seems to be fine enough, just the way in which one would a...
by Karai17
Fri Oct 16, 2020 12:48 am
Forum: Libraries and Tools
Topic: Simple Tiled Implementation - STI v1.2.3.0
Replies: 841
Views: 289993

Re: Simple Tiled Implementation - STI v1.2.3.0

So a few things: 1) Lua's module paths are NOT filesystem paths! You want to use dots instead of slashes when you require files. 2) You're using so many globals that it's impossible to really determine exactly what anything is doing, I'd highly recommend using locals for everything that you can, inc...
by Karai17
Sat Sep 26, 2020 10:08 am
Forum: Libraries and Tools
Topic: Simple Tiled Implementation - STI v1.2.3.0
Replies: 841
Views: 289993

Re: Simple Tiled Implementation - STI v1.2.3.0

I'm glad you found a solution. :)
by Karai17
Wed Sep 23, 2020 9:58 pm
Forum: Libraries and Tools
Topic: Simple Tiled Implementation - STI v1.2.3.0
Replies: 841
Views: 289993

Re: Simple Tiled Implementation - STI v1.2.3.0

Code: Select all

function love.resize(w, h)
   map:resize(w, h)
end
by Karai17
Wed Sep 23, 2020 9:16 pm
Forum: Libraries and Tools
Topic: Simple Tiled Implementation - STI v1.2.3.0
Replies: 841
Views: 289993

Re: Simple Tiled Implementation - STI v1.2.3.0

Hm. It should be scaling the draw and drawing it to the normal sized canvas. Are you adjusting the window size at all? If you adjust the window size, you need to resize the canvas using map:resize(). You are calling resize right after creating the map, you don't need to do that, it should automatica...
by Karai17
Sat Aug 22, 2020 1:54 am
Forum: Libraries and Tools
Topic: Simple Tiled Implementation - STI v1.2.3.0
Replies: 841
Views: 289993

Re: Simple Tiled Implementation - STI v1.2.3.0

Are you sure you are using the correct relative path for the map file? For example, may it be in a folder and not on the root of the game's directory?
by Karai17
Tue Jun 09, 2020 5:11 am
Forum: Libraries and Tools
Topic: Simple Tiled Implementation - STI v1.2.3.0
Replies: 841
Views: 289993

Re: Simple Tiled Implementation - STI v1.2.3.0

For me, #map.layers printed out "2" to terminal, but a basic operator apparently having nondeterministic output is...pretty shocking to say the least. Since map.layers is an array with deterministic length I think it should be fine to use #map.layers here right? It is deterministic, just a bit unin...
by Karai17
Mon Jun 01, 2020 6:08 am
Forum: Libraries and Tools
Topic: Simple Tiled Implementation - STI v1.2.3.0
Replies: 841
Views: 289993

Re: Simple Tiled Implementation - STI v1.2.3.0

local layer = map:addCustomLayer("Sprites", 8) This line seems to trip people up fair bit, I may adjust how this works. But for now, that 8 is the index number you are assigning to the layer. In STI, layers are given both a name and an index. The index is used for draw order, and the name is used f...
by Karai17
Tue May 26, 2020 5:52 pm
Forum: Libraries and Tools
Topic: Simple Tiled Implementation - STI v1.2.3.0
Replies: 841
Views: 289993

Re: Simple Tiled Implementation - STI v1.2.3.0

you don't have a layer in your map named Spawn Point so trying to remove it is throwing an error.