have you guys played the crayon game?

1 view
Skip to first unread message

carlos.lunetta

unread,
Jul 25, 2007, 1:20:31 PM7/25/07
to APE General
Hello all

I've come accross this game:
http://www.kloonigames.com/blog/games/crayon/
I'm not sure if most of you is familiar with it, but I had a lot of
fun with it.
Since I'm still very unexperienced with APE, I'd like to ask a newbie
question: would something like that be doable with APE? What would the
limitations/bottlenecks be?

Thanks,

Carlos

carlos.lunetta

unread,
Jul 25, 2007, 1:20:46 PM7/25/07
to APE General
Hello all

I've came across this game:

Paul

unread,
Jul 25, 2007, 2:36:29 PM7/25/07
to APE General
That game looks good - not sure about the music. :-) Relaxing
though. It looks something like this great MIT demo:
http://www.youtube.com/watch?v=NZNTgglPbUA

I think you could do it pretty easily in APE, some work in shape
recognition - boxes or circles. In the Crayon game I see free and
fixed objects, but I don't think you can connect objects, right? That
was a neat feature of the MIT demo.


Paul

alec cove

unread,
Aug 2, 2007, 8:19:18 PM8/2/07
to APE General

Hi Carlos,

That game uses Erin Cattos engine which has true rigid bodies and
handles stacking very well. APE is more of a spring and mass style
engine, but it would be possible to mimic some of the behavior. One of
the problems with an open-ended environment like that is there's
probably some arrangement that would cause blowups or choke the
engine. If you wanted to start out just drawing circles and
rectangles, that would probably be really easy. Creating arrangements
of springconstraints would be more tricky, and prone to instability,
but Im sure you could get a good amount of functionality out of it if
you tried.

Thanks,
Alec

carlos.lunetta

unread,
Aug 2, 2007, 9:50:10 PM8/2/07
to APE General
Awesome. Thanks for the explanation, Alec

ssjs...@gmail.com

unread,
Aug 5, 2007, 12:54:12 AM8/5/07
to APE General
I gave this a shot a little while ago (when I first read this), but I
didn't get too far with it...I started by making the SpringBox
composite from Flade, then then I just did rectangles to
start...width, height, and direction, then it makes it starting at
your start point. It got VERY laggy, VERY fast...so I dropped the
project...heh.

alec cove

unread,
Aug 5, 2007, 8:05:28 PM8/5/07
to APE General

SpringBoxes in APE are going to be really slow since they have 8 items
per rectangle. At some point there's going to be bounding volumes for
composites, which would improve performance.

avgar...@gmail.com

unread,
Aug 8, 2007, 4:41:31 PM8/8/07
to APE General
What is a SpringBox?
Message has been deleted

ssjs...@gmail.com

unread,
Aug 8, 2007, 5:26:12 PM8/8/07
to APE General
A SpringBox was a pre-made composition from Flade, Alec's other
physics engine (written in AS2).
It consisted of:
4 rectangle particles (positioned into a box)
6 spring constraints (four borders, and 2 cross-braces)

It created a jiggley-box of sorts that would rotate around things,
unlike the rectangle particle which maintains it's rotation.

avgar...@gmail.com

unread,
Aug 9, 2007, 12:02:28 AM8/9/07
to APE General
I admit that I haven't had a chance to use APE much (or Flade), but it
doesn't make sense to me that if a rectangle particle maintains its
rotation then it could be used in something else that rotates.
wouldn't the individual rectangle particles have to be able to rotate
in order for a spring box to be able to rotate around things?

alec cove

unread,
Aug 9, 2007, 12:09:20 AM8/9/07
to APE General

A rectangleparticle doesn't have angular velocity. In order to
simulate a rigid body that has angular effects, you need to use some
combination of particles and springs to construct a shape, sort of
like a tinkertoy.

On Aug 9, 12:02 am, "avgarri...@gmail.com" <avgarri...@gmail.com>
wrote:

ssjs...@gmail.com

unread,
Aug 9, 2007, 12:14:27 AM8/9/07
to APE General

Yeah, imagine it like this:
If 1 big (40x40) box fell onto an uneven surface, and it doens't have
angular velocity, it wouldn't 'rotate' to fit the surface.
But
If 2 'small' (1x1, usuailly) points constrained together fall on the
surface, if you zoom in enough, they won't be rotated, but the will be
at different heights, making the constraint appear to be the 'bottom'
of the line, now, if you make 4 small rectangles, and constrain them,
it'll create a box.

avgar...@gmail.com

unread,
Aug 9, 2007, 9:10:05 AM8/9/07
to APE General
Ok, I see what you mean now. So, obviously we can fake angular
velocity for rectangles using SpringBoxes, but are there any plans to
support angular velocity for RectangleParticles? Or would that take a
huge amount of effort?

alec cove

unread,
Aug 9, 2007, 10:10:53 AM8/9/07
to APE General

Its planned but it might be a few more releases before it's in the
library. Handling the angular velocity isnt too hard, but doing the
contact points of the collision and figuring out the collision
response based on that is tricky.

On Aug 9, 9:10 am, "avgarri...@gmail.com" <avgarri...@gmail.com>
wrote:

avgar...@gmail.com

unread,
Aug 9, 2007, 10:45:16 AM8/9/07
to APE General
well, I'm looking forward to it. you're the man, Alec!

I wish I could help in some way, but I've never researched physics
simulation. What reading would you guys suggest for the topic?

Paul

unread,
Aug 9, 2007, 12:52:49 PM8/9/07
to APE General
You can use CircleParticles on the corners instead of Rectangles, but
the idea is the same. The four particles just act as connection
points for the springs. They're affected by 'gravity' and the pull of
the springs connecting them together. You get the right feel and
behavior without the particles needing to rotate individually. The
whole springbox does rotate properly, depending what forces are
applied to it from collisions, gravity, etc.

Another bit to explain is that a spring connected to a particle
doesn't have its angle constrained to the rotation of the particle.
If that makes sense. It's free to rotate around the particle. This
is required to make a springbox work with these non-rotating
particles.


On a side note I think Alex is working on angular constraints, and
maybe even on making the RectangeParticle rotate in response to
forces. ?? But I'm an optimist. :-)

Paul

alec cove

unread,
Aug 10, 2007, 8:52:07 AM8/10/07
to APE General

the best thing to get you started is the jakobsen paper on which the
engine is based -
http://www.teknikus.dk/tj/gdc2001.htm

On Aug 9, 10:45 am, "avgarri...@gmail.com" <avgarri...@gmail.com>
wrote:

alec cove

unread,
Aug 10, 2007, 8:53:16 AM8/10/07
to APE General

Angular constraints are definitely coming, in the next or following
release. True rigid bodies are also planned, but not for a while.
Reply all
Reply to author
Forward
0 new messages