Here's a link to a Box2d top-down car tutorial. It is written in C#, but the methodology is the same. I reproduced it a few years ago(in v0.9), but I have a new computer now so those files are long gone. Anyways, I hope it helps you if you decide to use Box2d.
Link
Search found 234 matches
- Tue Apr 10, 2018 12:57 pm
- Forum: Support and Development
- Topic: Online Racing Game
- Replies: 8
- Views: 3792
- Sun Mar 11, 2018 2:28 pm
- Forum: General
- Topic: LOVE users map
- Replies: 182
- Views: 119608
Re: LOVE users map
Glens Falls, NY, USA
- Sun Feb 25, 2018 4:26 pm
- Forum: Support and Development
- Topic: Gamestates and "..."
- Replies: 1
- Views: 1424
Re: Gamestates and "..."
I do states a little differently than some, but I like how it works... In 'main.lua' I have a table of usable states(which inherit from a base so they have fallback methods predefined) and I create an event for state changes right in Love's event system: local curState = "menu" local State...
- Fri Feb 02, 2018 2:10 am
- Forum: Support and Development
- Topic: Bump.lua - how to change or display collision box?
- Replies: 21
- Views: 12874
Re: Bump.lua - how to change or display collision box?
Code: Select all
local x, y, w, h = world:getRect(items[i])
love.graphics.rectangle("line", x-w/2, y-h/2, w, h)
- Thu Jan 25, 2018 12:57 am
- Forum: Support and Development
- Topic: Help with random spawning
- Replies: 1
- Views: 2014
Re: Help with random spawning
There are a few things... First, you are calling your create function inside love.draw, which means it will be called every single frame. Also, you're calling the draw function inside the constructor function, that's why it flashes... It only shows for one frame. Here's a small example: local trees ...
- Mon Jan 22, 2018 6:28 pm
- Forum: General
- Topic: Are there any ways to make openworld?
- Replies: 4
- Views: 5404
Re: Are there any ways to make openworld?
Here is a basic example of world chunking to help get you started, if that's the route you choose. Fair warning, this is not optimized, just a quick mock-up I threw together.
EDIT:
Here's the github for it, as I changed it up a little. https://github.com/adean91/2D-World-Chunking
EDIT:
Here's the github for it, as I changed it up a little. https://github.com/adean91/2D-World-Chunking
- Fri Jan 12, 2018 12:21 am
- Forum: General
- Topic: Building a Level Editor in Visual Studio
- Replies: 1
- Views: 1951
Re: Building a Level Editor in Visual Studio
Since it's only a level editor, it doesn't even need to know Love exists. Just make sure you structure the output so you can make use of it.
- Fri Jan 05, 2018 1:32 am
- Forum: Games and Creations
- Topic: Hexpress - a musical instrument for Android
- Replies: 7
- Views: 7998
Re: Hexpress - a musical instrument for Android
This is nice! I agree that you should include the notes on the buttons for the other instruments as well. Also, maybe its just me but, I think you should have the guitar strings in the opposite order. Although I can read sheet music and play it IRL, doing it on your app felt awkward that it was that...
- Sat Dec 09, 2017 2:07 am
- Forum: Support and Development
- Topic: [SOLVED] Attributing global function to table
- Replies: 3
- Views: 2297
Re: Attributing global function to table
Something like this?
Code: Select all
function crowbar()
local item = {
damage = 10,
swingSpeed = .4
}
function item:use()
-- do whatever
end
return item
end
-- then assign and use it
item[1] = crowbar()
item[1]:use()
- Fri Oct 27, 2017 1:38 am
- Forum: Support and Development
- Topic: [SOLVED]Downloading large files + display status
- Replies: 10
- Views: 10233
Re: [Not solved! (another problem)]Downloading large files + display status
*Edit: Updated the demo to fix thread error handling and wrong usage of io.open It's generally frowned upon to use Lua's IO functions directly. I got an error with your demo and had to change line 25 in main.lua: -- From io.output(log_filename) -- To love.filesystem.write(log_filename, "")