Top Banner
Killer Engine for Remixing Games Jesse Himmelstein CRI-Paris
31

RedWire - Killer Engine for Remixing Games (at FOSDEM 2014)

May 10, 2015

Download

Technology

Why create games from scratch every time? RedWire is a new open source, online game engine that allows you to remix and repurpose existing games to make your own.

In this talk, which took place at the open source conference FOSDEM 2014, I present the technology behind RedWire and the technical challenges we faced building it.
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: RedWire - Killer Engine for Remixing Games (at FOSDEM 2014)

Killer Engine for Remixing Games

Jesse HimmelsteinCRI-Paris

Page 2: RedWire - Killer Engine for Remixing Games (at FOSDEM 2014)

tl;dr

New game engine, with different goals

Made for remixing games and mashups

Electronics-inspired visual programming

Excellent debugging and live coding tools

All done in the browser

Page 3: RedWire - Killer Engine for Remixing Games (at FOSDEM 2014)

CTO @ cri-paris.org

Interdisciplinary science and engineering

Higher education School and after-school programs

Page 4: RedWire - Killer Engine for Remixing Games (at FOSDEM 2014)

CTO @ cri-paris.org

Education technology

CoIdeaKnownodes

Page 5: RedWire - Killer Engine for Remixing Games (at FOSDEM 2014)

CTO @ cri-paris.org

Scientific and Educational Games

Archimedes' Escape LeapWeizmann Institute

Page 6: RedWire - Killer Engine for Remixing Games (at FOSDEM 2014)

What I Do

Citizen Science Games

FoldItUniv of Washington

FraxinusThe Sainsbury Laboratory

Page 7: RedWire - Killer Engine for Remixing Games (at FOSDEM 2014)

A scientist should just be able to take part of one game, mix it with another one, and then modify it to

make a new one

That’s impossible

Why?

MY BOSS ME

Page 8: RedWire - Killer Engine for Remixing Games (at FOSDEM 2014)

Why?

We have:

A kabillion libraries

A billion game engines

A million programming languages

Classes

Unit tests

Entity Component Systems

Blocks

Distributed Version Control

Virtual machines

Functions

End to end tests

Metaclasses

Page 9: RedWire - Killer Engine for Remixing Games (at FOSDEM 2014)

What remixing should be

Page 10: RedWire - Killer Engine for Remixing Games (at FOSDEM 2014)

What refactoring is like

Page 11: RedWire - Killer Engine for Remixing Games (at FOSDEM 2014)

Simplicity

Interleaving -> incomprehension

Lessons Avoid tangling Leave data alone Sane abstractions for state

and time Rich Hickey"Simple made Easy"

Page 12: RedWire - Killer Engine for Remixing Games (at FOSDEM 2014)

Inspiration

Breadboard

Connect anything

Measure anywhere

Replace everything

Page 13: RedWire - Killer Engine for Remixing Games (at FOSDEM 2014)

Visual Programming

Been done before…

Data flow flowhub

Page 14: RedWire - Killer Engine for Remixing Games (at FOSDEM 2014)

Unreal Kismet

Page 15: RedWire - Killer Engine for Remixing Games (at FOSDEM 2014)

Putting order

Chip

<pin>

<pin>

Chip

<pin>

<pin>

Memory

<data>

<data>

<data>

1. Memory -> Chips

2. Chips compute

3. Chips -> Memory

constant

in out

Page 16: RedWire - Killer Engine for Remixing Games (at FOSDEM 2014)

IO

Chip

<pin>

<pin>

Memory

<data>

<data>

<data>1. IO & Memory ->

Chips

2. Chips compute

3. Chips -> IO & Memory

IO

mouse

keyboard

graphics

Page 17: RedWire - Killer Engine for Remixing Games (at FOSDEM 2014)

Collaboration

Move

speed

position

Memory

speed

position

IO

mouse

keyboard

graphics

Draw

position

shape

Page 18: RedWire - Killer Engine for Remixing Games (at FOSDEM 2014)

Chips

Emitter

SwitchProcessor

Splitter

Page 19: RedWire - Killer Engine for Remixing Games (at FOSDEM 2014)

Switches

Switch

<pin>

<pin>

Chip

<pin>

<pin>

Chip

<pin>

<pin>

Chip

<pin>

<pin>

Chip

<pin>

<pin>

Page 20: RedWire - Killer Engine for Remixing Games (at FOSDEM 2014)

Cool debugging tools

“What would have happened”

“Mute” chips

Find chips from memory or IO

Test each chip in isolationBrett Victor

”Inventing on Principle”

Page 21: RedWire - Killer Engine for Remixing Games (at FOSDEM 2014)

Technical Challenges

Page 22: RedWire - Killer Engine for Remixing Games (at FOSDEM 2014)

Sandboxing User code is

dangerous

Contain within iframe with sandbox attribute

Messages replace function calls

Parent page - Editor

Sandbox - Game exuecution

iFrame sandbox="allow-scripts"

Page 23: RedWire - Killer Engine for Remixing Games (at FOSDEM 2014)

Patching

Two chips modifying the same array/object?

Like version control 1. Create patches from a common ancestor2. Merge patches

Some merges are hard LCS (Longest Common Subsequence) Operational transforms

Page 24: RedWire - Killer Engine for Remixing Games (at FOSDEM 2014)

History

Track all past state

Cloning data takes space!

Better solutions Store mostly patches

Full

Patch

Patch

Patch

Patch

Full

Page 25: RedWire - Killer Engine for Remixing Games (at FOSDEM 2014)

History

Persistant data structures Applies to lists, trees, hash maps, etc.

1 2 3 4

5

List A[1, 2, 3, 4]

List B[5, 2, 3, 4]

Page 26: RedWire - Killer Engine for Remixing Games (at FOSDEM 2014)

Buffer IO

Treat IO as a buffer instead of a set of methods

Input Mouse (getMousePos() -> mouse.position) Keyboard (isKeyDown() -> keyboard.keysDown)

Output Canvas

ctx.fillStyle =  ”black”;ctx.fillRect(0, 0, 100, 100);

canvas.shapes = [{ fillStyle:

“black”, position: [0, 0],

size: [100, 100] }];

Page 27: RedWire - Killer Engine for Remixing Games (at FOSDEM 2014)

Buffer IO

Input/Output HTML using Rivets.js ▪ Template + values▪ 2-way data binding

HTTP▪ Data replaces events and callbacks!

Page 28: RedWire - Killer Engine for Remixing Games (at FOSDEM 2014)

Almost done…

Page 29: RedWire - Killer Engine for Remixing Games (at FOSDEM 2014)

We need you!

Looking for new and different games

Developers and designers always welcome! Lots of new features to work on

Page 30: RedWire - Killer Engine for Remixing Games (at FOSDEM 2014)

Paris Game Club - Making, playing, learning

Invited speakers Micro-game jams

Videos + agenda at

gamelier.org