Physics Revolute Joints - Monkey Jump Tutorial

3
  • 13 favourites

Index

Stats

9,512 visits, 22,128 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.

Adding the Banana Sprite

15. Use the same method as you did for the trees, to add in the Banana sprite. For this sprite you do not need to add any behaviours, just make sure that you rename the sprite to Banana and place a copy on all the Tree sprites (so the monkey can collect them) except for the first one. You will need to resize the banana to an appropriate size. About 60 X 40.

Adding the Snake Sprite

16. The snake sprite is an animated sprite so you will need to add it by importing the sprite sheet. To do this, do the following:

17. Double click on Layout 1 > double click on sprite > click once on Layout 1 > right click in the Animation frames window > import sprite strip > double click SnakeAnimation > accept the default setting of 8 horizontal X 1 vertical cell >delete the empty frame 0 > hold SHIFT and click on the crop tool in the Edit image window > adjust the image point origin to the top of the snake head > right click on Image point origin window > click on Apply to whole animation > in the Properties panel change the speed to 10 and Loop to Yes > Close the Edit image window.

18. In the Properties panel, rename the sprite to Snake and change the size of the snake to 90,170.

19. Use CTRL drag to place about 13 copies of the Snake sprite along your layout so it appears that the snake is jumping out of the pond.

If you run the game, you will notice that the Snakes are animated, but nothing much else is happening, we need to add the Monkey in order to make things more interesting!

20. Close the browser window and return to Construct 2.

Adding the Monkey Sprite

21. For the monkey sprite, we need to add in the Monkey Body and create 7 image points. This is because each of the other monkey body parts are detachable and we want to apply some movement to these parts and we need to tell Construct 2 where to attach the parts to the Monkey Body.

22. I have named the monkey’s left and right sides as follows:

23. The image points will be:

• Origin – the center of the monkey body (Image point 0)

• Head – where the head will be position (Image point 1)

• LeftArm – where the left arm will be positioned (Image point 2)

• RightArm – where the right arm will be positioned (Image point 3)

• LeftLeg – where the left leg will be positioned (Image point 4)

• RightLeg – where the right leg will be positioned (Image point 5)

• Tail – where the tail will be positioned (Image point 6)

24. To implement the above, do the following:

25. Double click on the Layout 1 window > double click sprite > click once on the layout window > open > double click on Body

26. Click once on the Set origin and image points button – by default the red marker will be positioned in the centre of the monkey body. You will notice in the Image points window, this position is called Origin, and is given the Number 0.

27. Right click on the name Origin and select Add Image Point. Rename this image point to Head. With this image point selected, click on the top area of the monkey body where the head will be positioned.

28. Continue Adding Image Points, renaming them and positioning them on the appropriate parts of the body until you have a total of 7 image points (from 0 to 6) all suitably named as listed above.

29. Close the Edit image window.

  • 0 Comments

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