1 / 23

Module 8

Module 8. Module 8: pickups. Remember: Story Board. graphic organizers in the form of illustrations or images displayed in sequence for the purpose of pre-visualizing a motion picture , animation , motion graphic or video game sequence.

gauri
Download Presentation

Module 8

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Module 8

  2. Module 8: pickups

  3. Remember: Story Board • graphic organizers in the form of illustrations or images displayed in sequence for the purpose of pre-visualizing a motion picture, animation, motion graphic or video game sequence. • visual layout of events as they are to be seen by the player or viewer • Helps to make the games because it is cheaper to make changes to a storyboard than a programmed piece of software

  4. In module 8 we will add a vertical scrolling formula Vertical: Y-Axis

  5. Make your own storyboard • You will create a scrolling landscape. • Each Box will be a 480x360 sprite (it takes up the entire screen) • Each cell needs to be labeled, starting with Sprite 0 • Create 10 sprites (be creative) Draw Here Draw Here Draw Here Sprite 0 Sprite 1 Sprite 2 Draw Here Draw Here Draw Here Sprite 3 Sprite 4 Sprite 5

  6. Draw your Sprites from storyboard • Draw your sprites from your storyboard • Make them colorful. • WARNING: make sure each cell is 480x380 pixels or your program will not work. • Name your sprites accurately with our naming convention from the storyboard.

  7. Name your sprites • It is important that you name your sprites accurately • We are going to have new naming convention for the sprites that scroll • Scr X-Y (the X-Y represents the X-Y coordinates of where the sprite will be on the grid of scrolling sprites. • These are my original horizontal scrolling sprites from Mod 7 and the new vertical scrolling sprites from Mod 8

  8. Our Sprites on the XY Grid Y-Axis 4 3 2 1 X-Axis 0 1 2 3 4 5 6

  9. Program your sprite to scroll

  10. Remember Scrolling • scrolling is sliding text, images or video across a monitor or display • vertically or horizontally

  11. Scrolling Function updated • ScrollY : This variable will be what controls the scrolling • ScrollY is the variable that sets the location of each scrolling sprite on the y-axis • Up and Down arrows change the value • Place it on the Stage Add this code

  12. Scrolly values • To appear to be moving up, the sprite needs to move down; use a negative value • To appear to be moving down, the sprite needs to move up; use a positive value (+5) (-5)

  13. Remember: Abs is Absolute value • This is the value of any positive or negative number. • We use this to control if a sprite shows or hides • If a sprites Y position is -240, then its ABS is 240. • If a sprites Y position is 240, then its ABS is 240.

  14. Functions for all new sprites Name: ScrollY Multiplier --This function received user input and moves the sprite up and down --This formula changes for each sprite Name: ABS Hider --This function determines if we want to hide our sprite or show it --This does NOT change for each sprite

  15. Example: Scroll Multiplier Function and Sprite name • The sprite name matches up with the multiplier for the Scrolling Multiplier Function • Scr 0-4 • Located on (0,4) of XY grid • Multiplies Scroll X by 0 • Multiplies Scroll Y by 4

  16. Our Sprites on the XY Grid Y-Axis 4 3 2 1 X-Axis 0 1 2 3 4 5 6

  17. Your completed Sprite code • This is based upon the name of your sprite • The ABS functions are the same for all new sprites that are on the X zero level (that means they have a 0 for its x coordinate)

  18. Last piece of the puzzle • Update all sprites on the zero level of Y with the ScrollY multiplier and ABS functions • Update Scr 0-0 with the following code • You are adding the ScrollY multiplier • You are adding the ABS Hider for the y-position • Scr 0-0 should have only these codes…nothing more or nothing less.

  19. Module 8 Notes Player Sprite

  20. Player Controls Update • You are adding these two blocks of code • They allow the screen to scroll when the player if falling with our gravity algorithm

  21. Pick Ups and Game Over

  22. Pick ups • These are Interactive items that the player can gather • They can be for the following: • Health • Time • Points • Ammo • Or whatever you want • Name your pick up sprites the following: • Pickup# (for example: Pickup1)

  23. Pickup scrollx • Add a ScrollY multiplier based upon the location of where it will be on Y-axis • All of mine are on the zero level • Add this ABS function to hide the pickup when scrolling upwards or downwards.

More Related