Hi everyone,

Last year I was wondering how to build proper desktop applications with Pharo. The best way I found was to start the image headless and open one or multiple windows using the SDL2 binding. Then, it is possible to process SDL2 events in Pharo and to draw using Cairo on the window surfaces.

To do that, I built a small real-time game where each player plays a wizard who can move in 4 direction and cast spells at other players. If a spell (fire-ball like) reaches another player, its character dies and the last wizard alive is the winner.

Here is a video showing the game, and especially how it is started from a script:

I’ve never shared that project as I thought I some point I would look into adding music in the game, but it’s been a year and it seems it’s not going to happen.

Once can try to toy around with the game from here: https://github.com/clementbera/wizard-battle-arena

I hope you enjoyed the contents of this post. Thanks for reading my blog.