Questions tagged [love2d]

Love2D is a framework for scripting 2D games in Lua. It has cross platform support for Windows, Linux, Mac OS X, Android and iOS.

LÖVE is a free, multiplatform, Lua framework for creating 2D games; LÖVE is distributed under the very permissive zlib/libpng license, allowing its use for commercial purposes.

Overview and Features

LÖVE is implemented in modular C++, using Lua 5.1 as its user-facing scripting language.
Some of its more notable features include:

  • Mainline support for Windows, Linux, and Mac OSX.
  • OpenGL accelerated 2D
  • GLSL Shaders
  • Lua 5.1 scripting support
  • Game packaging and self-running packages. ('.lovechives', and 'merged binaries')
  • Image formats: PNG, JPEG, TGA, BMP, (et al.)
  • Audio formats: WAV, OGG, MP3, MOD, (et al.)
  • Archive formats: ZIP, 7ZIP, (et al.)

Resources and Community

Related Tags:

653 questions
4
votes
1 answer

love2d - cannot run hello word

I just started learning love2d but I can't test it because it does not seem to detect any main.lua file in the directory passed as argument. Here's a bash output that quickly summarize the issue: ~/test ❯ pwd /home/simon/test ~/test ❯ lse…
Sir Robin
  • 182
  • 2
  • 14
4
votes
6 answers

Error while trying to open 'Love2d' game engine

I'm trying to open a game with Love2D and the following error occurs: Error boot.lua:577: Cannot load game at path '/home/panali/Desktop/Lua.love/main.lua'. Make sure a folder exists at the specified path. Traceback [C]: in function 'error' …
user13077054
4
votes
2 answers

Getting multiple values from a function without creating a variables in LUA

Is there any way to get several values from a function without creating variables for it? local major, minor, revision, codename = love.getVersion() -- Get current LÖVE version as a string. So instead of making four different variables (or array)…
younyokel
  • 327
  • 2
  • 15
4
votes
1 answer

Why does it say: "Bad argument #1 to 'remove' (table expected, got nil)'"

I'm trying to spawn random bullets from the side of the screen that the player has to dodge. When I try to do this, I get this error: Error main.lua:69: bad argument #1 to 'remove' (table expected, got nil) Traceback [C]: in function…
Beau
  • 55
  • 2
  • 5
4
votes
2 answers

Lua Love2D - How can I make it download a file?

Title. It's only allowed to save to a certain directory, but is there a way of making an executable made with it update itself? I've got the code to check if it's out of date (HttpGet), but not sure how to intall the newer update. Main reason is…
Ashley Davies
  • 1,873
  • 1
  • 23
  • 42
4
votes
2 answers

Classes and modules and Lua, oh my

I'm working on a game in Lua, and so far I have everything working with everything in one document. However, to better organize everything, I've decided to expand it into modules, and while I figure I could probably get it working more or less the…
Adam
  • 155
  • 1
  • 1
  • 11
4
votes
2 answers

Strange texture behavior on mesh in Love2D, Help needed to achieve the result I was expecting

The following code has this result: local mesh = nil local img = love.graphics.newImage("test_blue.png") function love.load() mesh = love.graphics.newMesh(4, img, "fan") mesh:setVertices({ {125, 100, 0, 0, 255, 255, 255, 255}, --Top Left …
buddy148
  • 167
  • 1
  • 1
  • 9
4
votes
1 answer

How does luasocket's settimeout() work?

I have the following code: function Server:run() print("Running.") self.running = true while self.running do if self.client == nil then self.client = self.socket:accept() print("Client connected.") …
4
votes
1 answer

How do I create a save game feature in love2d?

I am new to game development but I need to know if it is possible to create a save game feature in love2d with lua.
noneya231
  • 59
  • 1
  • 4
4
votes
1 answer

Open a Lua .love file in Vim

So today I learned that Vim opens zip files for viewing and modification in an interface very similar to the directory browser. Is there a way to open .love files accordingly? I tried setting the filetype: vim red-pill.love -c "set…
adam_0
  • 6,920
  • 6
  • 40
  • 52
4
votes
1 answer

Lua/LOVE indexing problems

I'm getting a very irritating error whenever I do anything like this with arrays. I have code that sets up the array in the love.load() function: function iceToolsInit() objectArray = {} --for object handling objectArrayLocation = 0 end and…
4
votes
3 answers

Measuring elapsed time in lua (+love2D)

I'm trying to measure time of my code execution with the os.time() function and display it with LOVE framework. But, to my surprise, the displayed times are changing... My code is: function foo() start_time = os.time()
Ola M
  • 1,298
  • 3
  • 12
  • 27
4
votes
2 answers

Lua: Adding multiple rows to tables

Ok, so I'm looking to quickly generate a rather large table. Something that would look like this: table{ {1, 1, 1, 1}, {1, 1, 1, 1}, {1, 1, 1, 1}, } Only the table would contain far more rows, and far more values in those rows. I know using…
brunothepig
  • 43
  • 1
  • 4
4
votes
0 answers

Love2D keyboard.isDown key values?

Is there a list of key values somewhere? I might be completely derping out, but I haven't found a list. Can someone help?
user1610406
  • 722
  • 1
  • 13
  • 24
3
votes
1 answer

Love2D NewImageFont won't render

I'm working on a game and have created a simple numeric "font" for displaying the number of days. Love2D's newImageFont() function lets one use a specifically-formatted image to create a font for any number of glyphs. I've created my font, loaded it…
kristinalustig
  • 343
  • 4
  • 9
1
2
3
43 44