Page 6 of 8

Re: Loveballs, A love2d Softbody lib

Posted: Thu Feb 05, 2015 2:51 pm
by IndieRetro
ArchAngel075 wrote:to be honest here im more keen on seeing how you pulled off spacing of your outer nodes on arbitrary shapes since mine is just not worth it at times - outer nodes get placed so awkwardly at times.

I am more focused on setRadius as i really wanted to fix (and did) some bugs.

Im going to wait for arbitrary shapes to be implemented and then add a scaling feature (like setRadius)

After that i badly want to see if i can pull of a lerp between shapes (become a square from a triangle and back..for soft bodies?!)


##EDIT##

Patched my radiusSet branch to now change the self.centerShape radius correctly. This points to a hopefully final part of the branch (there are 0 bugs that i am aware of)
loveballs - setRadius.love
controls :
z and x - increase and decrease radius of softBody
a and d - roll left and right

Hey this is looking really good, I'll merge the setRadius with the lib soon :)

Heres a snippet of code on how I do the outerNodes. A word of warning, its really messy because I've been debugging and trying random stuff.

Code: Select all

	self.nodeShape = love.physics.newCircleShape(8);
	self.nodeShape2 = love.physics.newCircleShape(14);

	for i=1,#points,2 do
		local x = points[i];
		local y = points[i+1];

		if points[i+2] then
			local x2 = points[i+2];
			local y2 = points[i+3];

			local angle = math.atan2(y2 - y, x2 - x);
			local count = math.dist(x, y, x2, y2)/(self.nodeShape:getRadius()*1.8);

			for j=1,count do

				local dx = (j*(self.nodeShape:getRadius()*2)) * math.cos(angle);
				local dy = (j*(self.nodeShape:getRadius()*2)) * math.sin(angle);

				local b = love.physics.newBody(world, x+dx, y+dy, "dynamic");
				local f = love.physics.newFixture(b, self.nodeShape2);

				table.insert(self.nodes, {body = b, shape = self.nodeShape2, fixture = f});
			end

Re: Loveballs, A love2d Softbody lib

Posted: Thu Feb 05, 2015 3:59 pm
by ArchAngel075
do note my houses power will die in 5 minutes (ZA -sigh-) Excuse any rushing

Im actually surprised by your approach, didnt think of using a node count method.

Also, is [math.dist] really a thing? becuse the number of times i lazily ripped the math from mlib (lazyness) is uncountable.

Re: Loveballs, A love2d Softbody lib

Posted: Thu Feb 05, 2015 4:40 pm
by DaedalusYoung
I'm sure you have to add math.dist yourself, see this wiki page: [wiki]General_math[/wiki]

Re: Loveballs, A love2d Softbody lib

Posted: Thu Feb 05, 2015 10:59 pm
by IndieRetro
Just an update, I'm currently working on a project using this, well a slightly different version.

Ice

Editor

More ice

Re: Loveballs, A love2d Softbody lib

Posted: Fri Feb 06, 2015 8:03 am
by Reef
This is really cool. I hope you make a game with this!

Re: Loveballs, A love2d Softbody lib

Posted: Fri Feb 06, 2015 8:55 am
by adnzzzzZ
That's some really cool shit. Make sure the game has actual gameplay though instead of just physics based moving arounding stuff, since that gets old pretty fast.

Re: Loveballs, A love2d Softbody lib

Posted: Fri Feb 06, 2015 1:18 pm
by IndieRetro
adnzzzzZ wrote:That's some really cool shit. Make sure the game has actual gameplay though instead of just physics based moving arounding stuff, since that gets old pretty fast.
Yep, I'm going to try and keep the for-show bits down to a minimum, and have lots of physical puzzles and platforming around, like big swings and stuff that you have to jump across ^^

Re: Loveballs, A love2d Softbody lib

Posted: Mon Feb 09, 2015 1:22 am
by Connorses
IndieRetro wrote:
adnzzzzZ wrote:That's some really cool shit. Make sure the game has actual gameplay though instead of just physics based moving arounding stuff, since that gets old pretty fast.
Yep, I'm going to try and keep the for-show bits down to a minimum, and have lots of physical puzzles and platforming around, like big swings and stuff that you have to jump across ^^
Since I played Gish (I'm probably it's biggest fan O_O), I've already seen a lot of that done and I was thinking about how I can make something with a unique feel rather than copying the style completely. Before I do that, however, I need to implement a level editor, and I wanted to ask if you'll show me how you built the maps in those videos with all the vector art and smooth ramps. They look amazing!

Re: Loveballs, A love2d Softbody lib

Posted: Mon Feb 09, 2015 3:41 am
by IndieRetro
Connorses wrote:
IndieRetro wrote:
adnzzzzZ wrote:That's some really cool shit. Make sure the game has actual gameplay though instead of just physics based moving arounding stuff, since that gets old pretty fast.
Yep, I'm going to try and keep the for-show bits down to a minimum, and have lots of physical puzzles and platforming around, like big swings and stuff that you have to jump across ^^
Since I played Gish (I'm probably it's biggest fan O_O), I've already seen a lot of that done and I was thinking about how I can make something with a unique feel rather than copying the style completely. Before I do that, however, I need to implement a level editor, and I wanted to ask if you'll show me how you built the maps in those videos with all the vector art and smooth ramps. They look amazing!

The level editor is pretty simple really. Mostly just meshes and sprites for scenery. I'll go make a cupa' tea and do a dev blog post on the editor and how it all works! I'll reply to your comment once its done (http://www.indieretro.co.uk)

In the mean time, heres the latest video:



EDIT: I've made a blog post on it here :)

Re: Loveballs, A love2d Softbody lib

Posted: Mon Feb 09, 2015 7:29 pm
by Jasoco
That's amazing. Like simply amazing.