Joël Quenneville
June 28, 2019
230

# Game development in Elm: From Zero to Gamejam

Games are fun to play and fun to make! Elm is a great way to get started building games. We’ll take a whistlestop tour of 2d-game math, visuals, dealing with time, common data modeling solutions, and more. You will be equipped with the knowledge to participate in a game jam and turn your ideas into a playable game.

June 28, 2019

## Transcript

26. ### SAFE TEA Puzzle game where user attempts to find the

optimal tower placement to prevent the pirate(s) from arriving at their goal.
27. ### PATH TO SUCCESS 1. Place tower 2. Pirates move towards

goal 3. Towers shoot pirate 4. Win if pirate is hit 5. Lose if pirate arrives at destination
28. ### OBVIOUS THINGS WE CAN CUT > Multiple tower types >

Multiple levels > Tower upgrades > Waves of pirates
29. ### LESS OBVIOUS THINGS WE CAN CUT > Pirate AI >

Cannonball collision detection > Multiple towers, multiple pirates

34. ### USE Msg TO DRIVE YOUR LOOP type Msg = UserInitiatedDiceRoll

| RandomDiceRollComplete Int | UserEndedTurn

36. ### type Msg = SelectDeck Card.Deck | StartPlaying GameState | PlayCard

Int Card | SelectCard Int | PlayCardToSlot Int Card GameSlot | EndTurn

Tick
40. ### SAFE TEA type Msg = Tick Float | MouseMove Mouse.Position

| PlaceTower | StartPlacement
41. ### DOWN THE RIVER type Msg = Tick Float | Move

Game.YDirection | NewSection Section | StartGame

62. ### TYPE SAFETY AROUND DISTANCES module Measurement exposing (Feet, Pixels, PixelsPerFoot)

type Feet = Feet Int type Pixels = Pixels Int type PixelsPerFoot = PixelsPerFoot Int
63. ### TYPE SAFETY AROUND COORDINATES module Coordinate exposing (World, Screen) type

World = World Point type Screen = Screen Point

65. ### module Cordinate exposing (World, Screen, Viewport) -- OTHER CODE type

alias Viewport = { position : World , width : Pixels , height : Pixels , zoom : PixelsPerFoot }

... }

73. ### SUBSCRIBE TO DELTAS subscriptions : Model -> Sub Msg subscriptions

model = Browser.Events.onAnimationFrameDelta Tick

76. ### COMMON SOLUTIONS > Google > #gamedev on Slack > Your

gamejam community
77. ### When you’re stuck on a programming problem, the best way

to get unstuck is often to try to express the problem in a different medium.

86. ### case region map (TileNumber tileNumber) of NorthWestCorner -> ... NorthEastCorner

-> ... SouthWestCorner -> ... SouthEastCorner -> ... NorthEdge -> ... WestEdge -> ... EastEdge -> ... SouthEdge -> ... Middle -> ...

89. ### JOËL QUENNEVILLE Web developer at thoughtbot > GitHub - JoelQ

> Twitter - @joelquen > Slack - @joelq