Nice
I'm going to make something similar.
Lope2D [Love2D Physics Engine]
Re: Lope2D [Love2D Physics Engine]
alberto_lara, It didn't work with Love2D 0.9. Fixed it. Thank you!
Re: Lope2D [Love2D Physics Engine]
Done! Thank you.T-Bone wrote:Seems like a nice library. It doesn't really matter, but wouldn't it be better if you defined a single "lope" table instead of having lots of functions called "lope_x", like love does? So lope_drawWorld becomes lope.drawWorld. The benefits of this include having less globals and the option of easily changing the name of the entire table.
Re: Lope2D [Love2D Physics Engine]
There is a wiki on bitbucket page. Check it out!
https://bitbucket.org/erlimoen/lope2d-v2/wiki
https://bitbucket.org/erlimoen/lope2d-v2/wiki
- alberto_lara
- Party member
- Posts: 372
- Joined: Wed Oct 30, 2013 8:59 pm
Re: Lope2D [Love2D Physics Engine]
Hi ilgamer, any support for polygons in Lope2D? I barely checked the code and didn't find something about it.
Also I think I found an issue, I don't have an account in bitbucket so, sorry, I'm gonna leave it here:
The above simulation works just with "fill" in lope.draw()
Also I think I found an issue, I don't have an account in bitbucket so, sorry, I'm gonna leave it here:
Code: Select all
require "lope2d"
function love.load()
gr = love.graphics
gr.setColor(255, 127, 0)
gr.setLineStyle("rough")
r = love.math.random
w = gr.getWidth()
h = gr.getHeight()
floor = lope.newBody("static", "rectangle", w / 2, h - 25, w, 50)
lw = lope.newBody("static", "rectangle", 25, h / 2, 25, h)
rw = lope.newBody("static", "rectangle", w - 25, h / 2, 25, h)
ceiling = lope.newBody("static", "rectangle", w / 2, 25, w, 50)
poly = lope.newBody("dynamic", "rectangle", 200, 200, 50, 50)
bodies = {
lw,
rw,
floor,
ceiling,
poly
}
pts = {}
end
function love.update(dt)
lope.update(dt)
end
function love.draw()
--lope.draw(bodies, "fill")
lope.draw(bodies, "line")
end
- alberto_lara
- Party member
- Posts: 372
- Joined: Wed Oct 30, 2013 8:59 pm
Re: Lope2D [Love2D Physics Engine]
Ok, so I made some changes to lope2d.lua to actually support Polygons, no tested with images and the water pools, just the fill mode.Hi ilgamer, any support for polygons in Lope2D?
This is how you create a polygon:
Code: Select all
vertices = {
{x = 194, y = 166},
{x = 208, y = 149},
{x = 243, y = 150},
{x = 344, y = 232},
{x = 301, y = 283},
{x = 218, y = 314},
{x = 160, y = 308}
}
poly = lope.newBody("dynamic", "polygon", vertices)
(Click the window to move the objects)
- alberto_lara
- Party member
- Posts: 372
- Joined: Wed Oct 30, 2013 8:59 pm
Re: Lope2D [Love2D Physics Engine]
The link to bitbucket does not work, is this being maintained?
Re: Lope2D [Love2D Physics Engine]
Looks like the user has been deleted. I keep a clone, if that helps. Not sure how current. Last commit is from April 7, 2014, and I'm pretty sure I cloned it December last year, so it's quite likely it was not maintained.
- EntranceJew
- Prole
- Posts: 31
- Joined: Fri Apr 03, 2015 10:02 pm
- Location: Saint Petersburg, Florida
- Contact:
Re: Lope2D [Love2D Physics Engine]
A good alternative to a simpler love.physics API would be hxdx although it has a few bugs that I've encountered.
- alberto_lara
- Party member
- Posts: 372
- Joined: Wed Oct 30, 2013 8:59 pm
Re: Lope2D [Love2D Physics Engine]
Thanks for the note!EntranceJew wrote:A good alternative to a simpler love.physics API would be hxdx although it has a few bugs that I've encountered.
Who is online
Users browsing this forum: Ahrefs [Bot], Bing [Bot] and 4 guests