class: center, middle # .title[alt.ctrl games w/ Rust] Lisa '[lislis](https://lislis.de)' Passing - [EuroRust](https://eurorust.eu) - October 2023 --- class: middle # $ whoami --- class: middle background-image: url(assets/ed2.gif) background-size: 10% background-position: 75% center # $ whoami lislis --- class: middle background-image: url(assets/bubbles-crop.jpg) background-size: 50% background-position: 95% center # $ whoami lislis Creative technologist --- class: middle background-image: url(assets/kyiv.png) background-size: 50% background-position: 95% center # $ whoami lislis Creative Technologist Around Rust since 2017 --- class: middle background-image: url(assets/rustinarts.png) background-size: 50% background-position: 95% center # $ whoami lislis Creative Technologist Around Rust since 2017 Organized [Rust in Arts](https://www.youtube.com/watch?v=hwaBaoAPOU0&list=PL85XCvVPmGQgF1UzXWnQHKtsPHmw6tEXx)
in November 2021 --- class: middle background-image: url(assets/ctech.png) background-size: 50% background-position: 95% center # $ whoami lislis Creative Technologist Around Rust since 2017 Organized [Rust in Arts](https://www.youtube.com/watch?v=hwaBaoAPOU0&list=PL85XCvVPmGQgF1UzXWnQHKtsPHmw6tEXx)
in November 2021 Started Masters in
Creative Technologies in 2022 --- class: center, middle ## art + technology = <3 --- class: center, middle ## art + technology + playfulness = <333 --- class: center, middle .subtitle[alt.ctrl] -- .subtitle[==] -- .subtitle[alternative controllers] -- .subtitle[for games] --- class: center, middle ## Examples! --- layout: true background-size: contain class: middle, center --- background-image: url(assets/mrfloppy.gif) ## [Mr Floppy
(2016)
](https://twitter.com/Cosmografik/status/780674356385050624) ??? Mr Floppy @ altctrlgamejam 2016 --- background-image: url(assets/hellcouch.gif) ## [Hellcouch
(2019)
](http://carolmertz.com/game/hellcouch/) ??? Hellcouch @ GDC 2019 --- background-image: url(assets/robomama_2.gif) ## [Robo Mama's Cooking Kitchen
(2014)
](https://www.youtube.com/watch?v=ZGI4-BQaaP8&list=PL2e4mYbwSTbaCATulMnQ1pvLvumYQr7YK&index=57) ??? Kristina Durivage and Jerry Belich in 2014 --- layout: false class: middle Possible definitions: -- ## Using uncommon or custom controllers -- or -- ## Using common controllers in a unusual way --- background-size: 85% background-position: center 10% background-image: url(assets/swaj_2.gif) class: bottom Where "common" controllers are more than game pads... [lislis.de/games/swaj](https://lislis.de/games/swaj/)
(WebMidi -> Chrome)
--- class: middle Your first time hearing about alt.ctrl? -- This seems nice but very niche? -- Mostly at game jams, festivals or conferences? --- class: middle A lot of alt.ctrl games don't call themselves games! --- class: bottom background-size: 70% background-position: center 10% background-image: url(assets/oeuf-sphinx.gif) [L'Oeuf-Sphinx
(2020)
](https://mechbird.fr/oeuf-sphinx.html) (Playful) art installations ??? Tatiana Vilela dos Santos & Olivier Drouet --- class: bottom background-size: 70% background-position: center 10% background-image: url(assets/7wheel.gif) ["Symbol Wheels"
(2022)
](https://www.youtube.com/watch?v=fNllI56OXMc) Escape room puzzles ??? --- background-image: url(assets/tina.webp) background-position: center center background-size: 46% class: center, middle -- .invert[ ### What's Rust got to do with it?] -- .invert[ # Everything!] --- ## Rust's ecosystem gives us access to: -- - game engines / cc frameworks -- - hardware / microcontrollers -- - sound / audio -- - lots of protocols -- ## With all of Rust's niceness <3 --- class: center, middle Case study: ## Riding in the park with parrots --- ## What? -- - alt.ctrl game + uni project --- background-image: url(assets/goerli.jpg) background-position: 95% center background-size: 50% ## What? - alt.ctrl game + uni project - Inspired by that guy cycling
with his parrots in
GΓΆrlitzer Park, Berlin -- - Rail shooter/ balancing game
using a real bike handle -- - Mix of 2d and 3d graphics -- - Ultimately tabletop
arcade cabinet --- class: center, middle ## Okay, step by step --- background-image: url(assets/plan1.png) --- background-image: url(assets/plan2.png) --- background-image: url(assets/plan3.png) --- background-image: url(assets/plan4.png) --- background-image: url(assets/plan5.png) --- background-image: url(assets/plan6.png) --- background-image: url(assets/plan7.png) --- background-image: url(assets/plan8.png) --- background-image: url(assets/plan9.png) --- ## How? -- - Main game written with [bevy game engine](https://bevyengine.org/) -- - Bike handle equipped with an [ESP32 microcontroller](https://github.com/esp-rs/esp-rust-board/tree/v1.2) -- - Raspberry Pi to run everything --- ## Bevy -- - Heard a lot about it, wanted to try it -- - *Really* good tutorials and learning resources π€© -- -> Highly recommend [youtube.com/@logicprojects](https://www.youtube.com/@logicprojects) -- - So many community plugins π€© -- - Rapid development π€©, but materials and plugins are quickly out of date π’ --- ## Anecdote 1 -- I want to directly read serial from the esp32 π€ -- -> There is a plugin, bevy_serial π₯³ -- -> bevy_serial is no longer compatible with current bevy version (0.11) π’ -- -> Have game and board communicate over wifi π‘ -- -> Write esp32 webserver, change game logic to poll from url (bevy_reqwest) π» -- -> Wireless controller π€― but how to power it π€ --- background-size: 60% background-position: center center background-image: url(assets/bevy_serial.png) --- ## Anecdote 1 I want to directly read serial from the esp32 π€ -> There is a plugin, bevy_serial π₯³ -> ~~bevy_serial was no longer compatible with current bevy version (0.11) π’~~ -> ~~Have game and board communicate over wifi π‘~~ -> ~~Write esp32 webserver, change game logic to poll from url (bevy_reqwest) π±π»~~ -> ~~Wireless controller π€― but how to power it π€~~ --- ## ESP32 -- - Standard in the Arduino environment -- - Is Rust on ESP32 hobbyist ready? π€· -- - Read [this article](https://www.linkedin.com/pulse/embedded-rust-esp32c3-board-hands-on-quickstart-guide-cyril-marpaud) and wanted to check out [ESP-IDF template](https://github.com/esp-rs/esp-idf-template) and [espflash](https://github.com/esp-rs/espflash) -- - Start with [esp-rs/std-training](https://esp-rs.github.io/std-training/) --- ## Anecdote 2 -- ESP32-C3-DevKit-Rust-1 comes with cool stuff on the board π€© but is kinda pricey π’ -- -> Browsing for a cheap reseller, found really good offer -- -> Board arrives! Setting up the environment π» -- -> Tooling is awesome π€© but I could not get the sensor reading examples to work π’ -- -> Research, trying to find out what's wrong π€ -- -> Accidentally bought the wrong esp32-c3 board π€¦ --- background-size: 40% background-position: center center background-image: url(assets/boards.jpg) --- ## Anecdote 2 -> Use different esp32 and gyroscope/accelerometer and fall back to Arduino setup π«£ -- -> Order correct board, wait for it to arrive, start again -- BUT the espflash workflow is still amazing! --- ## Raspberry Pi -- - Nice to run stuff on for installations in physical spaces -- - Cross-compiling is easy! π€ -- - ... if you don't have external dependencies π --- ## Raspberry Pi / Anecdote 3 - Nice to run stuff on for installations etc - Cross-compiling is easy! π€ - ... if you don't have external dependencies π --- background-size: 40% background-position: center center background-image: url(assets/alice.gif) --- ## Raspberry Pi / Anecdote 3 - Found out about [cross-rs/cross](https://github.com/cross-rs/cross) -- - So close to configuring it correctly π€ͺ --- class: center, middle # π€ --- class: center, middle ## Are we alt.ctrl game yet? -- We are game,
but you have to make the rest work by yourself! --- .resources[ # Resources ## Bevy - [GitHub] [bevy-examples](https://github.com/bevyengine/bevy/tree/main/examples) - [YouTube] [@logicprojects](https://www.youtube.com/@logicprojects) - [YouTube] [Bevy 3d Third Person Tutorial](https://www.youtube.com/watch?v=DtuqZ11RhIc&list=PLp0sjyxOq4ATFgiJ4HL8ok9Yp2h7Hz1Fb) - [YouTube] [Blender to Bevy: components editing & export workflow + tooling !](https://www.youtube.com/watch?v=-lcScjQCA3c) ## ESP32 - [Embedded Rust on ESP32C3 Board, a Hands-on Quickstart Guide](https://www.linkedin.com/pulse/embedded-rust-esp32c3-board-hands-on-quickstart-guide-cyril-marpaud) - [GitHub] [esp-rs/std-training](https://esp-rs.github.io/std-training/) - [GitHub] [esp-rs/esp-idf-template](https://github.com/esp-rs/esp-idf-template) - [GitHub] [ivmarkov/rust-esp32-std-demo](https://github.com/ivmarkov/rust-esp32-std-demo) ## Misc - [Compile Rust for Raspberry Pi ARM](https://medium.com/swlh/compiling-rust-for-raspberry-pi-arm-922b55dbb050) - [Cross compiling Rust apps Raspi Pi](https://capnfabs.net/posts/cross-compiling-rust-apps-raspberry-pi/) - [GitHub] [cross-rs/cross wiki](https://github.com/cross-rs/cross/wiki/Configuration) ] --- class: center, bottom background-size: 60% background-position: center 20% background-image: url(assets/parrots.gif) ## Play it here at the conference! --- class: middle ## Vielen Dank! .no-bullets[ - π§ mail@lislis.de - 𦣠[@lislis@toot.cat](https://toot.cat/@lislis) - π [//lislis.de/talks/eurorust-2023](https://lislis.de/talks/eurorust-2023) - π¦ [//github.com/lislis/ridingintheparkwithparrots](https://github.com/lislis/ridingintheparkwithparrots)]