Presentation is loading. Please wait.

Presentation is loading. Please wait.

GAME:IT Pinball Objectives: Review skills from Introduction Introduce gravity and friction Introduce GML coding into programming.

Similar presentations


Presentation on theme: "GAME:IT Pinball Objectives: Review skills from Introduction Introduce gravity and friction Introduce GML coding into programming."— Presentation transcript:

1 GAME:IT Pinball Objectives: Review skills from Introduction Introduce gravity and friction Introduce GML coding into programming

2 Let’s create the following Sprites which are located in Pinball Resources folder: Make sure they are named exactly as instructed spr_pinball – Check Precise but NOT Separate spr_wall – Check Precise but NOT Separate spr_no_bounce_wall - Check Precise but NOT Separate Now we are going to add some animation to your game! This is done by having multiple versions of an image that displays at different times as the game is played. For instance, when the ball hits a bumper, the bumper glows. The following sprites will all be created this way: spr_bumper, spr_deflectorLeft, spr_deflectorRight, spr_paddleLeft, spr_paddleRight & spr_launcher,

3 To create the paddles, bumper and launcher, we will create the sprites from a strip. We’ll start with the paddles. To create spr_paddleLeft 1.Click the Create a Sprite Icon 2.Name it spr_paddleLeft and check Precise & Separate DO NOT LOAD THE SPRITE IMAGE YET! 3.Click Edit Sprite – this will launch the Sprite Editor window 4.Click File from top bar of the Sprite Editor window and choose Create from Strip 5.Select paddleLeft from the Resources folder

4 1.A Loading a strip image window will appear. It will show the strip and allow you to enter the number of images, images per row and image width and height. Number of Images: 2 Images per row: 2 Image width : 64 Image height: 48 Click OK 1.Click the Show Preview checkbox to see the animation that is added as the system toggles between the two images. 2.Click the green checkmark in the top corner to Save 3.Follow the same steps to create spr_paddleRight

5 Now we need to create the spr_launcher You will follow the same steps, but this one is set up a little differently. Check Separate and Precise Select launcher_strip5 from the Resources folder Number of images: 5 Images per row: 5 Image width: 16 Image Height: 32 Click OK and then preview the image to make sure it looks correct. Click the green checkmark to save.

6 Next we’ll create the spr_bumper Check Precise but NOT Separate Select bumper_strip from the Resources folder Number of images: 2 Images per row: 2 Image width: 16 Image Height: 16 Click OK and then preview the image to make sure it looks correct. Click the green checkmark to save.

7 Now we will create spr_deflectorLeft & spr_deflectorRight. These are not done from a strip…but instead you will change an instance of the image to create the animated effect. We’ll do spr_deflectorLeft first. Create the sprite, name it spr_deflectorLeft Check Precise but NOT Separate Click Edit Sprite Click File and select Create from File Select deflectorLeft from the Resources folder. This will be the 1 st subimage. Now click File and select Add from File and again select deflectorLeft. This will create the 2 nd subimage. But wait? They look the same! Let’s change that!

8 Click on image 1 (the 2 nd image) Then click on Images and select Intensity. A window will open allowing you to change the Value and Saturation of the image. Play around until you get a look you like. You want it to be noticeably different than the original image. Make sure the Apply to all images in the sprite checkbox is NOT checked. Click OK. Preview and if it looks good, click the green checkbox. Follow the same steps to create spr_deflectorRight

9 Now we’ll create the spr_topRight Check Precise but NOT Separate Also – click Modify Mask and set Alpha Tolerance to 100.

10 Next we’ll create spr_block. Check Precise and Separate Select block.png from the Resources folder Number of images: 2 Images per row: 2 Image width: 32 Image Height: 32 Click OK and preview the image to make sure it looks correct. Click the green checkmark to save The block won’t be animated like the other sprites, but until the ball passes a certain point, image 0 will display and after the ball passes, image 1 will display.

11

12 Create a special font for pinball to be used for displaying score. Name it font pinball Select a font from menu Enter font size You can also choose bold or italic if you wish

13 Create the following objects using the sprites you created earlier. obj_pinball – Only Visible is checked obj_paddleRight – Both Visible and Solid are checked obj_paddleLeft – Both Visible and Solid are checked obj_bumper – Both Visible and Solid are checked obj_deflectorLeft - Both Visible and Solid are checked obj_deflectorRight - Both Visible and Solid are checked

14 Additional objects: obj_wall – Both Visible and Solid are checked obj_topRight - Both Visible and Solid are checked obj_launcher - Both Visible and Solid are checked obj_no_bounce_wall – Only Visible is checked obj_block - Both Visible and Solid are checked ***Do not assign a sprite to this object*** obj_blockTrigger – Only Visible is checked ***Do not assign a sprite to this object*** Also – In the Mask Field, select spr_wall from the dropdown

15 Create a Room to look like the one below: Change the dimensions of the room using the settings tab and enter Width: 320 Height : 480 The obj_wall is on the left, top and right sides and the ball launch area. obj_no_bounce_wall is across the bottom. You can place the bumpers wherever you wish. Don’t forget obj_topRight

16 Once the ball is launched, we want to prevent the ball from dropping down the launch area. You will need to add two more objects to the room. obj_block and obj_block_Trigger Because they don’t have a sprite assigned to them, they appear as blue circles with ?.

17 Programming for Pinball is located on a handout (with assignment)


Download ppt "GAME:IT Pinball Objectives: Review skills from Introduction Introduce gravity and friction Introduce GML coding into programming."

Similar presentations


Ads by Google