Your browser doesn't support the features required by impress.js, so you are presented with a simplified version of this presentation.

For the best experience please use the latest Chrome, Safari or Firefox browser.

DREAM

///////////////////////////////

1991

TL;DListen

Inversion of Control

  1. Lego
  2. Minecraft
  3. Kerbal Space Program
  4. Vimeo, Soundcloud, Etsy
  5. Libraries and Gems
  6. 3D Printers
  7. Customizations and Presets
  8. Mods, Maps and Makers
1991 MIDI / Cakewalk
1997 Goldwave
1998 MOD Trackers
2002 Sonic Foundry ACID
2004 Cubase
2008 Logic Pro
2009 Ableton Live

End of History Illusion

Point is:

Experience not repeated.
Tools change but general patterns are forever.

Audio Prod
Graphics Dev
Ruby
Rapid means you experience more domains

Where do you get your ideas from?

Started with a Clav, expression pedal
Had a visual idea.
Spike on gamebox.
Gosu / Scenes / Play metaphor
Ok, enough.
Talking about music is like dancing about architecture.
-- Steve Martin

Project Start and Breakdown


# os deps from gosu wiki (mac example)
$ brew install sdl2 libogg libvorbis

$ gem install gamebox
Fetching: gamebox-0.5.5.gem (100%)
Successfully installed gamebox-0.5.5
1 gem installed
        
        

gamebox new polka_justice_league
      create  Gemfile
      create  Rakefile
      create  config/boot.rb
      create  data/graphics/GRAPHICS_GO_HERE
      create  data/music/MUSIC_GOES_HERE
      create  spec/helper.rb
      create  src/actors/player_actor.rb
      create  src/app.rb
      ...
        
        

polka_justice_league $ tree -L 2 -F
.
├── Gemfile
├── Gemfile.lock
├── README.md
├── Rakefile
├── config/
│   ├── boot.rb
│   ├── environment.rb
│   └── game.yml
├── data/
│   ├── fonts/
│   ├── graphics/
│   ├── music/
│   └── sounds/
├── spec/
│   └── helper.rb
└── src/
    ├── actors/
    ├── app.rb
    ├── behaviors/
    ├── stages/
    └── views/
        
        

Sprites


# put an image in data/graphics/starfield.png
# src/actors/starfield.rb
define_actor :starfield do
  has_behaviors do
    graphical scale: 5
    positioned
    layered
  end
end

# src/stages/walk.rb
define_stage :walk do
  requires :behavior_factory
  curtain_up do |*args|
    night_sky = create_actor :starfield, x:427, y:240, layer:0
    # ...
        

Sprite Sheets


# src/actors/bedroot_cat.rb
define_actor :bedroom_cat do

  has_behaviors do
    animated frame_update_time: 400, once: false
    graphical scale: 5
    positioned
    layered
  end

end
            

Stages


# config/environment.rb
Gamebox.configure do |config|
  # ...
  config.stages = [:intro, :work, :walk, :house, :bedroom_sitting, :dream]
  config.game_name = "Dream"
end
            

Tweens


tween_manager.tween_properties face, { x:face.x + 5, y:face.y },
  fall_asleep_t, Tween::Quad::InOut
        

Timers


timer_manager.add_timer 'fall_asleep', fall_asleep_t do
  timer_manager.remove_timer 'fall_asleep'
  tween_manager.tween_properties face,
    {x: face.x + 5, y:face.y},
    fall_asleep_t, Tween::Quad::InOut

  behavior_factory.add_behavior face, :fading
  face.emit :fade_out, fall_asleep_t

  timer_manager.add_timer 'face_fade', fall_asleep_t do
    timer_manager.remove_timer 'face_fade'
    asleep_face.emit :fade_out, fall_asleep_t
  end

  # I want to take his face ... off
  timer_manager.add_timer 'face_off', fall_asleep_t * 2 do
    timer_manager.remove_timer 'face_off'
    asleep_face.remove
  end
end
        

Layers

Z-ordering. Just like CSS. Parallax effect!

Parallax Demo

Procedural Drawing

Don't try to draw to offscreen buffers.

Procedural Drawing

That Final Dream Actor

Mistakes all the time!

Widescreen

640x480 -> 854x480

Widescreen

Widescreen

Widescreen

Widescreen

Widescreen

Widescreen

Thanks to Shawn!

gamebox.io / shawn42 on github

Thanks.

@squarism