Use LEFT and RIGHT arrow keys to navigate between flashcards;
Use UP and DOWN arrow keys to flip the card;
H to show hint;
A reads text to speech;
81 Cards in this Set
- Front
- Back
Week 5 Arcadia |
return Null; |
|
Application Programmer Interface (API) |
Operations, attributes allowing access to a third-party product
Web Services, hardware, software plugin
|
|
Role Playing Game |
Players become character in fictional setting
Players act as protagonist in their own story
Features Ex: Quests |
|
Feature Details |
may have additional information associated with them
Example: Quests
If a player accepted a quest, what does the game know about the quest (name, description) |
|
Game VS Character |
Some info about a quest is specific to the game -Quest name should be same for all characters
Some info about quest is character specific -Has my character completed this quest
What are specific to the game, what are specific to the character? Could be conditional in some cases |
|
Arcadia Engine |
Open source engine for web-based games
Built with PHP/MySQL
There are certain things probably going to happen -register, have a character, use databases, metadata |
|
Hooks |
Most plugins use them
We may think of as a filter or action, is an event that occurs while plugin is running
Actions are triggered by specific events taking place in the plugin |
|
Building an API |
What sort of things do we need to expose to a game that is effectively undefined?
What does an engine need to provide to an abstract notion of a game?
What does a component need to provide a user? |
|
Metadata |
You have a SOMETHING The SOMETHINGS are data
That SOMETHING has ABUNCHOFSTUFF ABUNCHOFSTUFF is metadata
|
|
Metadata in Arcadia |
Game data stored in game_meta table
3 important pieces of information -key type -meta key(id for key) -meta value(details)
Character data in character_meta table -key type, meta key, meta value, character id |
|
Achievements as Metadata |
Awarded when character achieves some game state
Names, descriptions, and completion tasks are game-specific
State are character-specific |
|
Week 5 Arcadia Summary |
An API should strive to provide max utility while not begin restrictive
In the case of a game engine, enable the developer to use the functionality without tying them to a particular implementation |
|
Week 5 |
YAY
|
|
Software Architecture ** |
Topology: Components and connectors making up the system
Interfaces: Operations that a component provides to its users
Dynamics: How components collaborate to carry out their tasks |
|
WordPress VS WoW |
Context is important
Wordpress Plugins allow customization of nearly everything
WoW allows plugins that can obtain data, while only making limited set of changes |
|
API Summary |
Provides programmers an interface to third party code or devices
Form a significant part of info hiding |
|
Component Interfaces |
Individual components within your software will have their own interfaces
Similar to API concept, but with your own code
Ties naturally to the class concept of Object oriented prog |
|
Stack Interface |
Top(): Object -Returns top element of the stack
Push(newValue : Object) -places the given value at the top of stack
Pop() -Removes the top element of the stack -If the stack is empty, has not effect |
|
Interfaces should... |
Class Diagram-Same as usual Component Diagram-how components use interfaces Be easily understood Be efficiently implementable Be implementable within budget Hide implementation choices Support clear, efficient user Support reuse
|
|
Week 666 the number of the beast |
YAYYYYYY FBGM |
|
Sequence Diagram |
Are subset diagrams of UML Interaction diagrams
Capture one aspect of the dynamics of the system
|
|
Drawing Sequence Diagrams |
See Slide 8 in Week 6 PDF |
|
Diagrams |
Component/class/object diagrams show the structure of a system
Interfaces specify how components with each other
Sequence diagrams show how components do communicate with each other |
|
Week 7 |
7, 11, 11 come to pizza pizza hey hey hey |
|
What makes a great game? |
Engaging story, challenge, pace, graphics
Doesn't crash, doesn't lag, servers are good
|
|
Quality Attributes |
Runtime: performance, security, availability, scalability, usability
Development time: modifiability, portability, reusability, testability
Business: time to market, cost, projected lifetime of system |
|
Runtime Attributes |
Performance
Security
Availability
Scalability
Usability |
|
Performance ;) |
Degree to which system consumes resources (CPU, disk, memory, network)
By corollary, system's responsiveness (Feedback time, feedthrough, time) |
|
Feedback time |
Time it takes system to respond to player's actions |
|
Feedthrough time |
Time until other players see result of a given player's actions |
|
Jitter |
Variance in feedback time / feedthrough time
Sometimes high feedback is acceptable as long as variance is low
Consistency in lag is good |
|
Performance Metrics |
Memory consumption
Dick space consumption
Network consumption
|
|
Security |
Speed hacks, wall hacks
Sniffing data stream
Hacking and pillaging accounts |
|
Availability |
What % of the time the system is available for use
System may cease to be available to be available through - network failure, hardware failure, software failure |
|
Availability |
Mean time to failure ----------------------------------- Mean time to fail + mean time to repair |
|
Scalability |
Degree to which system can accommodate increasing load
IE # of players in an online game
|
|
Usability |
Quality of human-computer interaction afforded by system
-ease of learning -efficiency -error avoidance -error handling -satisifcation |
|
Development Time Attributes |
Modifiability
Portability
Reusability
Testability |
|
Modifiability |
Measures how easy it is to chance the system |
|
Porta-bae-lity |
Ease of moving software from one platform to another |
|
Reusability |
Ease of which components of this system can be reused in other systems |
|
Testability |
Ease with which software cane made to demo its faults through testing
|
|
Business Attributes |
Time to market
Cost
Projected lifetime of system |
|
Remote Lag |
Just think FPS lag, the buffer creates consistency |
|
Design Patterns |
a set of rules of how to structure code in order to solve a particular class of problem |
|
Asynchronous Polling ;) |
See Week 7 Slide 42 to Slide 78 |
|
Week 8 the great |
8 looks like a snowman |
|
Logging in Games |
Digital games can be very hard to debug
For example: consider a game server running for weeks/months and it crashes
How do you fix it?, could be hard lol |
|
Log files |
As the program executes, write out status info to a log file
Indicates what part of the program is executing
Specifies errors as they arise
|
|
Info in a Log File |
Execution trace
Errors, Exceptions
Indicators of cheating
Chat logs Resource consumption |
|
Log File Format |
Sequence of lines Time log message written Severity Level Message itself |
|
Severity |
Severe: system encountered a critical error Error: System encountered an error, but not critical Warning: Reports an undesired condition of non-critical nature Verbose: Status update showing what activity is performing |
|
Log File Sizes |
Can get very large lol Particularly a problem on small mobile devices ;)
Solutions: truncate old info, rotate log file (copy file to new location, compress, start a new file, filter results |
|
Singleton |
Basic Idea: Create just one instance of the logger
Provide a static method in the logger class that returns one instance
Whenever we need the logger, simply call Logger.GetInstance() to hold it |
|
Case against Singleton |
design pattern promotes global variables
harder to understand code increases coupling not amenable to concurrency impossible to unit test |
|
Trade-offs of Singleton |
Pro: provides convenient way to ensure only one instance of a class is created
Con: made by conceding to a significant architectural design decision |
|
List of Entities |
Use a list to track instances of Entity
List e_list = new List();
When we want to update all instances we just go through the list |
|
Adapter |
Design pattern converts the interface of a class into another interface expected by clients
Lets classes work together |
|
adapter Quality Attributes |
Modifiability - class provides clean interface to clients of adapted object
Reusability - takes advantage of adapted class for reuse
Correctness - takes advantage of tested code |
|
Prefabs in Unity |
asset type uses an existing GameObject, complete with components and properties, to create a template
Its a template basically |
|
Instantiate Method |
Call that creates an instance of a prefab
Instantiate(prefab, position, rotation) |
|
Week 9 |
9 is 50% 69 |
|
Design Patterns |
Set of rules of how to structure code in order to solve a particular class of problem
Provides vocabulary to discuss design
Good for Object orientated
help improve at least quality attributes |
|
UI Development |
Building a Front-end menu system for a game
A flowchart of expected moves, logos, menu options
Menus arent finalized, you could change it later |
|
Variable & Conditional |
Okay for smaller menu systems |
|
Finite State Machines |
Express the menu in a state machine
What state are we at? Where can we get from our current state?
|
|
State Design Pattern |
Keep a local reference to a State object
When we input, pass it to a State object
|
|
Example: AI |
Consider FPS Bots
Behaviour driven by a state machine
tradeoff - increases # of objects, states as objects are individually testable |
|
Refactoring |
Process of changing a software system such that -change does not alter external behaviour -improves internal structure
Minimizes the change of introducing bugs
Improves the design of the code |
|
Extract Method (Refactoring) |
Turn a code fragment into a method whose name explains the purpose of the method
|
|
Extract Class (refactoring) |
create a new class and move the relevant fields and methods from the old class into the new class |
|
When to Refactor? |
Notice something wrong with code
Identify an appropriate refeactoring |
|
Code Smells |
If it stinks change it |
|
Duplicated Code (Code Smells) |
Same code structure used in multiple spaces |
|
Long Method (Code Smells) |
Long blocks of code are harder to understand
Smaller well-named methods are easy to understand, even if you can't the method code |
|
Long Parameter List (Code Smell) |
Global variables are bad mkay
replace parameter with a method
Access a this.getSomething(), instead of passing it in |
|
Switch Statements (Code Smells) |
Object oriented code should lead to fewer switch statements
|
|
Speculative Generality |
Implementation thats does much more than is necessary to make system functional
-Abstract classes used by a single subclass -Methods with unused params -Classes names with odd abstract names
|
|
Comments (Code Smells) |
Can be a sign that code is too complicated
If code stinks, comments are a deodorant
Laura take note |
|
Magic Numbers |
header(da, da, da, 5)
The fuq is 5? |
|
this.remove() |
well im outta ideas |