SlideShare une entreprise Scribd logo
1  sur  27
Chapter 4
Scenes
mrbash.com| stencyl development
Lesson Objectives
• Define each scene basics namely tiles, layers,
coordinates and boundaries.Scene Basics
• Explain the behavioral control of the camera
view.Camera View
• Describe the features of Heads Up Display
(HUD) within the game.HUD
Scenes and game flow
Scenes are basically where all the game play
takes place in.
Scenes control the story flow of a game.
Scenes usually take the form of the following,
1. Prologue
2. Title screen
3. Menu Screen
4. Levels
5. Credits
Scenes and game flow
Many scenes are put together in to form
the entire game.
An overview of scenes in a game can be
created using storyboarding technique.
Scenes possess different customizable
parameters.
Title Scene
Menu
Scene
Stage 1 Stage 2
Stage 3 End Scene
Scene basics
Tiles
The terrain or
land.
Layers –
Different
groups of
actors and
tiles placed
together.
Coordinates
Position of a
game
element in a
scene.
Boundaries
Scene size.
Scene basics
(Tiles)
Refer to a scene’s terrain or land.
Usually a platform for game actors to step on.
Similar to real world tiles such as floor, bathroom,
wall and kitchen tiles.
Scene basics
(Tiles)
Uniform in size (default: 32 pixels)
Can be arranged according to grids.
Tiles are spaced out equally according to tile size.
Scene basics
(Tiles)
Benefits of using tiles
1. Easily re-usable for creating game stages
and levels.
2. Not a need for creating different actors
for different land terrain.
3. Same set of tiles can be used to easily
set a wide variety of maps
Scene basics
(Layers)
Layers define the group of actors and tiles
that are drawn together.
Need for layers arise when certain actors or
tiles need to be on top of another.
Determines the order of drawing game actors
or tiles.
Scene basics
(Managing Layers)
The layers pane in the scene designer is used to
manage scenes layers.
Layers can be created, removed, renamed and re-
arranged using the layers pane.
A layer is specified by its name and layer ID.
Coordinates are basically referring to the position (x , y) of
an actor in a scene.
X coordinate – horizontal
Y coordinate – vertical
Coordinate of the top left most point of a scene is (0 , 0)
Increasing x coordinate moves an actor towards the right
Increasing y coordinate moves an actor towards the bottom
Scene basics
(Coordinates)
(0,0) X
Y
Scene basics
(Boundaries)
Boundaries refers to the initial scene size
upon creation of a scene.
Scenes size is defined in terms of tiles or
pixels.
Scene basics
(Boundaries)
Boundaries control how far the camera
can travel.
Boundaries control and how far tiles can
extend.
Boundaries also restrict game play areas
for actors.
The Camera
Camera zooms in on the current gameplay
revolving around the main player.
Not all game scenes take place within a single
screen.
The need of a camera arises when extending
beyond a single screen.
The Camera
(Scrolling)
Scrolling of the camera takes place when the camera view screen extends beyond 1
screen.
Instances when scrolling happen are side scrolling games.
Scrolling zooms in on the visibility of a screen.
The Camera
(Camera follow player)
Camera of a game usually follows the player.
There is not a need to re-invent the wheel as a
this pre-defined behaviour is included.
The Camera
(Moving the camera)
2 code of blocks associated with moving the
camera,
1. Set the camera’s (x,y) position.
2. Set the camera to follow the centre point of
an actor.
The Camera
(Off screen actors)
Actors become inactive as they gets off screen.
It is as if they stop in time and stop simulating.
In instances where an actor is required to be
active, the following block of code always keeps
an actor in the state of simulation.
Drawing text
Drawing text on the game scene is essential to
any game.
Text displays real time information in a game such
as the number of lives, hp, mp and others.
HUD (Heads Up Display) provides a graphical
display information as the uppermost layer above
everything else.
Drawing Text
(Fonts)
Fonts are used for styling of text.
Font options are similar to almost any text editor.
Include options such as its text size, colour, font
type and stroke.
Drawing Text
(Creating Fonts)
File > Create New > Font
Key in the name of the font for example, “Score
Font”.
This will launch the font editor.
Drawing Text
(Creating Fonts)
TTF (True Type Fonts) are used for the creation of
fonts.
3 default TTF are included within Stencyl.
Any TTF that is available within you computer OS
or downloaded off the internet may be used.
Drawing Text
(Draw Event)
The drawing of a text can be initialised by using
the “Draw Event”
An event or a behaviour containing the “Draw
Event” with the following block of codes can used
to draw text with the font that is created at
specified coordinates.
Drawing Text
(HUD)
A HUD is a statistical dashboard that displays
information regarding the game.
A HUD defies the camera view and permanently
anchors itself on the game scene.
A HUD is a separate layer from the actual
gameplay.
Drawing Text
(Draw Timer)
Create a new behaviour called “Draw Timer.”
File > Create New > Scene Behaviour
Within the behaviour, add a number attribute
called “seconds.”
Drawing Text
(Draw Timer)
Add a “Every N Seconds” Event such as the
following.
Basically what this block of code does is to
increment the value of “seconds” by 1 for
every second.
Next, using the draw event learnt earlier, the
attribute of time is being drawn on the
scene using the following block of codes.
Questions?

