GAME DESIGN SKILL CARDS
1) TITLE/INDEX 13) DATA BOXES/LABELS
2) AGENT TRAITS 14) BUTTONS
3) BREEDS 15) LEVELS/DIFFICULTY
4) KEYBOARD CONTROL 16) CUSTOM SHAPES
5) HEADING 17) CUSTOM TRAITS
6) DRAW ON TERRAIN 18) SOUND
7) TERRAIN COLOR 19) COLLISION
8) CAMERA VIEW 20) FOLLOW/AVOID
9) TELEPORT 21) CHANCE
10) JUMP 22) GRAVITY
11) FLYING 23) PROCEDURES
12) KEEPING SCORE 24) END/CATEGORIES
Access StarLogo Nova at www.slnova.org
Copyright 2014 by MIT Scheller Teacher Education Program
AGENT TRAITS
Change the color, size, shape, location and direction of your agent.
You can change any of these traits during your game, such as having
a character grow in size or change color. 2
2
You choose from the default
agent traits by using the
pulldown menu in the SET
MY block.
Once you choose a trait, you
can either type in the TO area
or drag in a trait value block,
such as BUILT IN SHAPE,
blocks from the math drawer
such as RANDOM.
Set the color by picking from a list of standard colors, choosing a random color,
or selecting a specific color using an RGB code. RGB allows you to add values of
red, green and blue (the primary colors of light) together to produce any color.
Refer to an RGB chart for specific colors.
BREEDS
Create a new breed when you need a new category of agents which
can follow different rules than the other breeds.
3
Now you can create agents
of that breed and there’s also
a new page in the workspace
with that breed’s name where
you can program all of its
behaviors.
Click Edit Breeds > Add
Breed > Breed name,
then check that new
breed shows up in the
list.
3
KEYBOARD CONTROLS
Use keyboard controls to move an agent around the 3D world and
to control other aspects of your game, such as picking up objects,
managing inventory, opening doors, etc.
shift
4
You can also use a modifier key, such as SHIFT
or CONTROL with another key by using the AND
block. This would be a good way to enable a
player to both walk and run.
You can assign any keys on the keyboard to
enable basic movement for an agent. Use the
KEY HELD block for smooth movement, while
KEY TYPED forces a player to keep clicking.
4
HEADING
Heading controls the direction the agent faces. You can also
use the heading trait to establish north/south/east/west in
your game world.
5
180°
90°
270°
315°
135°
45°
225°
0°
Changing the heading during your game is more
precise than using the RIGHT and LEFT movement
blocks. Headings also give a way to compare the
direction of two or more agents.
Setting the heading during setup gives you control over which direction to face
when you create new breeds. If you create 1 agent, the agent automatically
faces 0°. For 2 agents, they face 180 and 0°. For 3 agents: 120°, 240°, and 0°. See
the pattern? Here is the code used to generate the image on the front of this
card (see DRAW ON TERRAIN card for explanation).
5
DRAW ON TERRAIN
The pen feature allows you to draw shapes and patterns on the
terrain, with varying line thickness and color. You can even have
several agents drawing at the same time to create patterns. 6
A few changes
to your code can
make a more
c o m p l i c a t e d
shape, such as a
five-point star.
Here we create
25 turtles and
scatter them to
draw a bunch of
stars in random
locations.
6
Any agent can draw on the terrain by using
the PEN DOWN block. You can change the
line color by changing the color of the agent
and the line thickness by changing the
agent’s size. Use PEN UP once the drawing is
complete.
TERRAIN COLOR
You can apply a set color to a portion of the terrain (to represent
water/fire/etc.) or change the entire terrain color by using the STAMP
block. 7
You can use the TERRAIN COLOR block
to check the color under an agent
(handy for setting traps).
The STAMP GRID block will just create a 1x1 colored square at the center of the
agent regardless of agent size.
You can apply a circle of color by choosing the
appropriate agent size and using a STAMP and
COLOR block. To change the entire terrain color
create a giant turtle, stamp the color you want,
then delete it. You will usually want to use the
CLEAR TERRAIN block during setup to erase any
previous colors applied with STAMP or PEN (see
DRAW ON TERRAIN).
7
CAMERA VIEW
Change the point-of-view from overhead to following one of the
agents to look like a more traditional 3D action or adventure game.
8
top view
For more precise camera control create
a new breed called camera, put the TAKE
CAMERA block on it and use keyboard
controlstochangetheviewinyourgame.
You can use the 4 camera buttons above
webland to reset your camera to the
default top view, zoom in and out, or
switch back to agent (3D) view.
By default the camera starts from directly
above the terrain. For a 3D view place theTAKE
CAMERA block inside the CREATE/DO block of
the agent you want to follow at the beginning
of the game. If you create more than one agent
the camera will follow the last one created.
8
TELEPORT
Teleporting means that you want the agent to instantly move
somewhere else. This is a handy way to skip across your game world
or even move to a new level. 9
Or shrink/expand
the agent for a
more slick effect.
The simplest solution is to program a KEY TYPED
block with SCATTER to transport you to a random
random location.
To simulate a portal, you could have a
COLLISION teleport you to a specific place
by setting the X and Y traits. (X and Y can
both range from -50 to +50. In the center
X=0 and Y=0, which is where all agents
are initially created during SETUP).
9
JUMP
Program your agents with the ability to jump. Control how high they
go and how many times they jump.
10
When the spacebar is pressed the agent jumps
into the air and then comes back down. The
yield block separates the actions by slowing
down the movements.
To make faster jumps, remove one or more
yield block or increase the number of steps.
Alternatively, if you want to make jumping
more realistic, see GRAVITY.
10
FLYING
Program your agents with the ability to fly above the terrain or even
into outer space.
11
For easy flying just
program one key to
move up and another
to move down.
11	
Or you could simulate
“flapping” which just
requires tapping 1 key,
such as the space bar, to
keep flapping your wings,
otherwise you will continue
to fall.
KEEPING SCORE
You can use the default score box to award player progress in your
game. You may also use widgets to display an additional score for an
enemy or multiplayer. 12
While the way you udate a score is always
the same (using a SET DATABOX block),
there are several ways to determine how
score is kept in your game.
You may have the
score increase when
colliding with some
form of treasure...
...or have the score
increase continually
as long as the player
survives...
You can even create
additional databoxes
to keep track of an
enemy or teammate’s
score.
12
TEXT MESSAGES
Sometimes it’s helpful to give the player a message in text – such as
if you win or lose, directions on how to reset the game, or to enable
character dialogue. 13
Click EDIT WIDGETS then NEW WIDGET,
type a name such as “Message” and
select the“Label”option.
A collision is often used to trigger a message.
You might want to hide
your first message until
later in the game.
Once you click ADD WIDGET It should appear among
the other widgets--while in Edit Widget mode you
can move your widgets by clicking and dragging. For
dialogue, you may want to run SETUP first so you can
position the text near your character. Once it’s in the
right place click EDIT WIDGETS again.
13
BUTTONS
A push button is only activated once, such as the Setup button.
Toggle buttons can be turned on or off, like a light switch and are
used to keep something repeating, like the default PLAY button. 14
great image coming soon!
TheWHEN ____ PUSHED
block tells to the agent
to run the blocks inside
of it when the given
button (in this case
setup) is pushed.
The blocks inside WHILE ___ TOGGLED
will keep running in a loop as long as
the given toggle button is still on.
Click EDIT WIDGETS then double click
on a button to rename. Click NEW
WIDGET to create a new Push orToggle
button.
14
LEVELS/DIFFICULTY
Some games allow players to choose difficulty before they start.
Others offer multiple levels to enhance game play. You can give
players these choices by using custom buttons. 15
For levels, design
a large gameworld
andhaveyourplayer
start in a different
location depending
on their selection
(see TELEPORT).
One way to vary difficulty
is to create more enemies
depending on which push
button the player selects
(see BUTTONS).
Or make your game harder by making
theenemiesfaster(seeCUSTOMTRAITS).
15
CUSTOM SHAPES
Program an agent to look like an object from a library of custom 3D
models.
16
The shape of an agent can be
set to either a built-in shape...
...or a 3D model from the
online library. *
* If you are linking to a model from the online library, make sure to link to the file that
ends in“.obj”[http://slnova.org/shapes/space/moon.obj]
You can change an agent’s
shape and any time and can
even create a simple animated
object effect by creating a
sequence of rapid shape
changes.
16
CUSTOM TRAITS
You can create and use a custom traits for any breed. Custom traits
are things like health, lives and energy that StarLogo Nova doesn’t
include automatically but that you might use in your project. 17
In the setup of your program be sure to set the starting value to what you want
it to be (such as 100 for health or 0 for score). Then use them just like any other
traits (size/heading/etc.), increasing or decreasing over time. If you want a trait
such as Health to be displayed in a message box see KEEPING SCORE.
Click the EDIT BREEDS
button then click
EDIT TRAITS beside
the breed you want
to modify, then ADD
TRAIT. (This is also
where you would add
or rename breeds).
17
SOUND
Recording sound can be a bit tricky the first time, but it’s worth it for the
added joy sound effects bring to game play. You will need both sound
blocks to record and play. Click record, then scroll up to WebLand to find
the record box.
The first time your record you may need to enable your
microphone.ClicktheAllowbuttonthenthermaybea2nd
allow button you need to click at the top of the webpage.
Say (or sing) something short, type in the name, then click to save the
recording.
18
Now you can select the new sound
under the dropdown menu of the
sound block. Place the 2 sound
blocks wherever you wish to
trigger your sound.
You also have the option of
importingsounds. Youwill
find the IMPORT SOUND
button near the top right
of your web page. You can
only import sound from
your own projects.
18
Say (or sing) something short, type
a name, then click SAVE. Once you
have finished recorded the sound,
you may drag the start and end
sliders to trim the sound.
COLLISION
Being able to detect when objects collide is essential for most games.
You can use collision to simulate eating, to trigger a trap or to collect
objects in your game. 19
Use the collision block to detect
when one agent has collided
with another agent. You will
generally want to change the
score (here adding a point) and
delete the “collidee,” which is
the thing you collided with.
See FOLLOW/AVOID to find out
about detecting nearby agents.
19
FOLLOW/AVOID
You will often want to make one agent follow/avoid another agent.
We refer to this as AI or artificial intelligence. As your programming
skills increase, so will the AI of your agents! 20
To have one agent follow
another, face toward the
agent, then move forward.
Use the NEAREST block to
find the agent you want.
To avoid, face toward
the agent, turn around
180degrees,thenmove
forward. You may need
to adjust the number
of steps in NEAREST for
best results.
20
CHANCE/RANDOMNESS
A good game should surprise the player. You can set a random
chance of something happening, like making obstacles appear 10%
of the time or springing a trap just 1% - any chance you’d like. 21
Onewaytoimplementchanceistogeneratearandom
number between 1 and 100 and use that value to
represent percentage. This code will only create a
Turtle 5% of the time because approximately 95% of
the time the random number between 1 and 100 will
be greater than 5 so the CREATE block will not run.
While this code will
create 10 enemies
with approximately
10 percent being red
and the rest white.
21	
As you design your game or simulation, look for places where chance could
make your game more fun to play. Chance makes players want to keep coming
back, because each time they play the game is a little different.
GRAVITY
Enable real gravity for all of the agents in your game by making them
fall faster and faster over time for everything from falling debris to
snowfall. 22
Since you want gravity to affect all agents the same way, putting your code on
the Everyone page saves you the trouble of creating code for each breed. Add a
breed trait called“fall speed”(see CUSTOMTRAITS) and if an agent is above the
ground (z > 0), add to the falling speed (otherwise set both z and falling speed
to 0). Then make the agent drop according to its falling speed.
22
PROCEDURES
Wouldn’t it be great if you could group several programming blocks
together, label them, and reduce the clutter in your programming
workspace? You can do all that, and more, by using PROCEDURES.
Use the large PROCEDURE block to combine your group of code
blocks--be sure to name it, too. It does not matter which tab you put
the procedure on. Then use a CALL block wherever you want to pull
in the code. 23
If you add parameters you can further customize
how the procedure works. Here we create a
parameter called size so you can choose which size
circle to draw each place where you use the Draw
Circle procedure.
23
END GAME
When Player collides with a Hazard
agent, the player toggles the PLAY
GAMEblockoffforeveryone,which
stops the game, and then deletes
itself.You could also stop the game
if the clock reaches a certain value,
if you get a certain score, or if some
other condition is met.
Even if you’ve set the game to only run for a certain amount of time,
sometimes you want to end the game early if the player dies.
Be sure to use a toggle button to start
your game. (See CUSTOM BUTTON for
more about creating buttons).
24
STARLOGO NOVA BLOCK CATEGORIES
AGENTS create/delete/scatter/take camera
DETECTION on collision/nearest agents/count agents
ENVIRONMENT pen/stamp/terrain/clock/world traits
INTERFACE when/while/toggle/databox/graph/table
KEYBOARD key held/key typed
LISTS list/splice/insert/get
LOGIC if/else/while/repeat/yield/=/</>/and/or
MATH random/+/-/remainder/round to/larger/smaller
MOVEMENT forward/back/left/right/up/down/face towards
PROCEDURES procedure/call/parameter/return-early
SOUND record/play/delete
TRAITS set/color/size/shape/x/y/z/heading
VARIABLES var name/set/value
24

More Related Content

PDF
Star logo nova code cookbook
DOC
Green My Place Game7 Switch Search
PDF
120 tips about_photoshop
PPTX
The games factory 2 alien wars
PPTX
Introduction to Unity3D and Building your First Game
PDF
AutoCad Basic tutorial
PPT
Chapter 02
PDF
Flash Prototyping Workbook - Part 1 and 2
Star logo nova code cookbook
Green My Place Game7 Switch Search
120 tips about_photoshop
The games factory 2 alien wars
Introduction to Unity3D and Building your First Game
AutoCad Basic tutorial
Chapter 02
Flash Prototyping Workbook - Part 1 and 2

What's hot (17)

PDF
2012 Toyota 4Runner Display information
PPTX
Petrlel F 2 seismic display 2018 v1.1
PPTX
Scratch Pong Remix Tutorial
PPTX
Petrel F 3 seismic intersections and data manipulation 2018 v1.1
PDF
Flash Tutorial
PPTX
Lesson 1 second quarter Office 2007 format
PDF
PPTX
Petrel F 1 getting started- 2018 v1.1
PPTX
Petrel F 5 horizon interpretation 2018 v1.0
PPTX
Make beliefs comix tutorial
PPTX
Pong on SCRATCH Directions
PDF
Graphic calculator ti voyage 200 guidebook
PPTX
Petrel F 4 fault interpretation 2018 v1.0
PDF
waagen-ecard
PPTX
Final design
PDF
2 d autocad_2009
2012 Toyota 4Runner Display information
Petrlel F 2 seismic display 2018 v1.1
Scratch Pong Remix Tutorial
Petrel F 3 seismic intersections and data manipulation 2018 v1.1
Flash Tutorial
Lesson 1 second quarter Office 2007 format
Petrel F 1 getting started- 2018 v1.1
Petrel F 5 horizon interpretation 2018 v1.0
Make beliefs comix tutorial
Pong on SCRATCH Directions
Graphic calculator ti voyage 200 guidebook
Petrel F 4 fault interpretation 2018 v1.0
waagen-ecard
Final design
2 d autocad_2009
Ad

Similar to Sln skill cards (20)

PDF
Star logo nova code cookbook(1)
PDF
Como usar Geometry Dash Editor (GDE).pdf
PPTX
02 unity 3_d_part_1
PDF
Scratch_1022
PPTX
Platformer Game Design with Sploder - Library Program
PPTX
Kodu game lab2 ppt for school students. it can be used for gr.6 and above
PPT
Bromley Google Earth CPD
PPTX
Poser presentation1
DOCX
Scratch for kids syllabus for 5 hours by bibek pandit
PDF
Sudden strike 1
PPTX
7.Advanced Scripts in Scratch.pptx
PDF
Up cloth - GameDesignDoccument
PDF
Animation basics
PDF
Unity 101
PPT
Google earth skills
PDF
Introduction to Game Programming: Using C# and Unity 3D - Chapter 2 (Preview)
PDF
UE4BlueprintLadderVolumeTutorial
PDF
Tutorial2 scrolling shooter
PDF
How to create_your_own_android_app
Star logo nova code cookbook(1)
Como usar Geometry Dash Editor (GDE).pdf
02 unity 3_d_part_1
Scratch_1022
Platformer Game Design with Sploder - Library Program
Kodu game lab2 ppt for school students. it can be used for gr.6 and above
Bromley Google Earth CPD
Poser presentation1
Scratch for kids syllabus for 5 hours by bibek pandit
Sudden strike 1
7.Advanced Scripts in Scratch.pptx
Up cloth - GameDesignDoccument
Animation basics
Unity 101
Google earth skills
Introduction to Game Programming: Using C# and Unity 3D - Chapter 2 (Preview)
UE4BlueprintLadderVolumeTutorial
Tutorial2 scrolling shooter
How to create_your_own_android_app
Ad

More from Barbara M. King (20)

PPT
Dia de los muertos 2019
PPTX
Chavez web quest
PDF
Pancho villa
PPT
Spain's royal family
PDF
Adverbios
PDF
Stem changing verbs final
PDF
Everyday expressions
PPTX
Me gusta task
PPTX
PPTX
Codesters word wall
PPTX
Codesters
PPTX
Dia de los muertos
PDF
Bullfighting
PPTX
Robotics
PPTX
PPTX
PPTX
Problem solving
PPTX
PDF
Social media
PPTX
Computer Hardware
Dia de los muertos 2019
Chavez web quest
Pancho villa
Spain's royal family
Adverbios
Stem changing verbs final
Everyday expressions
Me gusta task
Codesters word wall
Codesters
Dia de los muertos
Bullfighting
Robotics
Problem solving
Social media
Computer Hardware

Recently uploaded (20)

PPTX
Thinking Routines and Learning Engagements.pptx
PPTX
Macbeth play - analysis .pptx english lit
PDF
The TKT Course. Modules 1, 2, 3.for self study
PPTX
principlesofmanagementsem1slides-131211060335-phpapp01 (1).ppt
PPTX
Case Study on mbsa education to learn ok
PDF
FYJC - Chemistry textbook - standard 11.
PDF
Laparoscopic Colorectal Surgery at WLH Hospital
PDF
Chevening Scholarship Application and Interview Preparation Guide
PDF
Disorder of Endocrine system (1).pdfyyhyyyy
PPTX
Integrated Management of Neonatal and Childhood Illnesses (IMNCI) – Unit IV |...
PDF
Journal of Dental Science - UDMY (2022).pdf
PDF
Farming Based Livelihood Systems English Notes
PPTX
4. Diagnosis and treatment planning in RPD.pptx
PDF
Everyday Spelling and Grammar by Kathi Wyldeck
PPTX
2025 High Blood Pressure Guideline Slide Set.pptx
PDF
Lecture on Viruses: Structure, Classification, Replication, Effects on Cells,...
PPTX
PLASMA AND ITS CONSTITUENTS 123.pptx
PPTX
Reproductive system-Human anatomy and physiology
PDF
Myanmar Dental Journal, The Journal of the Myanmar Dental Association (2013).pdf
PDF
Hospital Case Study .architecture design
Thinking Routines and Learning Engagements.pptx
Macbeth play - analysis .pptx english lit
The TKT Course. Modules 1, 2, 3.for self study
principlesofmanagementsem1slides-131211060335-phpapp01 (1).ppt
Case Study on mbsa education to learn ok
FYJC - Chemistry textbook - standard 11.
Laparoscopic Colorectal Surgery at WLH Hospital
Chevening Scholarship Application and Interview Preparation Guide
Disorder of Endocrine system (1).pdfyyhyyyy
Integrated Management of Neonatal and Childhood Illnesses (IMNCI) – Unit IV |...
Journal of Dental Science - UDMY (2022).pdf
Farming Based Livelihood Systems English Notes
4. Diagnosis and treatment planning in RPD.pptx
Everyday Spelling and Grammar by Kathi Wyldeck
2025 High Blood Pressure Guideline Slide Set.pptx
Lecture on Viruses: Structure, Classification, Replication, Effects on Cells,...
PLASMA AND ITS CONSTITUENTS 123.pptx
Reproductive system-Human anatomy and physiology
Myanmar Dental Journal, The Journal of the Myanmar Dental Association (2013).pdf
Hospital Case Study .architecture design

Sln skill cards

  • 2. 1) TITLE/INDEX 13) DATA BOXES/LABELS 2) AGENT TRAITS 14) BUTTONS 3) BREEDS 15) LEVELS/DIFFICULTY 4) KEYBOARD CONTROL 16) CUSTOM SHAPES 5) HEADING 17) CUSTOM TRAITS 6) DRAW ON TERRAIN 18) SOUND 7) TERRAIN COLOR 19) COLLISION 8) CAMERA VIEW 20) FOLLOW/AVOID 9) TELEPORT 21) CHANCE 10) JUMP 22) GRAVITY 11) FLYING 23) PROCEDURES 12) KEEPING SCORE 24) END/CATEGORIES Access StarLogo Nova at www.slnova.org Copyright 2014 by MIT Scheller Teacher Education Program
  • 3. AGENT TRAITS Change the color, size, shape, location and direction of your agent. You can change any of these traits during your game, such as having a character grow in size or change color. 2
  • 4. 2 You choose from the default agent traits by using the pulldown menu in the SET MY block. Once you choose a trait, you can either type in the TO area or drag in a trait value block, such as BUILT IN SHAPE, blocks from the math drawer such as RANDOM. Set the color by picking from a list of standard colors, choosing a random color, or selecting a specific color using an RGB code. RGB allows you to add values of red, green and blue (the primary colors of light) together to produce any color. Refer to an RGB chart for specific colors.
  • 5. BREEDS Create a new breed when you need a new category of agents which can follow different rules than the other breeds. 3
  • 6. Now you can create agents of that breed and there’s also a new page in the workspace with that breed’s name where you can program all of its behaviors. Click Edit Breeds > Add Breed > Breed name, then check that new breed shows up in the list. 3
  • 7. KEYBOARD CONTROLS Use keyboard controls to move an agent around the 3D world and to control other aspects of your game, such as picking up objects, managing inventory, opening doors, etc. shift 4
  • 8. You can also use a modifier key, such as SHIFT or CONTROL with another key by using the AND block. This would be a good way to enable a player to both walk and run. You can assign any keys on the keyboard to enable basic movement for an agent. Use the KEY HELD block for smooth movement, while KEY TYPED forces a player to keep clicking. 4
  • 9. HEADING Heading controls the direction the agent faces. You can also use the heading trait to establish north/south/east/west in your game world. 5 180° 90° 270° 315° 135° 45° 225° 0°
  • 10. Changing the heading during your game is more precise than using the RIGHT and LEFT movement blocks. Headings also give a way to compare the direction of two or more agents. Setting the heading during setup gives you control over which direction to face when you create new breeds. If you create 1 agent, the agent automatically faces 0°. For 2 agents, they face 180 and 0°. For 3 agents: 120°, 240°, and 0°. See the pattern? Here is the code used to generate the image on the front of this card (see DRAW ON TERRAIN card for explanation). 5
  • 11. DRAW ON TERRAIN The pen feature allows you to draw shapes and patterns on the terrain, with varying line thickness and color. You can even have several agents drawing at the same time to create patterns. 6
  • 12. A few changes to your code can make a more c o m p l i c a t e d shape, such as a five-point star. Here we create 25 turtles and scatter them to draw a bunch of stars in random locations. 6 Any agent can draw on the terrain by using the PEN DOWN block. You can change the line color by changing the color of the agent and the line thickness by changing the agent’s size. Use PEN UP once the drawing is complete.
  • 13. TERRAIN COLOR You can apply a set color to a portion of the terrain (to represent water/fire/etc.) or change the entire terrain color by using the STAMP block. 7
  • 14. You can use the TERRAIN COLOR block to check the color under an agent (handy for setting traps). The STAMP GRID block will just create a 1x1 colored square at the center of the agent regardless of agent size. You can apply a circle of color by choosing the appropriate agent size and using a STAMP and COLOR block. To change the entire terrain color create a giant turtle, stamp the color you want, then delete it. You will usually want to use the CLEAR TERRAIN block during setup to erase any previous colors applied with STAMP or PEN (see DRAW ON TERRAIN). 7
  • 15. CAMERA VIEW Change the point-of-view from overhead to following one of the agents to look like a more traditional 3D action or adventure game. 8 top view
  • 16. For more precise camera control create a new breed called camera, put the TAKE CAMERA block on it and use keyboard controlstochangetheviewinyourgame. You can use the 4 camera buttons above webland to reset your camera to the default top view, zoom in and out, or switch back to agent (3D) view. By default the camera starts from directly above the terrain. For a 3D view place theTAKE CAMERA block inside the CREATE/DO block of the agent you want to follow at the beginning of the game. If you create more than one agent the camera will follow the last one created. 8
  • 17. TELEPORT Teleporting means that you want the agent to instantly move somewhere else. This is a handy way to skip across your game world or even move to a new level. 9
  • 18. Or shrink/expand the agent for a more slick effect. The simplest solution is to program a KEY TYPED block with SCATTER to transport you to a random random location. To simulate a portal, you could have a COLLISION teleport you to a specific place by setting the X and Y traits. (X and Y can both range from -50 to +50. In the center X=0 and Y=0, which is where all agents are initially created during SETUP). 9
  • 19. JUMP Program your agents with the ability to jump. Control how high they go and how many times they jump. 10
  • 20. When the spacebar is pressed the agent jumps into the air and then comes back down. The yield block separates the actions by slowing down the movements. To make faster jumps, remove one or more yield block or increase the number of steps. Alternatively, if you want to make jumping more realistic, see GRAVITY. 10
  • 21. FLYING Program your agents with the ability to fly above the terrain or even into outer space. 11
  • 22. For easy flying just program one key to move up and another to move down. 11 Or you could simulate “flapping” which just requires tapping 1 key, such as the space bar, to keep flapping your wings, otherwise you will continue to fall.
  • 23. KEEPING SCORE You can use the default score box to award player progress in your game. You may also use widgets to display an additional score for an enemy or multiplayer. 12
  • 24. While the way you udate a score is always the same (using a SET DATABOX block), there are several ways to determine how score is kept in your game. You may have the score increase when colliding with some form of treasure... ...or have the score increase continually as long as the player survives... You can even create additional databoxes to keep track of an enemy or teammate’s score. 12
  • 25. TEXT MESSAGES Sometimes it’s helpful to give the player a message in text – such as if you win or lose, directions on how to reset the game, or to enable character dialogue. 13
  • 26. Click EDIT WIDGETS then NEW WIDGET, type a name such as “Message” and select the“Label”option. A collision is often used to trigger a message. You might want to hide your first message until later in the game. Once you click ADD WIDGET It should appear among the other widgets--while in Edit Widget mode you can move your widgets by clicking and dragging. For dialogue, you may want to run SETUP first so you can position the text near your character. Once it’s in the right place click EDIT WIDGETS again. 13
  • 27. BUTTONS A push button is only activated once, such as the Setup button. Toggle buttons can be turned on or off, like a light switch and are used to keep something repeating, like the default PLAY button. 14 great image coming soon!
  • 28. TheWHEN ____ PUSHED block tells to the agent to run the blocks inside of it when the given button (in this case setup) is pushed. The blocks inside WHILE ___ TOGGLED will keep running in a loop as long as the given toggle button is still on. Click EDIT WIDGETS then double click on a button to rename. Click NEW WIDGET to create a new Push orToggle button. 14
  • 29. LEVELS/DIFFICULTY Some games allow players to choose difficulty before they start. Others offer multiple levels to enhance game play. You can give players these choices by using custom buttons. 15
  • 30. For levels, design a large gameworld andhaveyourplayer start in a different location depending on their selection (see TELEPORT). One way to vary difficulty is to create more enemies depending on which push button the player selects (see BUTTONS). Or make your game harder by making theenemiesfaster(seeCUSTOMTRAITS). 15
  • 31. CUSTOM SHAPES Program an agent to look like an object from a library of custom 3D models. 16
  • 32. The shape of an agent can be set to either a built-in shape... ...or a 3D model from the online library. * * If you are linking to a model from the online library, make sure to link to the file that ends in“.obj”[http://slnova.org/shapes/space/moon.obj] You can change an agent’s shape and any time and can even create a simple animated object effect by creating a sequence of rapid shape changes. 16
  • 33. CUSTOM TRAITS You can create and use a custom traits for any breed. Custom traits are things like health, lives and energy that StarLogo Nova doesn’t include automatically but that you might use in your project. 17
  • 34. In the setup of your program be sure to set the starting value to what you want it to be (such as 100 for health or 0 for score). Then use them just like any other traits (size/heading/etc.), increasing or decreasing over time. If you want a trait such as Health to be displayed in a message box see KEEPING SCORE. Click the EDIT BREEDS button then click EDIT TRAITS beside the breed you want to modify, then ADD TRAIT. (This is also where you would add or rename breeds). 17
  • 35. SOUND Recording sound can be a bit tricky the first time, but it’s worth it for the added joy sound effects bring to game play. You will need both sound blocks to record and play. Click record, then scroll up to WebLand to find the record box. The first time your record you may need to enable your microphone.ClicktheAllowbuttonthenthermaybea2nd allow button you need to click at the top of the webpage. Say (or sing) something short, type in the name, then click to save the recording. 18
  • 36. Now you can select the new sound under the dropdown menu of the sound block. Place the 2 sound blocks wherever you wish to trigger your sound. You also have the option of importingsounds. Youwill find the IMPORT SOUND button near the top right of your web page. You can only import sound from your own projects. 18 Say (or sing) something short, type a name, then click SAVE. Once you have finished recorded the sound, you may drag the start and end sliders to trim the sound.
  • 37. COLLISION Being able to detect when objects collide is essential for most games. You can use collision to simulate eating, to trigger a trap or to collect objects in your game. 19
  • 38. Use the collision block to detect when one agent has collided with another agent. You will generally want to change the score (here adding a point) and delete the “collidee,” which is the thing you collided with. See FOLLOW/AVOID to find out about detecting nearby agents. 19
  • 39. FOLLOW/AVOID You will often want to make one agent follow/avoid another agent. We refer to this as AI or artificial intelligence. As your programming skills increase, so will the AI of your agents! 20
  • 40. To have one agent follow another, face toward the agent, then move forward. Use the NEAREST block to find the agent you want. To avoid, face toward the agent, turn around 180degrees,thenmove forward. You may need to adjust the number of steps in NEAREST for best results. 20
  • 41. CHANCE/RANDOMNESS A good game should surprise the player. You can set a random chance of something happening, like making obstacles appear 10% of the time or springing a trap just 1% - any chance you’d like. 21
  • 42. Onewaytoimplementchanceistogeneratearandom number between 1 and 100 and use that value to represent percentage. This code will only create a Turtle 5% of the time because approximately 95% of the time the random number between 1 and 100 will be greater than 5 so the CREATE block will not run. While this code will create 10 enemies with approximately 10 percent being red and the rest white. 21 As you design your game or simulation, look for places where chance could make your game more fun to play. Chance makes players want to keep coming back, because each time they play the game is a little different.
  • 43. GRAVITY Enable real gravity for all of the agents in your game by making them fall faster and faster over time for everything from falling debris to snowfall. 22
  • 44. Since you want gravity to affect all agents the same way, putting your code on the Everyone page saves you the trouble of creating code for each breed. Add a breed trait called“fall speed”(see CUSTOMTRAITS) and if an agent is above the ground (z > 0), add to the falling speed (otherwise set both z and falling speed to 0). Then make the agent drop according to its falling speed. 22
  • 45. PROCEDURES Wouldn’t it be great if you could group several programming blocks together, label them, and reduce the clutter in your programming workspace? You can do all that, and more, by using PROCEDURES. Use the large PROCEDURE block to combine your group of code blocks--be sure to name it, too. It does not matter which tab you put the procedure on. Then use a CALL block wherever you want to pull in the code. 23
  • 46. If you add parameters you can further customize how the procedure works. Here we create a parameter called size so you can choose which size circle to draw each place where you use the Draw Circle procedure. 23
  • 47. END GAME When Player collides with a Hazard agent, the player toggles the PLAY GAMEblockoffforeveryone,which stops the game, and then deletes itself.You could also stop the game if the clock reaches a certain value, if you get a certain score, or if some other condition is met. Even if you’ve set the game to only run for a certain amount of time, sometimes you want to end the game early if the player dies. Be sure to use a toggle button to start your game. (See CUSTOM BUTTON for more about creating buttons). 24
  • 48. STARLOGO NOVA BLOCK CATEGORIES AGENTS create/delete/scatter/take camera DETECTION on collision/nearest agents/count agents ENVIRONMENT pen/stamp/terrain/clock/world traits INTERFACE when/while/toggle/databox/graph/table KEYBOARD key held/key typed LISTS list/splice/insert/get LOGIC if/else/while/repeat/yield/=/</>/and/or MATH random/+/-/remainder/round to/larger/smaller MOVEMENT forward/back/left/right/up/down/face towards PROCEDURES procedure/call/parameter/return-early SOUND record/play/delete TRAITS set/color/size/shape/x/y/z/heading VARIABLES var name/set/value 24