Bezier Goodness

Showcase your libraries, tools and other projects that help your fellow love users.
User avatar
Roland_Yonaba
Inner party member
Posts: 1563
Joined: Tue Jun 21, 2011 6:08 pm
Location: Ouagadougou (Burkina Faso)
Contact:

Re: Bezier Goodness

Post by Roland_Yonaba »

I just came accross this article on Gamedev yesterday. I thought it would be good to share, maybe it can provide some ideas for the next iteration.
It talks about the deCasteljau algorithm and mention a few others techniques.
Post: http://www.gamedev.net/page/resources/_ ... rves-r3166

Love the lighting stuff, and the threaded rendering! Awesome!
Keep it up!
Germanunkol
Party member
Posts: 712
Joined: Fri Jun 22, 2012 4:54 pm
Contact:

Re: Bezier Goodness

Post by Germanunkol »

Nice, thanks for sharing the article! And thanks for the nice words.
I did a lot of reading on Beziers lately, it's really nice how much can be done with them relatively easily...

I might not go further with this project, because what I wanted to do seems almost impossible with today's internet speeds and the average CPU...
Maybe I will, though. But first I'll help Micha finish his Project.
trAInsported - Write AI to control your trains
Bandana (Dev blog) - Platformer featuring an awesome little ninja by Micha and me
GridCars - Our jam entry for LD31
Germanunkol.de
digdugluv
Prole
Posts: 8
Joined: Mon Jul 07, 2014 10:40 pm

Re: Bezier Goodness

Post by digdugluv »

I made a small bezier demo with the new http://love2d.org/wiki/love.math.newBezierCurve

Mouse left right to change number of curves. Mouse up down to change stroke width (has no FPS effect on my machine).
screenshot.png
screenshot.png (838.05 KiB) Viewed 2306 times
EDIT: added inspect.lua to love file
Attachments
bezier-1.love
(4 KiB) Downloaded 119 times
Last edited by digdugluv on Fri Jul 11, 2014 12:39 pm, edited 1 time in total.
Germanunkol
Party member
Posts: 712
Joined: Fri Jun 22, 2012 4:54 pm
Contact:

Re: Bezier Goodness

Post by Germanunkol »

Inspect.lua seems to be missing from the package?

Might be a capitalization thing (Linux is case-sensitive with file names)...
Edit: No, it's really missing. I only have a main.lua in the archive.
trAInsported - Write AI to control your trains
Bandana (Dev blog) - Platformer featuring an awesome little ninja by Micha and me
GridCars - Our jam entry for LD31
Germanunkol.de
digdugluv
Prole
Posts: 8
Joined: Mon Jul 07, 2014 10:40 pm

Re: Bezier Goodness

Post by digdugluv »

Fixed. My bad.
User avatar
Ranguna259
Party member
Posts: 911
Joined: Tue Jun 18, 2013 10:58 pm
Location: I'm right next to you

Re: Bezier Goodness

Post by Ranguna259 »

I remember doing some stuff with bezier curves when love 0.9.0 first came out, it was originaly meant for animations but I droped it.

keys 1-9 to change drawing states, left mouse button to add a point to the current state and right mouse button to remove a point. You can move around existing points to change the curve.
Attachments
Bezier.love
(1.05 KiB) Downloaded 136 times
LoveDebug- A library that will help you debug your game with an on-screen fully interactive lua console, you can even do code hotswapping :D

Check out my twitter.
Germanunkol
Party member
Posts: 712
Joined: Fri Jun 22, 2012 4:54 pm
Contact:

Re: Bezier Goodness

Post by Germanunkol »

Love this stuff! Thank you both for sharing!

The code in the OP is of course obsolete. Now that Love 0.9 is out, making my own Bezier curves is pretty useless. I haven't done any benchmarking, but I'm sure Love's internal bezier curves are much faster than what I did.
Still it was fun to create!
trAInsported - Write AI to control your trains
Bandana (Dev blog) - Platformer featuring an awesome little ninja by Micha and me
GridCars - Our jam entry for LD31
Germanunkol.de
Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests