9/23
FIRST THINGS FIRST
In Gdev
Open your preferences
Uncheck Autodownload and install updates
If you do not do this and they push a new update out, it could break your game.
You have been warned
Start off the day with the warm-up
Time to use your imagination! We have been together a few weeks now and we have gotten aquainted and we are starting to actually know each other SO
Tell me about MY weekend starting on Saturday Morning and ending Sunday Night. What time did I wake up? What did I do all day? Did I go anywhere? Did anyone come over to my house? Did we order pizza? Go out to sushi? Did my children nag me so hard that I broke down and took them to get boba? Did I say up late? Did I take a nap?
Obviously keep this school appropriate please but feel free to have fun!
half page
3 points
What are you learning?
GDevelop
Why is it important?
Now that we have created a came with SMBX and learned about level, storyboarding, NPCs and design, it's time to go to the next step... adding physics, conditions, actions, scenes, If/Then statements and more!
GDevelop uses the Box2D Physics Engine
How do you show that you understand? What is the assignment?
Today we are going to start playing around with Gdevelop.
Test some of the prebuilt games
If the games are running slow, close some of your applications (our computers in need of a refresh).
We will them explore the program together.
Items we will discuss today
Jumpthru platform
Center Cameras with NO CONDITION so it always runs
Ladders
Death/Respawn
Changing the animation when it touches another object
Now let's add a creepy potion bottle to our game
Go back to your scene
Click add a new object
Select Sprite
Name the object Potion
Click Add Animation
Click Create in Piskel
Make a potion bottle
Animate it with some bubbles (using layers)
Test Save and add it to your scene/game
Now go back to the coin and open it up (edit coin)
Click Add an animation
Open up your original Animation #0 in Piskel
With the selection Tool
Select the coin and Copy it (Ctl + C)
Click Save
Open up Animation #1 by clicking create with Piskel
Paste the coin in Piskel (Ctl+C)
Animate the coin so that it looks like it's rotating
Make it a loop
Click Apply
Go to our events section
Add a new event
What we want to do it make the coins rotate when we touch the potion but we want to say it as an In then statement
The sentence would be "If Hero collides with the potion then we want the animation on the coin to change from #0 to #1"
Click on add condition and select Hero
Add Collision as the Hero Condition
Choose potion as the object
Click okay
Now let's add the action
Click Add Action
Search up Animation
Select Animation (by number)
Select Coin
Change Animation Index to 1 (so you are switching the animation from #0 to #1)
Save and test
Now on your own, add the action of removing the potion bottle
Save and test
Now let's create a killzone so that when the Hero falls off the platform and to the bottom of the scene, it resets
Go back to you scene
Add new object
Select Sprite
Name it Kill Zone
Add Animation
Create with Piskel
Click save without creating any art so that it is a sprite with no colored pixels
Click Apply
Go back to your scene
Place your killzone atthe bottom of your scene and make it fit
Switch back to Events
Add a new event
So what we want to do is have the Hero reset when it collides with the kill zone
Add condition
Hero Collision Killzone
Add action
Change the scene
Select Untitles scene
Save and test
Let's modify the game so that when we jump on the bad guy, we take them out but if the bad guy touches us, it takes us out.
We can just copy, paste and modify a similar event to speed things up. You don't have to do it this way of course, I just want to show that it is possible.
Copy and paste the Hero is in collision with Badguy and drop it in a new event
New that we have the new events with hero is in collision with Badguy, we want to add another condition called Is Falling
The order of operations always Top Down so you want to have Is Falling before is in collision in this event
Now add the action Delete Badguy
Save and test
It doesn't work
Boo Hiss!
Why do you think it doesn't work? A clue is 5 lines up.
The problem is that as the game runs the events, we have If Hero is in collision with bad guy then change to untitled scene first so it will never get to run the "is falling" event
We need to move this event above the change to scene event
Now we are going to change the camera to change the look of the game by creating a new event
This time we are going to leave the condition empty
This means that it is always happening
Click Add Action
Select Center Camera on an Object
Save and test
Go back to your scene
Click add a new object
Select Sprite
Name the object Vine
Click Add Animation
Click Create in Piskel
Change the height to 64
Draw a vine
Click Save
Select Behaviors
Click Add Behavior
Choose Platform
Change the type from Platform to Ladder
Test the game and notice you can now climb the vine but you can't jump through the top platform
We need to create a new platform and give it the ability to jump through
Find your platform in your objects
Click on the Three dots to the right of your platform and select duplicate
Create Platform2
Double Click on your platform2 and select behaviors
Change the Type to Jumpthru platform
Replace the old platform at the top of your vine with Platform2
Save and test