2d game development with starling
Post on 09-May-2015
1.791 Views
Preview:
DESCRIPTION
TRANSCRIPT
Me & Csharks
● 10 years of Game Development
● 2D games for PC, Web, iOS & Android
● Eye candy art
● More than 300 games created
● Covers tech like Actionscript, Starling, LibGDX, Cocos2D, OpenFL, Unity, CreateJS, Smartfox Server, Torque etc
● Creators of top games in Job / Management game category
● Active in evangelising game development
Some of our games
You
Let me know my audience
Some 2D Game examples
How to make them ?
Building blocks of a game
● Art & UI - Artists
● Code - Programmer
● Sound & Music - Sound Artists
● Story & Game Play - Creative Director
● Play testing – Testers
● Marketing team, Publisher, Analytics team, ...
Platforms
● PC (Mac , Linux)
● Web
● PS4
● Xbox
● Android
● iPhone, iPad
● Wii, DS, PSP
● Microconsoles, Smart TVs
Different tracks for a game programmer
● C++ - Ultimate, Hard, Free, Puli
● Java - Medium, Moderate, Android, Free
● C# - Great, Modern, XNA, Unity, Moderate, Microsoft ?
● Javascript - Web, Unity, Easy, Free, Fragmented
● Starling uses Actionscript which is Java + javascript
A Game Engine
We use game frameworks to build our game engine
Alternate 2D Game frameworks
● Web - Phaser, CreateJS
● Android - LibGDX (crossplatform), AndEngine
● IOS - Cocos2DX (crossplatform), Sparrow, SpriteKit
Under the hood
● DirectX
● OpenGL / OpenGL ES
For the Non – Programmer ???
● Web – Construct 2
● Crossplatform - Gamemaker
The slide many of you may hate...
What else does a game developer need
● Programming skill
● Creative imagination
● Patience
● Should be a gamer
● Logic & analytical skill. Find hacks & shortcuts.
● Above all strong MATH skills - trigonometry, matrices, physics equations, progressions etc
Hero of the day – Starling Framework
● Created by Daniel Sperl of Gamua
● Actionscript 3 language
● Optimised for touch based devices
Flash & Actionscript
Flash is now only used for
● Games
● Video
Why Starling ?
● Crossplatform
● High Performance
● Optimised for touch
● Easy to learn, very same as AS3 default classes
● Field tested & port of Sparrow
● Great community
● Supported by Adobe
● Open source !
OOP refresher
● AS3 is same as Java
A Class
● Independent blue prints of functionality. Eg, Ball
● Methods (functions). Eg, bounce()
● Properties (variables). Eg, weight
var myBall:Ball=new Ball();
trace(myBall.weight);
myBall.bounce();
OOP refresher
Inheritance
● Class can extend another class's functionality
● Uses 'extends' keyword for the same
eg, Tiger extends Cat which already extends Animal
public class Cat extends Animal {
...
}
Development setup
We will need the following for Starling development
● Flash Builder / Flashdevelop / FDT
● Flex SDK, Compiler
● AIR SDK, for crossplatform deployment
● Flash Player standalone program for testing
● Starling framework classes
Starling Graphics
Simple Starling code
Break !
Next we will start some exercises.
Let us check the development setup first.
Exercise 1
Add an image to stage!
Exercise 2
a. Move the image!b. Set image at click position!
c. Frame based v/s Time based
Exercise 3
Texture Atlas!Add an animated MovieClip to stage!
Start / Stop animation on click!
Exercise 4
Bouncing Ball!
Exercise 5
Trigonometry!Rotating arrow!
Exercise 6
Move the arrow with arrows!
Exercise 7
Trigonometry!Rotate & move arrow with arrows!
Let us create a game!
WORKSHOP& crossplatform deployment
top related