Hi, Yet another continuation of my graphics experiments with tkinter. In the previous project I've been using tkinter bitmaps to simulate a commodore-64 screen where I exploited the possibility to change the foreground and background color of the bitmap on the fly. This conveniently matches the way the commodore 64 draws its (character-mode) graphics.
This time I switched to a screen filled with hundreds of tkinter's PhotoImage objects, that can display full color images. However continuing in the spirit of the 8 bit era, instead of creating something with high-res full color graphics, I created a Boulder Dash clone using retro graphics. It's a fully functional game. You can get it here: https://github.com/irmen/bouldercaves (if you just want to play it and aren't interested in the code, get the .pyz Python zip app from the releases section) The game contains the 20 levels of the original 1980's Boulder Dash, and also plays music and soundfx. By default it uses a slightly more colorful sprite set than the original, but you can tell it to switch to the limited Commodore-64 color palette. You need Python 3.5+ and pillow and sounddevice/pyaudio to play it. If you disable sound, only pillow is enough. It runs very well at 30hz refresh rate on my Linux box, but seem to have some performance issues on Windows and Mac OS. Your mileage may vary, and you can tweak some parameters on the command line to eventually make it run smoothly. It was a joy to learn about the inner workings of one of my favorite games when I was a kid, and how to translate that into modern software. I haven't been able to finish the game so far! I guess I have to learn again how to actually play this after 30 years. There's just two things missing I think: - high score table - being able to play multiple sounds simultaneously, as the amoeba and magic wall sounds are lacking at the moment. (And the sprite set I used contains a lot more objects and creatures than the original game so it begs for adding extended game logic and levels with new mechanics... who knows...) This project was heavily inspired by: http://codeincomplete.com/posts/javascript-boulderdash/ and http://www.boulder-dash.nl/ Have fun :-) Irmen -- https://mail.python.org/mailman/listinfo/python-list