Contenu connexe

Tendances

Unit 78: Task 1 Artistic styles used in games
Unit 78: Task 1 Artistic styles used in gamesUnit 78: Task 1 Artistic styles used in games
Unit 78: Task 1 Artistic styles used in gamesConnahTilley
 
Star logo nova code cookbook
Star logo nova  code cookbookStar logo nova  code cookbook
Star logo nova code cookbookBarbara M. King
 
Replika Presentation
Replika PresentationReplika Presentation
Replika Presentationbpatatas
 
Green My Place Game7 Switch Search
Green My Place Game7 Switch SearchGreen My Place Game7 Switch Search
Green My Place Game7 Switch SearchBen Cowley
 
7 gate game design document
7 gate game design document 7 gate game design document
7 gate game design document ARshut Syabrin
 
Scratch for Data Logging and Graphing
Scratch for Data Logging and GraphingScratch for Data Logging and Graphing
Scratch for Data Logging and GraphingBrian Huang
 
The games factory 2 alien wars
The games factory 2 alien warsThe games factory 2 alien wars
The games factory 2 alien warsChaffey College
 
Ac fr ogbzlj0hfgtuukn7qgwbjin09jlfvybtul26nfmcsos0gwpnx_im_kpn1bvazhycx3m6xcq...
Ac fr ogbzlj0hfgtuukn7qgwbjin09jlfvybtul26nfmcsos0gwpnx_im_kpn1bvazhycx3m6xcq...Ac fr ogbzlj0hfgtuukn7qgwbjin09jlfvybtul26nfmcsos0gwpnx_im_kpn1bvazhycx3m6xcq...
Ac fr ogbzlj0hfgtuukn7qgwbjin09jlfvybtul26nfmcsos0gwpnx_im_kpn1bvazhycx3m6xcq...dendipermadi
 
Up cloth - GameDesignDoccument
Up cloth - GameDesignDoccumentUp cloth - GameDesignDoccument
Up cloth - GameDesignDoccumentEléonore Arbaux
 
4.4 advanced games
4.4   advanced games4.4   advanced games
4.4 advanced gamesallenbailey
 
4.3 collision detection
4.3   collision detection4.3   collision detection
4.3 collision detectionallenbailey
 
Freed d week_11 style guide_v5
Freed d week_11 style guide_v5Freed d week_11 style guide_v5
Freed d week_11 style guide_v5Douglas Freed
 
project on snake game in c language
project on snake game in c languageproject on snake game in c language
project on snake game in c languageAshutosh Kumar
 
Sirodgze colorfoundation firstyear
Sirodgze colorfoundation firstyearSirodgze colorfoundation firstyear
Sirodgze colorfoundation firstyearAngelo Lao
 
report on snake game
report on snake game report on snake game
report on snake game azhar niaz
 

Tendances (20)

Unit 78: Task 1 Artistic styles used in games
Unit 78: Task 1 Artistic styles used in gamesUnit 78: Task 1 Artistic styles used in games
Unit 78: Task 1 Artistic styles used in games
 
Game design document
Game design document Game design document
Game design document
 
Sln skill cards
Sln skill cardsSln skill cards
Sln skill cards
 
