Sign In Start Free Trial
Account

Add to playlist

Create a Playlist

Modal Close icon
You need to login to use this feature.
  • Book Overview & Buying Construct 2 Game Development by Example
  • Table Of Contents Toc
Construct 2 Game Development by Example

Construct 2 Game Development by Example

By : John Bura
3.8 (9)
close
close
Construct 2 Game Development by Example

Construct 2 Game Development by Example

3.8 (9)
By: John Bura

Overview of this book

This book uses practical examples to teach readers, and imparts the key skills and techniques of working in Construct 2 through building complete game projects. This book is for complete beginners who have always wanted to learn how to make games and have never tried. It is the perfect introduction to game development, design, and production.
Table of Contents (11 chapters)
close
close
9
A. Where to Go from Here
10
Index

Adding physics


Run the game again and you will see that the cannonball does not act like a cannonball. We need to add some physics to it! Click on the cannonball and add the Physics behavior as shown in the following screenshot:

Applying force at an angle

Run the game again.

You will notice that the ball just falls down! Now that we have added physics, we can add a force to the cannonball to make it shoot like real cannon. Add an action to the Mouse click event. The action will be Apply force at angle, as shown in the following screenshot:

Set the force to around 200. The bigger the number, the further the cannonball travels. For the angle, type in cannon.Angle as shown in the following screenshot. This will ensure that the cannonball is shot in the same direction as the cannon.

Setting cannonballs to fire one at a time

If you run the game, you will notice that we can fire as many cannonballs as we want. We should limit the cannonballs to make them fire only one at a time. In order to do this...

CONTINUE READING
83
Tech Concepts
36
Programming languages
73
Tech Tools
Icon Unlimited access to the largest independent learning library in tech of over 8,000 expert-authored tech books and videos.
Icon Innovative learning tools, including AI book assistants, code context explainers, and text-to-speech.
Icon 50+ new titles added per month and exclusive early access to books as they are being written.
Construct 2 Game Development by Example
notes
bookmark Notes and Bookmarks search Search in title playlist Add to playlist font-size Font size

Change the font size

margin-width Margin width

Change margin width

day-mode Day/Sepia/Night Modes

Change background colour

Close icon Search
Country selected

Close icon Your notes and bookmarks

Confirmation

Modal Close icon
claim successful

Buy this book with your credits?

Modal Close icon
Are you sure you want to buy this book with one of your credits?
Close
YES, BUY

Submit Your Feedback

Modal Close icon
Modal Close icon
Modal Close icon