Physics Revolute Joints - Monkey Jump Tutorial

3

Index

Stats

10,418 visits, 23,740 views

Tools

Translations

This tutorial hasn't been translated.

License

This tutorial is licensed under CC BY 4.0. Please refer to the license text if you wish to reuse, share or remix the content contained within this tutorial.

Published on 27 Aug, 2012. Last updated 19 Feb, 2019

Getting Started

A tutorial to demonstrate the use of Physics Revolute Joints and Impulses. You need to swing the monkey through the trees and collect all the bananas along the way - but watch out for snakes! Created using Construct 2 V100 (free).

Required files:

dl.dropbox.com/u/26362027/Scirra/MonkeyJumpAssets.zip

Creating the Layout

1. Create a folder called MonkeyJump. Inside this folder, create another folder called Assets.

2. Download and unzip the contents of the MonkeyJumpAssets.zip file into the Assets folder.

3. Run Construct 2 and create a new project file. File > New > Store project in single file > Create project.

4. In the properties panel rename the Project name to Monkey Jump, the Window size to 1000, 500 and the Preview Browser to Firefox.

5. Click on Layout 1 in the Projects/Layers/Objects panel (on the right) and change the Layout Size to 4000, 500 (in the Properties panel on the left).

6. Double click on the Layout 1 window > Double click Tiled Background > Click Once on Layout 1 > Open > double click on the Forest image > close the Edit image window.

7. In the TiledBackground properties panel, change the Position to 0,0 and the size to 4000,500. Your background image should now fit the layout.

8. Save your work as MonkeyJump in the folder of the same name.

9. Click on the Layers tab in the Projects/Layers/Objects panel and rename Layer 0 to Background, then lock the Background layer.

10. Add a new layer and rename the layer to Main. Keep this layer selected.

Adding the Tree Sprite

11. Add the tree sprite as follows:

12. Double click on the Layout 1 window > double click sprite > click once on the Layout 1 window > open > double click on Tree image > close the Edit image window.

13. With the tree selected, add the behavior of Physics, then close the Add Behaviours window. Change the Immovable setting from No to Yes in the Properties panel. Also change the name of your sprite to Tree.

14. Use CTRL Drag to place 5 or 6 more copies of the Tree sprite along your layout, placing them in a similar horizontal position to that in the image above, ensuring the last one is lined up with the right end of the layout. You can add/remove these sprites later after testing your game.

  • 0 Comments

Want to leave a comment? Login or Register an account!