Skip to content
/ DuelPy Public

A Rock, Paper, Scissors, Lizard, Spock game built with GTK4 and Libadwaita.

License

Notifications You must be signed in to change notification settings

lloura/DuelPy

Repository files navigation

Duel! Icon

Duel! (DuelPy)

Epic hand-game duels built with GTK4 and Libadwaita

Download on Flathub

Main • Paper x Spock

About

This project is a modern GNOME port of the concept presented in ByteSebs's tutorial video, originally built with older technologies. Since that tutorial is now outdated (which demonstrates how fast these technologies can evolve!), I decided to recreate it using current GNOME ecosystem tools.

Instead of the classic Rock-Paper-Scissors, I implemented the Rock-Paper-Scissors-Lizard-Spock variant (popularized by The Big Bang Theory), as a spiritual reimplementation of a project I made early in college.

This is a study project focused on learning GTK4, Libadwaita, and Python integration with GNOME, keeping the code simple and readable.


How to Play

The rules are simple:

  • Rock crushes Scissors and Lizard
  • Paper covers Rock and disproves Spock
  • Scissors cuts Paper and decapitates Lizard
  • Lizard eats Paper and poisons Spock
  • Spock vaporizes Rock and smashes Scissors

Choose your move and see if you can beat the computer!


Technologies

  • Python 3.12+
  • GTK 4
  • Libadwaita 1.8+ (GNOME 49)
  • Blueprint Compiler
  • Meson build system

Installation & Running

Flathub (Recommended)

The easiest way to install Duel! on any Linux distribution is via Flathub:

Click here to install from Flathub

Alternatively, use the terminal:

flatpak install flathub io.github.lloura.DuelPy
flatpak run io.github.lloura.DuelPy

GNOME Builder (Recommended for Development)

  1. Install GNOME Builder
  2. Clone this repository:
   git clone https://github.com/lloura/DuelPy.git
  1. Open the project in GNOME Builder
  2. Click the Run button at the top

Flatpak

Pre-built Flatpak packages are also available in the Releases section.


Screenshots

Click to see more screenshots Lizard x Rock • Paper x Spock Paper x Lizard • Rock x Scissors Paper x Lizard • Rock x Scissors Paper x Lizard • Rock x Scissors

What I Learned

This project was an excellent opportunity to:

  • Experiment with GTK4/Libadwaita principles and design patterns
  • Get hands-on experience with GNOME Builder as an IDE
  • Learn Python-GObject integration and PyGObject bindings
  • Understand the Meson build system and Flatpak packaging
  • Apply GNOME Human Interface Guidelines to create a modern UI

I chose Python because I plan to use it for similar projects in the future, and this served as a solid foundation for understanding the GNOME development ecosystem.


Roadmap

  • Basic game functionality
  • Persistence with GSettings
  • Implementation of a visual 'How to Play' guide for the different variants
  • Implementation of David C. Lovelace's RPS-7 mode
  • Flathub submission (Done! 🎉)
  • Add more game variants (RPS-9, RPS-11...)

Contributions are welcome! Feel free to open issues or submit pull requests.


Credits & References

Game Variants:

Inspiration:


License

This project is licensed under the GNU General Public License v3.0.

About

A Rock, Paper, Scissors, Lizard, Spock game built with GTK4 and Libadwaita.

Resources

License

Stars

Watchers

Forks