Ready, steady, cross platform games - ProgNet 2015

  • View
    3.362

  • Download
    3

  • Category

    Software

Preview:

Citation preview

READY, STEADY, CROSS PLATFORM GAMES ON YOUR PHONE Phillip Trelford, @ptrelford

Progressive .Net Tutorials 2015, #prognet

DON’T GAME CODERS USE C++?

YES

• Engines• Graphics• Sound• Physics

NO

• Scripts• AI• Interaction• Tools

DO THEY REGRET IT?Veteran Games Programmer John Carmack extolling the virtues of functional programming at QuakeCon

THE F IN F# STANDS FOR FUN!Phillip Trelford, @ptrelford

Progressive .Net Tutorials 2015, #prognet

F# FOR PROFIT

Functional-first programming for:

• Time to Market

• Efficiency

• Correctness

• Complexity

F# TESTIMONIALS

order of magnitude increase in productivity, GameSys

performance is 10× better than the C++ that it replaces, Insurance Co.

Units of measure reduced the chance of errors dramatically, Bing

F# is the night vision goggles I need when I go into the dark and attempt to solve previously unsolved problems, Microsoft

MOBILE?Phillip Trelford, @ptrelford

Progressive .Net Tutorials 2015, #prognet

PORTABLE IS DEAD… LONG LIVE MOBILE

• Android games now out-selling games for Sony and Nintendo handhelds

• IDC and App Annie's study suggests that iOS and Android combined now generate four times the revenues of dedicated gaming handhelds

- Guardian

CROSS PLATFORM GAME ENGINES

Designer-orientated

• Unity (C#, F#, JavaScript, Boo)

• PhoneGap (JavaScript, F#, …)

• Marmalade

• …

Code-orientated

• XNA/MonoGame (C#, F#)

• PyGame (Python)

• Love (Lua)

• DirectX (C++)

F# FOR GAMES

EXAMPLE APPS

Path to Go | XBLA Pissed off Owls| iOS Pool | WebGL

FRAMEWORKS FOR GAMES

• .Net• WPF/Silverlight/WinRTXAML

• .Net/Mono• XNA/MonoGameXNA

• F# to JS Compilation• WebSharper/FunScript

HTML5

XNA IS DEADPhillip Trelford, @ptrelford

Progressive .Net Tutorials 2015, #prognet

LONG LIVE MONOGAME

• Develop in Visual Studio (PC) or Xamarin Studio (Mac & PC)

• Cross Platform• iOS• Android• Windows• Mac OSX• Linux• Playstation Mobile• Ouya

CROSS PLATFORM F#

.Net

• Windows• Windows Store• Windows

Phone

Mono

• Mac• Linux• iOS• Android• Ouya• Playstation

Vita

JS

• Chrome/IE• iOS• Android• Blackberry• Windows

Phone• Windows Store

BUT WAIT…

PROTOTYPE

10 WRITE Prototype

20 PLAY Prototype

30 IF fun THEN GOTO 20

40 GOTO 10

THE GAME LOOP

User Input

Logic

Collision DetectionScore

Render

TASKS

TASK 1: BRAIN TRAINING

TASK 2: FLAPPY BIRD

RESOURCES

CHOOSE YOUR OWN ADVENTURE

TOOLING

MonoGame

Paint.Net / Gimp

MusicMaker Jam

Bxfr.Net (Sound effects)

Google

F# KOANS

//---------------------------------------------------------------// About Let//// The let keyword is one of the most fundamental parts of F#.// You'll use it in almost every line of F# code you write, so// let's get to know it well! (no pun intended)//---------------------------------------------------------------[<Koan(Sort = 2)>]module ``about let`` =

[<Koan>] let LetBindsANameToAValue() = let x = 50 AssertEquality x __

TRYFSHARP.ORG

BUY THE BOOK

Steps:

1. Enter game jams

2. Join 1 game a month

3. Publish your indie game

4. Make $$$

5. Go to 1

Recommended