Basic Physics Game (Part 1)

  • 8 favourites

Index

Stats

1,505 visits, 4,149 views

Translations

This tutorial hasn't been translated.

Tools

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

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