Simple Point Shoot

We'll be pulling together a series of video tutorials to help you get the most out of Thinking Worlds in this forum

Simple Point Shoot

Postby Gary » Tue Jul 05, 2011 4:26 pm

Hello,

The following is a simple tutorial to create a ball pop game.

Start by adding your background 2d image object to the world or using a 3d environment, you can create a 2d image object with just an image and our ImageModelBuilder, included in all thinking worlds installations.

Add your object to the world, which will be your target for the user to click, I've used a simple circle image.

Image

Position 2 markers at either side of your map, this will be the path which your target will travel between, I've used 2 sets of markers to create 2 separate paths.

Image

Position a game camera above the map, this will be the main game camera.

Image

I start my logic by generating a random number either 0 or 1, this will be used to determine which path the target will travel, I then add the target object to the world. The object then follows the generated path. The path moves the object to the start marker instantly and moves it to the second over 2 seconds. Once complete the logic is looped back to the start, for the target to follow another path.

6-Path.png
Path Logic
6-Path.png (43.82 KiB) Viewed 1057 times


Another group of logic, checks if the target has been clicked, if so removes the object from the scene preforming a particle effect in the process, this is how when the user clicks the target you get the explosion.

5-Fire.png
Fire Logic
5-Fire.png (19.02 KiB) Viewed 1057 times


The final bit of logic selects the game camera as the main camera, the other two groups are also linked to the scene start node.

4-ChangeCam.png
Game Camera
4-ChangeCam.png (4.83 KiB) Viewed 1057 times


I have included the above sample, so that you may examine and change my logic. You will need to extract my journey and import my assets.

As well you can also download GroovyGame from the content section HERE, The logic is fundamentally the same with more advanced techniques and game elements.
Attachments
BallGame.zip
BallGame
(2.31 MiB) Downloaded 135 times
Gary Alan Morris
Support Analyst
Caspian Learning
gary.morris@caspianlearning.co.uk
Gary
 
Posts: 99
Joined: Wed Jan 12, 2011 5:31 pm

Return to Tutorials

Who is online

Users browsing this forum: No registered users and 1 guest

cron