Page 1 of 3

Lope2D [Love2D Physics Engine]

Posted: Tue Apr 16, 2013 10:10 pm
by ilgamer
Hello. My name is Erli Moen and I am a developer of the Lope.
Image

Get it
Bitbucket.org (Lope2D)

Follow the project to get updates first!

What is Lope
Well, Lope is a wrap/layer between Love2D Physics and your game. You could use Lope to make using physics much more easier and faster.
For example, you could use code bellow to create a new body if you are not using Lope:

Code: Select all

testBody = {}
testBody.Body = love.physics.newBody(world, x, y, "dynamic")
testBody.Shape = love.physics.newRectangleShape(width, height)
testBody.Fixture = love.physics.newFixture(testBody.Body, testBody.Shape)
testBody.Body:setMass(mass)
or you could create the same body, using Lope:

Code: Select all

require "lope_core"
testBody = lope_newDynamic(x, y, "rectangle", width, height, mass)
Got it? Cool! ;)

Why Lope doesn't have all the methods of Love2D Physics API?
One of the main thing in Lope is that you can continue using Love2D Physics API to work with objects. You still can call methods and function for testBody and it will return or get parametrs and so on. Lope is a layer and nothing else.

Anything else?
Lope will make your code cleaner. Every time you create and object, you can set its image:

Code: Select all

image_object = love.graphics.newImage("object.png")
testObject = lope_newSolid(x, y, "rectangle", width, height)
lope_setImage(testObject, image_object)
and it will be drawn automatically! You do not need to call draw function for each body! Huzzah!
To draw all bodies images, you need to make like that:

Code: Select all

function love.draw()
    lope_drawWorld()
end
By author
You can find functions synopsis in the lope_core.lua file.
I still developing Lope and there could be bugs. It is not stable yet, unfortunatelly.
If you have a problem, you can describe it below and I will help you with it with a big pleasure!

Re: Lope2D [Love2D Physics Engine]

Posted: Wed Apr 17, 2013 7:13 am
by dwdcth
It's very helpful for me,as I don't kown much abuot phsyis.

Re: Lope2D [Love2D Physics Engine]

Posted: Wed Apr 17, 2013 10:49 am
by ilgamer
dwdcth wrote:It's very helpful for me,as I don't kown much abuot phsyis.
Glad to hear it, dwdcth! I am trying to make some examples for engine. Think that they could be very useful.
Will add them on bitbucket. So you can check it out after 3-5 days, hope some of them will be done for that time.

Re: Lope2D [Love2D Physics Engine]

Posted: Thu Apr 18, 2013 12:08 pm
by dwdcth
ilgamer wrote:
dwdcth wrote:It's very helpful for me,as I don't kown much abuot phsyis.
Glad to hear it, dwdcth! I am trying to make some examples for engine. Think that they could be very useful.
Will add them on bitbucket. So you can check it out after 3-5 days, hope some of them will be done for that time.
When you done,I'll try to learn your Lope2D.

Re: Lope2D [Love2D Physics Engine]

Posted: Thu May 09, 2013 7:42 pm
by Chroteus
Thank you for this piece of awesomeness :) This will surely help me.

Re: Lope2D [Love2D Physics Engine]

Posted: Sat May 11, 2013 8:32 pm
by Count
This seems to be a very useful tool.

Re: Lope2D [Love2D Physics Engine]

Posted: Sat Aug 17, 2013 6:22 pm
by Eamonn
Why this hasn't got much attention I don't know. I feel the need to bump this.

This seems like it's exactly what I'm looking for! Thank you!

Re: Lope2D [Love2D Physics Engine]

Posted: Sat Nov 09, 2013 12:31 am
by LoneArtisan
Nil

Re: Lope2D [Love2D Physics Engine]

Posted: Sat Nov 09, 2013 7:41 am
by T-Bone
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]

Posted: Tue Feb 11, 2014 2:51 am
by alberto_lara
I got this by run it on löve 0.9.0:
Image

Did something change on the love.physics API on 0.9.0?

Thanks.

EDIT: Solved, just added this:

Code: Select all

local arg={...}
to the lope2d.core on line 22 and 85.