Designing a convex basket

For my game which is about 45% complete, the aim is to get the ball into a basket, which is realistically a convex shape which only detects a collision at the base. Collision on the sides does not initiate a win. The basket is intended to look like this:


I use the asset design software ‘GIMP’, how would I design such an asset which only initiates actions when a certain part of it has received contact. I was thinking of designing three assets, splitting the basket into three parts, but I thought there might be a more convenient way.

(I cannot just draw a basket in gimp because I’m trying to achieve a convex shape you cannot do that in gimp. )

you only need one asset. If you can’t do it in GIMP use a different tool. There are plenty of them.

This is just a series of lines. What about just using DrawNode?

1 Like

Its a simple sprite, just detect the ball being in the box with a simple bounds check.

I have just browsed the docs for this syntax, but cannot seem to exact what it is, though I think I get a general idea from your reply, is it for 1D design or 2D design, as in will it just be a skinny 3 line basket or an actual basket like the image? Otherwise, drawnode sounds like what I’m looking for.

1d?

Look at th DrawNode API and cpp-tests. All your questions are answered there including almost an exact implementation between various cpp-tests examples.

the api? I don’t see it in the docs to a significant level.

Use 1d lines to make your basket

The API shows this and cpp-tests shows a working pinball style example that does everything your game needs. Plus the other physics tests that show 1 way platforms