Programming with a gamepad · • Live coding doesn't have to be about text editors • Live coding...
Transcript of Programming with a gamepad · • Live coding doesn't have to be about text editors • Live coding...
![Page 1: Programming with a gamepad · • Live coding doesn't have to be about text editors • Live coding doesn't have to be hard 4. Gamepads • Analogue sticks • Directional pad •](https://reader035.fdocuments.us/reader035/viewer/2022071218/6051e2299326cc13e636e3b9/html5/thumbnails/1.jpg)
Programming with a gamepad
Dave Griffiths
1
![Page 2: Programming with a gamepad · • Live coding doesn't have to be about text editors • Live coding doesn't have to be hard 4. Gamepads • Analogue sticks • Directional pad •](https://reader035.fdocuments.us/reader035/viewer/2022071218/6051e2299326cc13e636e3b9/html5/thumbnails/2.jpg)
Overview
• 2 music live coding environments
• Common stuff they share
Gamepads
Ringmenus
Uncrashable languages
• Betablocker
Demo
• Al-Jazari
Demo
• Thoughts
2
![Page 3: Programming with a gamepad · • Live coding doesn't have to be about text editors • Live coding doesn't have to be hard 4. Gamepads • Analogue sticks • Directional pad •](https://reader035.fdocuments.us/reader035/viewer/2022071218/6051e2299326cc13e636e3b9/html5/thumbnails/3.jpg)
Common stuff
3
![Page 4: Programming with a gamepad · • Live coding doesn't have to be about text editors • Live coding doesn't have to be hard 4. Gamepads • Analogue sticks • Directional pad •](https://reader035.fdocuments.us/reader035/viewer/2022071218/6051e2299326cc13e636e3b9/html5/thumbnails/4.jpg)
Vague themes
• Make watching live coding a bitmore accessible
• Live coding doesn't have to beabout text editors
• Live coding doesn't have to behard
4
![Page 5: Programming with a gamepad · • Live coding doesn't have to be about text editors • Live coding doesn't have to be hard 4. Gamepads • Analogue sticks • Directional pad •](https://reader035.fdocuments.us/reader035/viewer/2022071218/6051e2299326cc13e636e3b9/html5/thumbnails/5.jpg)
Gamepads
• Analogue sticks
• Directional pad
• Right hand buttons
• Shoulder buttons
• Force feedback
• Analogue buttons
5
![Page 6: Programming with a gamepad · • Live coding doesn't have to be about text editors • Live coding doesn't have to be hard 4. Gamepads • Analogue sticks • Directional pad •](https://reader035.fdocuments.us/reader035/viewer/2022071218/6051e2299326cc13e636e3b9/html5/thumbnails/6.jpg)
Ring Menus
6
![Page 7: Programming with a gamepad · • Live coding doesn't have to be about text editors • Live coding doesn't have to be hard 4. Gamepads • Analogue sticks • Directional pad •](https://reader035.fdocuments.us/reader035/viewer/2022071218/6051e2299326cc13e636e3b9/html5/thumbnails/7.jpg)
Ring menus
Values from analogue stick
7
![Page 8: Programming with a gamepad · • Live coding doesn't have to be about text editors • Live coding doesn't have to be hard 4. Gamepads • Analogue sticks • Directional pad •](https://reader035.fdocuments.us/reader035/viewer/2022071218/6051e2299326cc13e636e3b9/html5/thumbnails/8.jpg)
Ring menus
Convert to vector
8
![Page 9: Programming with a gamepad · • Live coding doesn't have to be about text editors • Live coding doesn't have to be hard 4. Gamepads • Analogue sticks • Directional pad •](https://reader035.fdocuments.us/reader035/viewer/2022071218/6051e2299326cc13e636e3b9/html5/thumbnails/9.jpg)
Ring menus
Use magnitude to activate menu
9
![Page 10: Programming with a gamepad · • Live coding doesn't have to be about text editors • Live coding doesn't have to be hard 4. Gamepads • Analogue sticks • Directional pad •](https://reader035.fdocuments.us/reader035/viewer/2022071218/6051e2299326cc13e636e3b9/html5/thumbnails/10.jpg)
Ring menus
Use angle to pick from items
10
![Page 11: Programming with a gamepad · • Live coding doesn't have to be about text editors • Live coding doesn't have to be hard 4. Gamepads • Analogue sticks • Directional pad •](https://reader035.fdocuments.us/reader035/viewer/2022071218/6051e2299326cc13e636e3b9/html5/thumbnails/11.jpg)
Ring menus
• Nice tactile feel• Good use of muscle memory• You can pick from quite a large
range• Seems easier than mouse based
'gestures'
11
![Page 12: Programming with a gamepad · • Live coding doesn't have to be about text editors • Live coding doesn't have to be hard 4. Gamepads • Analogue sticks • Directional pad •](https://reader035.fdocuments.us/reader035/viewer/2022071218/6051e2299326cc13e636e3b9/html5/thumbnails/12.jpg)
Uncrashable Languages
12
![Page 13: Programming with a gamepad · • Live coding doesn't have to be about text editors • Live coding doesn't have to be hard 4. Gamepads • Analogue sticks • Directional pad •](https://reader035.fdocuments.us/reader035/viewer/2022071218/6051e2299326cc13e636e3b9/html5/thumbnails/13.jpg)
Uncrashable Languages
• Design away crashesDivide by 0 returns 0Invalid memory read returns 0
• Genetic programming: Tierra• Not good for general purposes
Crashes stop unintended codefrom executingRemoving them makes bugs veryhard to find
13
![Page 14: Programming with a gamepad · • Live coding doesn't have to be about text editors • Live coding doesn't have to be hard 4. Gamepads • Analogue sticks • Directional pad •](https://reader035.fdocuments.us/reader035/viewer/2022071218/6051e2299326cc13e636e3b9/html5/thumbnails/14.jpg)
Uncrashable Livecoding
• Good for live coding:Less chance of embarrassment!Things can run out of controlChanges how you programMalleable/brittle
• All possible programs areexecutable
14
![Page 15: Programming with a gamepad · • Live coding doesn't have to be about text editors • Live coding doesn't have to be hard 4. Gamepads • Analogue sticks • Directional pad •](https://reader035.fdocuments.us/reader035/viewer/2022071218/6051e2299326cc13e636e3b9/html5/thumbnails/15.jpg)
Betablocker
15
![Page 16: Programming with a gamepad · • Live coding doesn't have to be about text editors • Live coding doesn't have to be hard 4. Gamepads • Analogue sticks • Directional pad •](https://reader035.fdocuments.us/reader035/viewer/2022071218/6051e2299326cc13e636e3b9/html5/thumbnails/16.jpg)
Betablocker influences
• TOPLAP discussion on virtualmachines ("Hello (& Chaos)" 2004)
• Corewars (Redcode)
• Forth
• Mr Driller
16
![Page 17: Programming with a gamepad · • Live coding doesn't have to be about text editors • Live coding doesn't have to be hard 4. Gamepads • Analogue sticks • Directional pad •](https://reader035.fdocuments.us/reader035/viewer/2022071218/6051e2299326cc13e636e3b9/html5/thumbnails/17.jpg)
Betablocker
• First attempt at gamepad coding
• Virtual machine
• Multithreaded
• No memory protection
• All memory is visible
• The rhythm is a direct result of theinstruction count
• Very unpredictable
17
![Page 18: Programming with a gamepad · • Live coding doesn't have to be about text editors • Live coding doesn't have to be hard 4. Gamepads • Analogue sticks • Directional pad •](https://reader035.fdocuments.us/reader035/viewer/2022071218/6051e2299326cc13e636e3b9/html5/thumbnails/18.jpg)
Demo
18
![Page 19: Programming with a gamepad · • Live coding doesn't have to be about text editors • Live coding doesn't have to be hard 4. Gamepads • Analogue sticks • Directional pad •](https://reader035.fdocuments.us/reader035/viewer/2022071218/6051e2299326cc13e636e3b9/html5/thumbnails/19.jpg)
Al-Jazari
19
![Page 20: Programming with a gamepad · • Live coding doesn't have to be about text editors • Live coding doesn't have to be hard 4. Gamepads • Analogue sticks • Directional pad •](https://reader035.fdocuments.us/reader035/viewer/2022071218/6051e2299326cc13e636e3b9/html5/thumbnails/20.jpg)
Al-Jazari
• 13th century scientist and inventor
First recorded use of gears
Crankshaft
Mechanical clock
Combination lock
• Programmable humanoid robot
Robot musicians for royal drinkingparties
20
![Page 21: Programming with a gamepad · • Live coding doesn't have to be about text editors • Live coding doesn't have to be hard 4. Gamepads • Analogue sticks • Directional pad •](https://reader035.fdocuments.us/reader035/viewer/2022071218/6051e2299326cc13e636e3b9/html5/thumbnails/21.jpg)
Al-Jazari
(live coding for royal drinking parties)
21
![Page 22: Programming with a gamepad · • Live coding doesn't have to be about text editors • Live coding doesn't have to be hard 4. Gamepads • Analogue sticks • Directional pad •](https://reader035.fdocuments.us/reader035/viewer/2022071218/6051e2299326cc13e636e3b9/html5/thumbnails/22.jpg)
Al-Jazari influences
• Influences
The Sims
Gullibloon's Army of Darkness
Simon Yuill's Spring Alpha (livecoding game)
• Musical robot livecoding
• Code in 'thought bubbles'
• Indirect musical triggers
• No text
22
![Page 23: Programming with a gamepad · • Live coding doesn't have to be about text editors • Live coding doesn't have to be hard 4. Gamepads • Analogue sticks • Directional pad •](https://reader035.fdocuments.us/reader035/viewer/2022071218/6051e2299326cc13e636e3b9/html5/thumbnails/23.jpg)
Demo
23
![Page 24: Programming with a gamepad · • Live coding doesn't have to be about text editors • Live coding doesn't have to be hard 4. Gamepads • Analogue sticks • Directional pad •](https://reader035.fdocuments.us/reader035/viewer/2022071218/6051e2299326cc13e636e3b9/html5/thumbnails/24.jpg)
Thoughts
• Simple languages
No abstraction, so hard/impossibleto build layers
Fun to play with
More practice will influence thelanguages
• Using a gamepad
More restricted than a keyboard
People don't think you areprogramming
People want to have a go
Detaches you from the laptop
24