Constantly: Snap camera to my position (so the object doesn’t fly off the screen).įirst, let’s grab the event blocks you will need to start with (find them under Game Mechanics, and the Events tab).Then set dragged to false, and make gravity pull me down. When the stage is released (when the player stops holding down the mouse button): If dragged is true, then set the velocity of this object to the distance between the mouse and this object (so if the player drags only a little bit, then the distance will be smaller and the velocity will be lower).This is how we know when the player starts pulling back this object to make it fly away. When the presses myself (when player clicks on this object): Sets the variable “dragged” to True.When created: Starts the slingshot object so it is unaffected gravity (so it will stay in place), sets gravity (to make all objects fall down), and sets drag (to make this object gradually slow down if it starts moving).Here’s what we’re going to create:Ĭlick on these images for a closer look. Click Script Edit mode to start scripting. To get our slingshot object flying around, we need to code it with the script editor. You can’t place them on the terrain layer, so select the layer above terrain in the Layers Panel, and then place the game object into your level. Find one of the cute looking characters in the Game Objects tab in the sidebar, and place them into your level. Click on the tile, and click on the stage to draw them down. We’ve got to have a surface for everything to sit on top of, so open the Terrain tab from the sidebar, and place a row of terrain tiles at the bottom of your level. Also set the tile size to 70×70, since that’s the grid that the assets were designed for. Click the Game Properties icon at the top of the sidebar on the left. Our game needs to be short and wide, so set the height to 512 and keep the width as it is. Once you’ve got these assets and added them to your game, you can set up the Game Properties. Start by grabbing Kenney’s Physics Game asset pack from the Marketplace. But you don’t need to be a big game studio to create your own game just like it. It’s easy to see why – with it’s simple interface, bright cartoon visuals, fun physics simulations, and endless replayability, it keeps the player wanting to get just one more piggy knocked out. You can combine the concepts here with this tutorial: Īngry Birds is one of the most popular mobile games ever made.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |