how to make a map for love2d
5 replies




how to add a map to my love2d project without sti / with sti correctly
Only registered users are allowed to vote
by another map editor program | 100.00% (2) | |
by another code | 0.00% (0) |
2 votes cast
15.09.23 09:42:48 pm
Hello , guys
from 2 days i was working on a love2d project for making a game
and i did the player and i added animations to it but when i tryied to add the map to love2d with sti by the following code :
after i saved this code and run it i got this error :
note : all of the codes i put arent compelete i just put the code for the map load code
note : i made the map by tiled and after i finished it i exported the first map file as .tmx and after it i exported it as .lua file then i included the .lua file into my text editor by the code ^^^^
i just want help for this problem
from 2 days i was working on a love2d project for making a game
and i did the player and i added animations to it but when i tryied to add the map to love2d with sti by the following code :
Code:
1
2
3
4
5
6
7
8
9
2
3
4
5
6
7
8
9
function love.load()
sti = require 'lib/sti'
map = sti('maps/map.lua')
function love.draw()
map:draw()
sti = require 'lib/sti'
map = sti('maps/map.lua')
function love.draw()
map:draw()
after i saved this code and run it i got this error :
Code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
Error
lib/sti/init.lua:94: STI does not support external Tilesets.
You need to embed all Tilesets.
Traceback
[love "callbacks.lua"]:228: in function 'handler'
[C]: in function 'assert'
lib/sti/init.lua:94: in function 'init'
lib/sti/init.lua:49: in function 'sti'
main.lua:6: in function 'load'
[love "callbacks.lua"]:136: in function <[love "callbacks.lua"]:135>
[C]: in function 'xpcall'
[C]: in function 'xpcall'
lib/sti/init.lua:94: STI does not support external Tilesets.
You need to embed all Tilesets.
Traceback
[love "callbacks.lua"]:228: in function 'handler'
[C]: in function 'assert'
lib/sti/init.lua:94: in function 'init'
lib/sti/init.lua:49: in function 'sti'
main.lua:6: in function 'load'
[love "callbacks.lua"]:136: in function <[love "callbacks.lua"]:135>
[C]: in function 'xpcall'
[C]: in function 'xpcall'
note : all of the codes i put arent compelete i just put the code for the map load code
note : i made the map by tiled and after i finished it i exported the first map file as .tmx and after it i exported it as .lua file then i included the .lua file into my text editor by the code ^^^^
i just want help for this problem
join my discord server : https://discord.gg/gZT8FZ5s
Hey,
I´m sorry that it is not working! >:C
Did you try to google the problem yet?
https://love2d.org/forums/viewtopic.php?t=93730
https://stackoverflow.com/questions/67027441/issue-when-loading-tiled-map-with-sti-for-love2d-game
Kind regards!
PS: According to the error, you messed up the TileSet
I´m sorry that it is not working! >:C
Did you try to google the problem yet?
https://love2d.org/forums/viewtopic.php?t=93730
https://stackoverflow.com/questions/67027441/issue-when-loading-tiled-map-with-sti-for-love2d-game
Kind regards!
PS: According to the error, you messed up the TileSet
Share time limited free games here


Hey,
I´m sorry that it is not working! >:C
Did you try to google the problem yet?
Kind regards!
PS: According to the error, you messed up the TileSet
I´m sorry that it is not working! >:C
Did you try to google the problem yet?
Kind regards!
PS: According to the error, you messed up the TileSet
i cant beleive that , you helped me it worked

thanks very much for helping me
now i can continue the project
Thx

join my discord server : https://discord.gg/gZT8FZ5s
*carefully asking* What is "love2d" even about? Like what are you supposed to do in it? Just asking out of curiosity.
Imagine getting time banned
@
Chingy: https://love2d.org/
It's a framework you can use to make games. Using Lua as scripting language.

It's a framework you can use to make games. Using Lua as scripting language.
@
Chingy: It's a game framework, much like Pygame if you're familiar with it. Except you can use Lua as a scripting language with LuaJIT behind the scenes.