Star logo nova code cookbook
Star logo nova  code cookbookStar logo nova  code cookbook
Star logo nova code cookbook
 
Replika Presentation
Replika PresentationReplika Presentation
Replika Presentation
 
Work flow
Work flowWork flow
Work flow
 
Green My Place Game7 Switch Search
Green My Place Game7 Switch SearchGreen My Place Game7 Switch Search
Green My Place Game7 Switch Search
 
7 gate game design document
7 gate game design document 7 gate game design document
7 gate game design document
 
Scratch for Data Logging and Graphing
Scratch for Data Logging and GraphingScratch for Data Logging and Graphing
Scratch for Data Logging and Graphing
 
The games factory 2 alien wars
The games factory 2 alien warsThe games factory 2 alien wars
The games factory 2 alien wars
 
Ac fr ogbzlj0hfgtuukn7qgwbjin09jlfvybtul26nfmcsos0gwpnx_im_kpn1bvazhycx3m6xcq...
Ac fr ogbzlj0hfgtuukn7qgwbjin09jlfvybtul26nfmcsos0gwpnx_im_kpn1bvazhycx3m6xcq...Ac fr ogbzlj0hfgtuukn7qgwbjin09jlfvybtul26nfmcsos0gwpnx_im_kpn1bvazhycx3m6xcq...
Ac fr ogbzlj0hfgtuukn7qgwbjin09jlfvybtul26nfmcsos0gwpnx_im_kpn1bvazhycx3m6xcq...
 
Up cloth - GameDesignDoccument
Up cloth - GameDesignDoccumentUp cloth - GameDesignDoccument
Up cloth - GameDesignDoccument
 
4.4 advanced games
4.4   advanced games4.4   advanced games
4.4 advanced games
 
4.3 collision detection
4.3   collision detection4.3   collision detection
4.3 collision detection
 
Freed d week_11 style guide_v5
Freed d week_11 style guide_v5Freed d week_11 style guide_v5
Freed d week_11 style guide_v5
 
project on snake game in c language
project on snake game in c languageproject on snake game in c language
project on snake game in c language
 
Gamemaker
GamemakerGamemaker
Gamemaker
 
Sirodgze colorfoundation firstyear
Sirodgze colorfoundation firstyearSirodgze colorfoundation firstyear
Sirodgze colorfoundation firstyear
 
snake game
snake gamesnake game
snake game
 
report on snake game
report on snake game report on snake game
report on snake game
 

Similaire à Chapt 4 scene parameters

98 374 Lesson 03-slides
98 374 Lesson 03-slides98 374 Lesson 03-slides
98 374 Lesson 03-slidesTracie King
 
Silverlight as a Gaming Platform
Silverlight as a Gaming PlatformSilverlight as a Gaming Platform
Silverlight as a Gaming Platformgoodfriday
 
Game Design Document - Step by Step Guide
Game Design Document - Step by Step GuideGame Design Document - Step by Step Guide
Game Design Document - Step by Step GuideDevBatch Inc.
 
Game design true nature
Game design true natureGame design true nature
Game design true natureAnton Gromov
 
Ui in unity
Ui in unityUi in unity
Ui in unityNoam Gat
 
Introduction to Artificial Intelligence
Introduction to Artificial IntelligenceIntroduction to Artificial Intelligence
Introduction to Artificial IntelligenceAhmed Hani Ibrahim
 
Work flow the pain is reel
Work flow the pain is reelWork flow the pain is reel
Work flow the pain is reelShaz Riches
 
Production RPG Maker.
Production RPG Maker. Production RPG Maker.
Production RPG Maker. Jordi Martos
 
Lecture 02 game_design_components_and_process
Lecture 02 game_design_components_and_processLecture 02 game_design_components_and_process
Lecture 02 game_design_components_and_processSayed Ahmed
 
Fundamentals of game development overview
Fundamentals of game development overviewFundamentals of game development overview
Fundamentals of game development overviewChaffey College
 
Introduction to game_design
Introduction to game_designIntroduction to game_design
Introduction to game_designSayed Ahmed
 
Introduction To 3D Gaming
Introduction To 3D GamingIntroduction To 3D Gaming
Introduction To 3D GamingClint Edmonson
 
