English how to make a map for love2d

5 replies
Goto Page
To the start Previous 1 Next To the start
Poll Poll
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
Up
blurr
User
Offline Off
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 :


Code:
1
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()





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
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'


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
16.09.23 08:33:37 am
Up
Bowlinghead
User
Offline Off
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
Share time limited free games here
16.09.23 08:03:44 pm
Up
blurr
User
Offline Off
user Bowlinghead has written:
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 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
18.09.23 04:51:40 am
Up
Chingy
User
Offline Off
*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
18.09.23 12:50:30 pm
Up
DC
Admin
Offline Off
@user Chingy: https://love2d.org/
It's a framework you can use to make games. Using Lua as scripting language.
www.UnrealSoftware.de | www.CS2D.com | www.CarnageContest.com | Use the forum & avoid PMs!
24.09.23 11:29:45 am
Up
UrNightmaree
User
Offline Off
@user 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.
IMG:https://basedbin.fly.dev/6dEf2M.webp
To the start Previous 1 Next To the start