EMF Camp: Running the Tildagon Simulator

Published by Bill on

EMF Camp 2024 kicks off later this week. I’ll be there with my eldest son. We don’t yet have our hands on our badges but I spent a little time tinkering in the simulator. It was a bit fiddly to get things up and running but this is my first App.

Screenshot of the Tildagon badge running in the simulator. The badge shows the text, bill.dev

Running the simulator on Apple Silicon

First up, links to the official documentation and the code.

Whilst the documentation recommends Python 3.10, I had to use Python 3.9 to get things working. I’m not familiar with the Python ecosystem and so getting this running took me longer than I’d care to admit. After floundering around for a bit, I got stuck with this error relating to Wasmer.

ImportError: Wasmer is not available on this system

This is what I did to get things working.

brew install python@3.9 pipenv

Clone the project, and also the micropython submodule.

git clone git@github.com:emfcamp/badge-2024-software.git
cd badge-2024-software
git submodule update --init --recursive
pipenv install --python 3.9

You’ll see a warning about Python versions. I ignored this and things seemed to work. “Warning: Your Pipfile requires python_version 3.12, but you are using 3.9.19”.

pipenv shell

Install dependencies.

pip3.9 install wasmer wasmer_compiler_cranelift pygame requests

Run the simulator.

cd sim
python3.9 run.py

Happy coding. If you are at EMF Camp this year. Come and say hi.