The Ring programming language version 1.4 book - Part 14 of 30
The Ring programming language version 1.4 book - Part 14 of 30The Ring programming language version 1.4 book - Part 14 of 30
The Ring programming language version 1.4 book - Part 14 of 30Mahmoud Samir Fayed
 

Similaire à Chapt 4 scene parameters (20)

98 374 Lesson 03-slides
98 374 Lesson 03-slides98 374 Lesson 03-slides
98 374 Lesson 03-slides
 
Md2010 jl-wp7-sl-game-dev
Md2010 jl-wp7-sl-game-devMd2010 jl-wp7-sl-game-dev
Md2010 jl-wp7-sl-game-dev
 
Silverlight as a Gaming Platform
Silverlight as a Gaming PlatformSilverlight as a Gaming Platform
Silverlight as a Gaming Platform
 
Game Design Document - Step by Step Guide
Game Design Document - Step by Step GuideGame Design Document - Step by Step Guide
Game Design Document - Step by Step Guide
 
Unity
UnityUnity
Unity
 
Game design true nature
Game design true natureGame design true nature
Game design true nature
 
Shootemup report
Shootemup reportShootemup report
Shootemup report
 
Ui in unity
Ui in unityUi in unity
Ui in unity
 
Introduction to Artificial Intelligence
Introduction to Artificial IntelligenceIntroduction to Artificial Intelligence
Introduction to Artificial Intelligence
 
WP7 HUB_XNA
WP7 HUB_XNAWP7 HUB_XNA
WP7 HUB_XNA
 
Work flow
Work flowWork flow
Work flow
 
Work flow the pain is reel
Work flow the pain is reelWork flow the pain is reel
Work flow the pain is reel
 
Production RPG Maker.
Production RPG Maker. Production RPG Maker.
Production RPG Maker.
 
Lecture 02 game_design_components_and_process
Lecture 02 game_design_components_and_processLecture 02 game_design_components_and_process
Lecture 02 game_design_components_and_process
 
Fundamentals of game development overview
Fundamentals of game development overviewFundamentals of game development overview
Fundamentals of game development overview
 
Presentación Unity
Presentación UnityPresentación Unity
Presentación Unity
 
Introduction to game_design
Introduction to game_designIntroduction to game_design
Introduction to game_design
 
Introduction To 3D Gaming
Introduction To 3D GamingIntroduction To 3D Gaming
Introduction To 3D Gaming
 
The Ring programming language version 1.4 book - Part 14 of 30
The Ring programming language version 1.4 book - Part 14 of 30The Ring programming language version 1.4 book - Part 14 of 30
The Ring programming language version 1.4 book - Part 14 of 30
 
Visual Styles
Visual StylesVisual Styles
Visual Styles
 

Dernier

TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 

Dernier (20)

TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 

