2D Physic game / sandbox with drawing

@SkyTheCoder, I’ve got to admit, you’ve really stopped agism here…

@juaxix, how did you get the crayon effect lines?

I love the crayon effect ^:)^

@Ignatz, I know, that’s why I want to know :stuck_out_tongue:

Ah, that’s easy, I only play with the parameters of stroke, fill, color, strokeWidth…
Consider you have a simple body or chain / edge

blendMode(MULTIPLY)
noTint()
noSmooth()
noFill()
pushStyle()
 strokeWidth(4.4) -- 5 also
 stroke(color(11,11,211,200) -- your color here
 for i=1,#body.points-1 do
   local a = body.points[i]
   local b = body.points[i+1]
   line( a.x, a.y, b.x, b.y )
 end
popStyle()

of course, if the body has an angle, you have to pushMatrix(), translate and rotate before the line or draw.
I also made a version of this with sprites, using as width and height parameters the distance between points, but it looks weird.

For the other crayon effects I’m using sprites, like clouds, trees, etc,

And this is the trailer:

http://www.youtube.com/watch?v=_oBfWNse5yE

@juaxix - Wow… That’s really cool looking. Did you make it with Blender, or what?

The logo is made in Maya with physics particles, lightning and animations.
I made the whole video in three steps, first record the videos from ingame, then create the After Effects ink video (took some time to render) with a template, then composite in any video software the transitions with music ,sounds, animations and so on.
I’m Glad you liked it!

A-W-S-O-M-E…!!!
I wish you’ll let us know the sales when it is out.

I can’t wait, can’t wait! How much is it going to be? $2-3? The video looks amazing aswell

.@Jmv38 : I ll share :wink:
@Luatee the members of these forums have promo code reserved as other times :slight_smile:

Woo-hoo! =D> (I’m not trolling, I really admire your work @juaxix)

We are in the main page of http://www.gamasutra.com
http://www.gamasutra.com/blogs/JuanFelipeBelonPerez/20130826/198897/How_to_create_2D_Physics_Games_with_Box2D_Library.php

thanks @quezadav

@juaxix - Super cool. Can’t wait for it.

@juaxix In the whole section devoted to Metaballs, he used my code, some of my explanation on how they work, and never mentioned my name…

@SkyTheCoder - that is a bit cheeky, but I suggest you don’t worry too much, nobody reads the code anyway, and it is only a small part of a big project.

People on this forum know you did that code, and that’s what matters :slight_smile:

And you will soon write even better code <):slight_smile:

It was perhaps an unintended omission @-)

@SkyTheCoder - If you release your code to the forums, don’t expect your name to then be plastered everywhere it’s placed. Anything you write is copyrighted, so if you didn’t give him permission to use it, you can tell him not to use it, or make an agreement with specified terms, like he must give you credit everywhere. I, personally, don’t think it’s that big a deal, but it may be to you. Anyways, we all know you wrote that code, so you’ve got a lot of credit.
juaxix - Looking forward to the game!

@SkyTheCoder what is your name? I can mention you if it is what you want.

Anyway the code is good but it will need an update , it gets too slow with physics, perhps i am going for a RK2 solver ( http://www.niksula.hut.fi/~hkankaan/Homepages/metaballs.html ), will post it soon in the metaballs shader post.

Thanks everyone :slight_smile:

I have added the people who helped with this project in special thanks section :wink:
http://www.gamasutra.com/blogs/JuanFelipeBelonPerez/20130826/198897/How_to_create_2D_Physics_Games_with_Box2D_Library.php

If I have forgotten someone, please tell :bz