Basic Physics Game (Part 1)

1

Index

Stats

4,849 visits, 9,353 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 16 Nov, 2013. Last updated 19 Feb, 2019

With "Sprite" selected, click the behaviour button in the properties window.

Click the plus icon in the behaviours tab.

The behaviours window will appear. Scroll down to the bottom, and you'll see the "Movement" section. Pick 'Physics' and click 'Add'.

Repeat this process for "Sprite2".

Now, if you want... go ahead and run the project. You can do this by clicking the play tool at the very top of Construct 2 window.

Well that was weird, right? Everything just fell down through the level. Hmm...

The reason this is happening, is because as we've given all the object physics, they're all falling at the speed gravity it set to. We want to lock those borders down.

You can click on each border sprite, or just click on the "Sprite" icon on the right in the projects tab (this will select all sprites of this type in the current layout). Now, jump over to the left hand side, and take a look in the object properties physics section. Choose 'Immoveable' and set it to 'Yes'.

Try running the layout again. What you should see is the centre sprite fall down, but the outer sprites stay in place. This means that it worked! If it didn't then check that only the outside objects are locked down, and the centre object isn't set to immovable.

Feel free to add extra immovable sprites if you want, and learn your way around it.

I'll create part 2 soon, but for now, enjoy.

  • 0 Comments

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