Lope2D [Love2D Physics Engine]

Showcase your libraries, tools and other projects that help your fellow love users.
ilgamer
Prole
Posts: 10
Joined: Fri Apr 12, 2013 5:55 am

Lope2D [Love2D Physics Engine]

Post 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!
Last edited by ilgamer on Fri Apr 18, 2014 3:11 am, edited 6 times in total.
dwdcth
Prole
Posts: 10
Joined: Mon Dec 24, 2012 2:54 am

Re: Lope2D [Love2D Physics Engine]

Post by dwdcth »

It's very helpful for me,as I don't kown much abuot phsyis.
ilgamer
Prole
Posts: 10
Joined: Fri Apr 12, 2013 5:55 am

Re: Lope2D [Love2D Physics Engine]

Post 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.
dwdcth
Prole
Posts: 10
Joined: Mon Dec 24, 2012 2:54 am

Re: Lope2D [Love2D Physics Engine]

Post 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.
User avatar
Chroteus
Citizen
Posts: 89
Joined: Wed Mar 20, 2013 7:30 pm

Re: Lope2D [Love2D Physics Engine]

Post by Chroteus »

Thank you for this piece of awesomeness :) This will surely help me.
Count
Prole
Posts: 1
Joined: Sat May 11, 2013 5:22 pm
Contact:

Re: Lope2D [Love2D Physics Engine]

Post by Count »

This seems to be a very useful tool.
User avatar
Eamonn
Party member
Posts: 550
Joined: Sat May 04, 2013 1:29 pm
Location: Ireland

Re: Lope2D [Love2D Physics Engine]

Post 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!
"In those quiet moments, you come into my mind" - Liam Reilly
User avatar
LoneArtisan
Prole
Posts: 12
Joined: Thu Apr 11, 2013 6:20 pm

Re: Lope2D [Love2D Physics Engine]

Post by LoneArtisan »

Nil
Last edited by LoneArtisan on Mon May 26, 2014 8:30 pm, edited 1 time in total.
You know that moment when you finally do that thing you've been trying to accomplish for hours and you finally get it exactly right? No matter how small the task was, it's one of the greatest things that could happen when you're programming!
User avatar
T-Bone
Inner party member
Posts: 1492
Joined: Thu Jun 09, 2011 9:03 am

Re: Lope2D [Love2D Physics Engine]

Post 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.
User avatar
alberto_lara
Party member
Posts: 372
Joined: Wed Oct 30, 2013 8:59 pm

Re: Lope2D [Love2D Physics Engine]

Post 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.
Post Reply

Who is online

Users browsing this forum: No registered users and 38 guests