The document describes a new game engine called RedWire that is designed for remixing and mashing up games. It uses a visual programming approach with electronic components like chips, memory, and input/output. The engine runs entirely in the browser and aims to make it easy for developers and non-developers alike to take parts of one game and combine them with another to create new games. It handles issues like merging changes from different programmers and contains the game code in an isolated sandbox for security. The creator invites interested developers and designers to try it out and contribute new features.
2.
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
7. 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
MY BOSS
ME
Why?
20.
“What would have happened”
“Mute” chips
Find chips from memory or IO
Test each chip in isolation
Brett Victor
”Inventing on Principle”
21.
22.
User code is dangerous
Contain within iframe
with sandbox attribute
Parent page - Editor
Sandbox - Game exuecution
Messages replace
function calls
iFrame
sandbox="allow-scripts"
23.
Two chips modifying the same array/object?
Like version control
1. Create patches from a common ancestor
2. Merge patches
Some merges are hard
LCS (Longest Common Subsequence)
Operational transforms
24.
Track all past state
Cloning data takes space!
Full
Patch
Patch
Better solutions
Store mostly patches
Patch
Full
Patch
25.
Persistant data structures
Applies to lists, trees, hash maps, etc.
List A
[1, 2, 3, 4]
1
List B
[5, 2, 3, 4]
5
2
3
4
26.
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]
}];
27.
Input/Output
HTML using Rivets.js
▪ Template + values
▪ 2-way data binding
HTTP
▪ Data replaces events and callbacks!
28.
29.
Looking for new and different games
Developers and designers always welcome!
Lots of new features to work on
30. Paris Game Club - Making, playing, learning
Invited speakers
Micro-game jams
Videos + agenda at
gamelier.org
TODO: changepicture of server baywithsomethingwithcrazierwires (star wars?)Only possible if youspenddays, weeks of delicatesurgery to separatetwothings, and longer to plugthem back together in a differentway
TODO: changepicture of server baywithsomethingwithcrazierwires (star wars?)Only possible if youspenddays, weeks of delicatesurgery to separatetwothings, and longer to plugthem back together in a differentway
Inspiration came from excellent presentations by RichHickeyObserved how when parts of a system are interleaved, throughfunction calls or context or state, itisbecomestoocomplex to understand all the possible interactionsIf a programmer can’treason about a program, hecan’t change it for the betterThat’swhywespendsomuch time refactoring, just to have a system thatissane, thatwecanunderstand and reason about.Defined notion of simplicity, an objective, absolutemeasurement on how interleaved a program’s parts areGave some insights intowhatmakessystems « simple ». If youwant more information, pleaseseehis talk « Simple Made Easy » as well as others by him.
Legos are a simple, but not dynamic. What about electronics as a metaphor?You canconnectany part to anyother one.You can stick a multi-meter or oscilloscope atany point in the circuit to understandwhat’sgoing on. You caneven place several of themat onceYou can pull out anypiece and replace itwithanother. The i »nterface » isjust a pin and a wire.
Not the first to beinspired by electronics.Dat aflow has existedsince the earlydays of computing. The ideais to have a graph of nodes, thatperformoperations on their inputs, and sendtheir outputs onto othernodesfurther down the draph. It was first a computer architecureidea, considered on equal footing with the Van Neumann architecture thateventuallydominated. Onlylaterdidresearchersrelializethat the visual aspects weresocompelling. You cansee data actually move down the graph.This worksverywell for small graphs.
But asyouaddlogic, thingsget more « complex ».Whenanynodecansend data to anyothernode, youget chaos.Each of thesenodes has itsown state, changing all the time.Visual spaghetti isstill spaghetti!Visual spaghetti isstill spaghetti
Differencesfrommostprogrammingenvironments: Reading to memoryis happening simultanously - no race condiitions. Chips are executingconcurrently, can’teffectother. Chips are not directlylinked.Writing to memoryisalsodone in parallel – detectconflicts, mergeresults.ConnectanythingMeasureanywhereReplace everything
Start with single chip thatwrites to ioThen have itwritesomethingbased on memory to ioThen have a different chip modifythatmemoryYou can examine either one in isolationHavingtwo chips writing to the same place is an errorHave itwrite in and out to memoryPut a second thatcoordinateswithitNowyoucan swap one out and put anotherit. Or take out the memoryalltogether
Start with single chip thatwrites to ioThen have itwritesomethingbased on memory to ioThen have a different chip modifythatmemoryYou can examine either one in isolationHavingtwo chips writing to the same place is an errorHave itwrite in and out to memoryPut a second thatcoordinateswithitNowyoucan swap one out and put anotherit. Or take out the memoryalltogether
Start with single chip thatwrites to ioThen have itwritesomethingbased on memory to ioThen have a different chip modifythatmemoryYou can examine either one in isolationHavingtwo chips writing to the same place is an errorHave itwrite in and out to memoryPut a second thatcoordinateswithitNowyoucan swap one out and put anotherit. Or take out the memoryalltogether
By default, an iframecan « reach out » and alter the parent pageSiteslikejsfiddle or plunkr have to deal withthis.Solution: get the browser to enact a securitypolicy. Use a differentdomain or the new HTML5 « iframesandbox ».
Like version control, creates patches from a commonancestor, and thenmergesthemSomemerges, such as onarrays, are difficult to do in a naiveway.Will move to libraryusing LCS Longest Common SubsequenceProblemalgorithm (JSONDiffPatchlibrary)
Treating IO as a buffer (memory) instead of as a set of functionsFor input only, worksgreat (mouse, keyboard)Works well for APIs thatalways do new things (canvas)Can alsowork for persistant APIs, like HTMLHarder for APIs that do feedback
Treating IO as a buffer (memory) instead of as a set of functionsFor input only, worksgreat (mouse, keyboard)Works well for APIs thatalways do new things (canvas)Can alsowork for persistant APIs, like HTMLHarder for APIs that do feedback
Game platformonly as good as the games on it!Wewe help youbringyourgames over to the platform.Live tests in Paris. MicroGame