Chapt 4 scene parameters

  • 2. Lesson Objectives • Define each scene basics namely tiles, layers, coordinates and boundaries.Scene Basics • Explain the behavioral control of the camera view.Camera View • Describe the features of Heads Up Display (HUD) within the game.HUD
  • 3. Scenes and game flow Scenes are basically where all the game play takes place in. Scenes control the story flow of a game. Scenes usually take the form of the following, 1. Prologue 2. Title screen 3. Menu Screen 4. Levels 5. Credits
  • 4. Scenes and game flow Many scenes are put together in to form the entire game. An overview of scenes in a game can be created using storyboarding technique. Scenes possess different customizable parameters. Title Scene Menu Scene Stage 1 Stage 2 Stage 3 End Scene
  • 5. Scene basics Tiles The terrain or land. Layers – Different groups of actors and tiles placed together. Coordinates Position of a game element in a scene. Boundaries Scene size.
  • 6. Scene basics (Tiles) Refer to a scene’s terrain or land. Usually a platform for game actors to step on. Similar to real world tiles such as floor, bathroom, wall and kitchen tiles.
  • 7. Scene basics (Tiles) Uniform in size (default: 32 pixels) Can be arranged according to grids. Tiles are spaced out equally according to tile size.
  • 8. Scene basics (Tiles) Benefits of using tiles 1. Easily re-usable for creating game stages and levels. 2. Not a need for creating different actors for different land terrain. 3. Same set of tiles can be used to easily set a wide variety of maps
  • 9. Scene basics (Layers) Layers define the group of actors and tiles that are drawn together. Need for layers arise when certain actors or tiles need to be on top of another. Determines the order of drawing game actors or tiles.
  • 10. Scene basics (Managing Layers) The layers pane in the scene designer is used to manage scenes layers. Layers can be created, removed, renamed and re- arranged using the layers pane. A layer is specified by its name and layer ID.
  • 11. Coordinates are basically referring to the position (x , y) of an actor in a scene. X coordinate – horizontal Y coordinate – vertical Coordinate of the top left most point of a scene is (0 , 0) Increasing x coordinate moves an actor towards the right Increasing y coordinate moves an actor towards the bottom Scene basics (Coordinates) (0,0) X Y
  • 12. Scene basics (Boundaries) Boundaries refers to the initial scene size upon creation of a scene. Scenes size is defined in terms of tiles or pixels.
  • 13. Scene basics (Boundaries) Boundaries control how far the camera can travel. Boundaries control and how far tiles can extend. Boundaries also restrict game play areas for actors.
  • 14. The Camera Camera zooms in on the current gameplay revolving around the main player. Not all game scenes take place within a single screen. The need of a camera arises when extending beyond a single screen.
  • 15. The Camera (Scrolling) Scrolling of the camera takes place when the camera view screen extends beyond 1 screen. Instances when scrolling happen are side scrolling games. Scrolling zooms in on the visibility of a screen.
  • 16. The Camera (Camera follow player) Camera of a game usually follows the player. There is not a need to re-invent the wheel as a this pre-defined behaviour is included.
  • 17. The Camera (Moving the camera) 2 code of blocks associated with moving the camera, 1. Set the camera’s (x,y) position. 2. Set the camera to follow the centre point of an actor.
  • 18. The Camera (Off screen actors) Actors become inactive as they gets off screen. It is as if they stop in time and stop simulating. In instances where an actor is required to be active, the following block of code always keeps an actor in the state of simulation.
  • 19. Drawing text Drawing text on the game scene is essential to any game. Text displays real time information in a game such as the number of lives, hp, mp and others. HUD (Heads Up Display) provides a graphical display information as the uppermost layer above everything else.
  • 20. Drawing Text (Fonts) Fonts are used for styling of text. Font options are similar to almost any text editor. Include options such as its text size, colour, font type and stroke.
  • 21. Drawing Text (Creating Fonts) File > Create New > Font Key in the name of the font for example, “Score Font”. This will launch the font editor.
  • 22. Drawing Text (Creating Fonts) TTF (True Type Fonts) are used for the creation of fonts. 3 default TTF are included within Stencyl. Any TTF that is available within you computer OS or downloaded off the internet may be used.
  • 23. Drawing Text (Draw Event) The drawing of a text can be initialised by using the “Draw Event” An event or a behaviour containing the “Draw Event” with the following block of codes can used to draw text with the font that is created at specified coordinates.
  • 24. Drawing Text (HUD) A HUD is a statistical dashboard that displays information regarding the game. A HUD defies the camera view and permanently anchors itself on the game scene. A HUD is a separate layer from the actual gameplay.
  • 25. Drawing Text (Draw Timer) Create a new behaviour called “Draw Timer.” File > Create New > Scene Behaviour Within the behaviour, add a number attribute called “seconds.”
  • 26. Drawing Text (Draw Timer) Add a “Every N Seconds” Event such as the following. Basically what this block of code does is to increment the value of “seconds” by 1 for every second. Next, using the draw event learnt earlier, the attribute of time is being drawn on the scene using the following block of codes.

Notes de l'éditeur

  1. Regarding an actor behaviour.
  2. Regarding an actor behaviour.
  3. Regarding an actor behaviour.
  4. Regarding an actor behaviour.
  5. Regarding an actor behaviour.
  6. Regarding an actor behaviour.
  7. Regarding an actor behaviour.
  8. Regarding an actor behaviour.
  9. Regarding an actor behaviour.
  10. Regarding an actor behaviour.
  11. Regarding an actor behaviour.