Lope2D [Love2D Physics Engine]
Posted: Tue Apr 16, 2013 10:10 pm
Hello. My name is Erli Moen and I am a developer of the Lope.
![Image](https://bitbucket-assetroot.s3.amazonaws.com/c/photos/2013/Apr/16/lope2d-logo-4161036992-0_avatar.png)
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:
or you could create the same body, using Lope:
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:
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:
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!
![Image](https://bitbucket-assetroot.s3.amazonaws.com/c/photos/2013/Apr/16/lope2d-logo-4161036992-0_avatar.png)
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)
Code: Select all
require "lope_core"
testBody = lope_newDynamic(x, y, "rectangle", width, height, mass)
![Wink ;)](./images/smilies/ms-wink.png)
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)
To draw all bodies images, you need to make like that:
Code: Select all
function love.draw()
lope_drawWorld()
end
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!