For making complex physics in löve, is creating a personalized engine the only option?

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
User avatar
scissors61
Citizen
Posts: 76
Joined: Fri Jan 08, 2016 10:16 am

For making complex physics in löve, is creating a personalized engine the only option?

Post by scissors61 »

I have this idea about a game like pinball or peggle, where you move different objects in a board in order to interact and control a ball, for this I have to create complex figures with box2d where some move, rotate or act together, like the paddles in pinball. I tried to find something free to use in my system, linux 32bit, but couldn't find anything, if nothing exist for this task, do you guys know any tutorial for using löve physics with the complexity that the game require?
User avatar
s-ol
Party member
Posts: 1077
Joined: Mon Sep 15, 2014 7:41 pm
Location: Cologne, Germany
Contact:

Re: For making complex physics in löve, is creating a personalized engine the only option?

Post by s-ol »

Well why doesn't box2d/love.physics work for you?

s-ol.nu /blog  -  p.s-ol.be /st8.lua  -  g.s-ol.be /gtglg /curcur

Code: Select all

print( type(love) )
if false then
  baby:hurt(me)
end
User avatar
scissors61
Citizen
Posts: 76
Joined: Fri Jan 08, 2016 10:16 am

Re: For making complex physics in löve, is creating a personalized engine the only option?

Post by scissors61 »

It's not that it doesn't work, it works, I just wanted to use a visual tool for making complex physics, for example, I need to join different polygons to make them move together, I can draw them, but to make them join together precisely, or even creating them with the precision that I need, it's really hard to do only by code, I searched for other tools, like l.u.b.e, but it is not free and it doesn't export directly to löve, so I'm here wondering if creating an engine (a tool for making this shapes with precision) is the best way to go.
bobbyjones
Party member
Posts: 728
Joined: Sat Apr 26, 2014 7:46 pm

Re: For making complex physics in löve, is creating a personalized engine the only option?

Post by bobbyjones »

Google Physics Editor. It should be on a website with a couple other tools. Download that and write an exporter for love
Do you frequently have great ideas but immediately lose them? Check out the MVP for my website called IdeaVault. It is designed to solve that problem. Desktop browsers only currently.
User avatar
s-ol
Party member
Posts: 1077
Joined: Mon Sep 15, 2014 7:41 pm
Location: Cologne, Germany
Contact:

Re: For making complex physics in löve, is creating a personalized engine the only option?

Post by s-ol »

Actually I find coding the shapes to be much more precise than eyeballing them in a physics editor. A lor of things can easily be coded that are hard or tiresome to create for example in unity; you can just write code to generate regular polygons, chains of joint-connected objects etc.

If you need something visual to figure out the coordinates, you should be able to find a way to export those from most vector editors.

You won't find an editor that "exports for löve" because there is no löve (physics) format. You need to write some code that reads a format, which could be anything (SVG, json, list of vertices line-by-line....)

s-ol.nu /blog  -  p.s-ol.be /st8.lua  -  g.s-ol.be /gtglg /curcur

Code: Select all

print( type(love) )
if false then
  baby:hurt(me)
end
bobbyjones
Party member
Posts: 728
Joined: Sat Apr 26, 2014 7:46 pm

Re: For making complex physics in löve, is creating a personalized engine the only option?

Post by bobbyjones »

This is the one i was recommending.
https://www.codeandweb.com/physicseditor

It automatically creates collision shapes for you. And it also allows you to edit it.
Do you frequently have great ideas but immediately lose them? Check out the MVP for my website called IdeaVault. It is designed to solve that problem. Desktop browsers only currently.
bobbyjones
Party member
Posts: 728
Joined: Sat Apr 26, 2014 7:46 pm

Re: For making complex physics in löve, is creating a personalized engine the only option?

Post by bobbyjones »

S0lll0s wrote:Actually I find coding the shapes to be much more precise than eyeballing them in a physics editor. A lor of things can easily be coded that are hard or tiresome to create for example in unity; you can just write code to generate regular polygons, chains of joint-connected objects etc.

If you need something visual to figure out the coordinates, you should be able to find a way to export those from most vector editors.

You won't find an editor that "exports for löve" because there is no löve (physics) format. You need to write some code that reads a format, which could be anything (SVG, json, list of vertices line-by-line....)
Well there is physics in love and it is possible to export for physics in love.
Do you frequently have great ideas but immediately lose them? Check out the MVP for my website called IdeaVault. It is designed to solve that problem. Desktop browsers only currently.
User avatar
scissors61
Citizen
Posts: 76
Joined: Fri Jan 08, 2016 10:16 am

Re: For making complex physics in löve, is creating a personalized engine the only option?

Post by scissors61 »

bobbyjones: Right! that's a simpler solution, I think I will be only missing the ability to select the center of different shapes in order to rotate them, but writing an exporter for all the shapes I drew and then start from there it's a lot less troublesome than having to code all the figures, well at least for me.

S0lll0s: I didn't know that one could draw with that precision different shapes, I find it hard even to think I could do that after getting good, because it is almost drawing with numbers instead of a pencil, but your post motivates me to see how could I do it.
User avatar
s-ol
Party member
Posts: 1077
Joined: Mon Sep 15, 2014 7:41 pm
Location: Cologne, Germany
Contact:

Re: For making complex physics in löve, is creating a personalized engine the only option?

Post by s-ol »

scissors61 wrote: S0lll0s: I didn't know that one could draw with that precision different shapes, I find it hard even to think I could do that after getting good, because it is almost drawing with numbers instead of a pencil, but your post motivates me to see how could I do it.
The trick is that with programming you have math on your side, you can calculate smooth curves, circles, etc. Of course if you enter all the coordinates by hand it wont be a lot of fun and might look a little wonky at times, BUT it will probably still be more precicse: parallel lines will always be perfectly paralel, horizontal lines will always be perfectly horizontal etc. when you enter the coordinates.

For example you could take a look at Gary the green legged giraffe from my signature, the neck is what I would call "complex physics" and its completely generated.

s-ol.nu /blog  -  p.s-ol.be /st8.lua  -  g.s-ol.be /gtglg /curcur

Code: Select all

print( type(love) )
if false then
  baby:hurt(me)
end
User avatar
scissors61
Citizen
Posts: 76
Joined: Fri Jan 08, 2016 10:16 am

Re: For making complex physics in löve, is creating a personalized engine the only option?

Post by scissors61 »

I'm already reading your code, and now I know what you meant. And for me doing that is hard, the problem is that math was never on my side, lol, I'm more of the creative type of guy, making doodles and weird stories, but if needed for my game, at least I'll try.
Btw, I couldn't play your game due to compatibility issues, I'm on linux with love 0.10.
Post Reply

Who is online

Users browsing this forum: No registered users and 40 guests