Layers, catch Balls?

Anything libgdx related goes here!

Layers, catch Balls?

Postby gameZero » Tue May 01, 2012 7:45 am

Hi,

I want to write a small game.

On the picture you see three green Layers and Balls (4 Balls. One is checkered, because hidden - behind the layer). The Balls show up randomly - visible or hidden.
When I see a little piece, then I can shoot the ball.

One more thing .... The Layers will be pictures (Trees, meadow etc.) with transparency. The balls will also be pictures.

EDIT:
How can i do that, how check that with the Layers (pictures) and balls? I mean, when i touch the screen (mobile device) and when i see a little bit of the ball i tap it and it will be destroyed.

Thanks for any help!
Attachments
Layers_Shot.jpg
Layers_Shot.jpg (23.87 KiB) Viewed 315 times
Last edited by gameZero on Tue May 01, 2012 9:09 am, edited 3 times in total.
gameZero
 
Posts: 56
Joined: Sun Jan 08, 2012 5:30 pm

Re: Layers, catch Balls?

Postby SIAS87 » Tue May 01, 2012 7:48 am

What's your question?
SIAS87
 
Posts: 60
Joined: Mon Jan 24, 2011 8:40 pm

Re: Layers, catch Balls?

Postby BurningHand » Tue May 01, 2012 12:14 pm

Clearly, the question is "How can I touch my balls while looking at pictures?". :lol:
IRC: nexsoftware / mobidevelop; GitHub: MobiDevelop;
BurningHand
 
Posts: 2362
Joined: Mon Oct 25, 2010 4:35 am

Re: Layers, catch Balls?

Postby gameZero » Tue May 01, 2012 1:13 pm

LOL, but nobody have ideas? Is box2d the answer?
gameZero
 
Posts: 56
Joined: Sun Jan 08, 2012 5:30 pm

Re: Layers, catch Balls?

Postby kalle_h » Tue May 01, 2012 1:38 pm

Make all those layers and ball act like buttons. Then handle input in order of that layot. Every button consume imput.

Easy way to get those "buttons" are make layers as polygons and balls as circles. Then just use Intersector class to determine intersection between click point and button area.
kalle_h
 
Posts: 636
Joined: Thu Dec 29, 2011 9:50 pm

Re: Layers, catch Balls?

Postby gameZero » Tue May 01, 2012 2:01 pm

Hmm... Sorry i forgot... the Balls are Vectors.
gameZero
 
Posts: 56
Joined: Sun Jan 08, 2012 5:30 pm

Re: Layers, catch Balls?

Postby kalle_h » Tue May 01, 2012 4:25 pm

gameZero wrote:Hmm... Sorry i forgot... the Balls are Vectors.


What?
kalle_h
 
Posts: 636
Joined: Thu Dec 29, 2011 9:50 pm

Re: Layers, catch Balls?

Postby gameZero » Tue May 01, 2012 9:11 pm

You said, that i should made this with buttons. But i can do that. With Vector, i mean the Spritebatcher etc.
gameZero
 
Posts: 56
Joined: Sun Jan 08, 2012 5:30 pm


Return to Libgdx

Who is online

Users browsing this forum: Bing [Bot], BurningHand, Google [Bot], opnczk, Thomas447 and 8 guests