I'm glad you're finding my library useful! I'm using an early January build of Tiled, but animated tiled were recently added (January 23rd) so I think I'll be installing that one today.
I also just pushed a new release (0.6.10) of STI that dramatically improved the load time for maps. Check out the latest benchmarks!
Simple Tiled Implementation - STI v1.2.3.0
Re: Simple Tiled Implementation - STI v0.6.9
STI - An awesome Tiled library
LÖVE3D - A 3D library for LÖVE 0.10+
Dev Blog | GitHub | excessive ❤ moé
LÖVE3D - A 3D library for LÖVE 0.10+
Dev Blog | GitHub | excessive ❤ moé
- UberBosser
- Prole
- Posts: 4
- Joined: Sat Jan 25, 2014 7:13 pm
Re: Simple Tiled Implementation - STI v0.6.10
Hello, im new to love2D and lua. Does this library support love2D 0.9.0? i keep getting this error:
this is the line 5 of my main.lua file : local sti = require "sti"
Code: Select all
main.lua:5: attempt to call global 'require'(a string value)
this is the line 5 of my main.lua file : local sti = require "sti"
- Robin
- The Omniscient
- Posts: 6506
- Joined: Fri Feb 20, 2009 4:29 pm
- Location: The Netherlands
- Contact:
Re: Simple Tiled Implementation - STI v0.6.10
What are the four lines before it? It's likely to be a problem with your code, rather than with STI.
Help us help you: attach a .love.
- UberBosser
- Prole
- Posts: 4
- Joined: Sat Jan 25, 2014 7:13 pm
Re: Simple Tiled Implementation - STI v0.6.10
The first 5 lines are =
Code: Select all
2: x, y = 400, 300 3: playerA = nil 4: require = "data" 5: local sti = require "sti"
Re: Simple Tiled Implementation - STI v0.6.10
You've overwritten the require function by setting it to "data". Use a different variable name.
Re: Simple Tiled Implementation - STI v0.6.10
The problem lies in the fourth line: require = "data" makes the global variable "require" point to the string "data", in fact preventing you from accessing the require[d, ha ha pun] function. Remove that line, or assign the string to another variable
Fake edit: ninja'd
Fake edit: ninja'd
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
ls = love.sound
la = love.audio
lp = love.physics
lt = love.thread
li = love.image
lg = love.graphics
- UberBosser
- Prole
- Posts: 4
- Joined: Sat Jan 25, 2014 7:13 pm
Re: Simple Tiled Implementation - STI v0.6.10
Thanks, but now how do i create the map .lua file, do i just change the the .tmx file to .lua or do i need to do it differently? Are there any Tutorials online? Thanks for everything.Kingdaro wrote:You've overwritten the require function by setting it to "data". Use a different variable name.
Re: Simple Tiled Implementation - STI v0.6.10
Thanks for checking out my library! If you click File, then Export, you can export your TMX to a Lua file. Alternatively, ctrl+E will also bring up the Export menu.
STI - An awesome Tiled library
LÖVE3D - A 3D library for LÖVE 0.10+
Dev Blog | GitHub | excessive ❤ moé
LÖVE3D - A 3D library for LÖVE 0.10+
Dev Blog | GitHub | excessive ❤ moé
- UberBosser
- Prole
- Posts: 4
- Joined: Sat Jan 25, 2014 7:13 pm
Re: Simple Tiled Implementation - STI v0.6.10
Ok, so its all working but... Its hiding my player. How do i make a tile solide and how do i make one "not solid" do i do it directly in Tiled or then code it in in the main.lua. Sorry for the newby Question
Re: Simple Tiled Implementation - STI v0.6.10
Draw order is important. If you are drawing your player before you are drawing the map, then the map will be on top. I've included the ability to place objects such as your player within the map itself, giving it a proper draw order. Check out the Callbacks section of the documentation for an example.
If you're referring to "solid" as in a collidable tile where the player cannot move, you can create a Collision Map with STI, but you need to write your own collision code to work with that map.
If you're referring to "solid" as in a collidable tile where the player cannot move, you can create a Collision Map with STI, but you need to write your own collision code to work with that map.
STI - An awesome Tiled library
LÖVE3D - A 3D library for LÖVE 0.10+
Dev Blog | GitHub | excessive ❤ moé
LÖVE3D - A 3D library for LÖVE 0.10+
Dev Blog | GitHub | excessive ❤ moé
Who is online
Users browsing this forum: No registered users and 2 guests