Coder Social home page Coder Social logo

bollos00 / libremines Goto Github PK

View Code? Open in Web Editor NEW
71.0 1.0 9.0 6.1 MB

A Free/Libre and Open Source Software Qt based Minesweeper game available for GNU/Linux, FreeBSD and Windows systems.

Home Page: https://bollos00.github.io/LibreMines/

License: GNU General Public License v3.0

C++ 94.93% CMake 4.21% C 0.86%
cpp qt5 minesweeper game qt6 qt

libremines's Introduction

Introduction

LibreMines is a Free/Libre and Open Source software Qt based Minesweeper clone available for GNU/Linux, FreeBSD and Windows systems.

The game has dark and light themes, is widely customizable, has options to create customizable fields, allows the user to play with the keyboard, among other things.

The source code is licensed under the GNU General Public License at version 3 (or any later version), this includes all files inside the src directory. The artworks are licensed under the Creative Commons Attribution-Share Alike 4.0 International, this includes all files on the share directory.

Installing from Package Manager

Arch User Repository

LibreMines is available on the Arch User Repository. With yay it can be installed with:

yay -S libremines

FreeBSD

LibreMines is available in FreeBSD ports tree. With pkg it can be installed with:

pkg install libremines

Flatpak

There is a package for LibreMines available on FlatHub. The package can be installed, via command line, with:

flatpak install flathub io.github.Bollos00.LibreMines

Binary installation for Windows

For windows systems, you can just get one of the releases here. And follow those steps:

  • Make sure you have Microsoft Visual C++ Redistributable installed.
  • Download the file libremines_vX.X.X_windows_release.zip of the last version available;
  • Extract it on your preferred location;

The executable libremines.exe will be inside the folder extracted. You can also add a Desktop shortcut or put it on the taskbar.

Installing from the source code

Installation Dependencies

The following dependencies are required for building and running LibreMines:

On Arch Linux and derivatives systems, the dependencies can be installed with pacman:

sudo pacman -S base-devel qt6-base qt6-svg qt6-multimedia cmake

For Ubuntu, you can install the dependencies with the following command:

sudo apt-get install build-essential qt6-base-dev cmake libqt6svg6-dev qt6-multimedia-dev libgl1-mesa-dev

On Fedora, install the dependencies with:

sudo dnf install qt6-qtbase-devel qt6-qtsvg-devel cmake qt6-qtmultimedia-devel git

On FreeBSD systems, install the packages qt6-base, qt6-svg, qt6-multimedia git and cmake.

su -
pkg install qt6-base qt6-svg qt6-multimedia git cmake

For others systems, check the qt online installers or your preferred package manager.

Building

In order to build LibreMines from the source code, follow those steps:

git clone https://github.com/Bollos00/LibreMines.git
cd LibreMines
mkdir build && cd build
cmake -DCMAKE_INSTALL_PREFIX=/usr/local ..
make

You can also get a stable release from here.

Note that the option CMAKE_INSTALL_PREFIX determines the target directory of the installation. If you want to install LibreMines using Qt5 libraries, additionally pass the argument -DUSE_QT6="NO" on the fourth step (the cmake part).

The executable libremines will be generated in the build directory, now it is possible to run it with:

./libremines

Installing on the system (Unix only)

At least, if you want install LibreMines on your system, use the following command:

sudo make install

For uninstall LibreMines, on the build directory, run:

sudo xargs rm < install_manifest.txt

Or manually remove the files listed on install_manifest.txt.

How to play

First Steps

When you initialize the application, you will face this screen:

Here you can start to play one of the predefined game modes -- easy, medium and hard --, or you can customize the field the way that you want to play. Select one of those options and you will be ready to start. (Note the options on the upper left of the screen).

You will start the timer of the new game when you release the first cell, you can play with your mouse or with your keyboard.

Playing with the mouse

  • Left Click: release the cell which the mouse is pointing on;
  • Right Click: flag/unflag the cell which the mouse is pointing on.

Playing with the keyboard

For activate the keyboard controller mode, press one of the following keys: A|S|D|W

  • Escape: Exit keyboard controller mode;

  • A: Move Current Cell Left;

  • S: Move Current Cell Downwards;

  • D: Move Current Cell Right;

  • W: Move Current Cell Upwards;

  • O: Release Current Cell;

  • P: Flag/Unflag Current Cell;

  • Space: Locate current cell on middle of the scroll bar;

  • CTRL + R: Restart the game;

  • CTRL + SHIFT + P: Save minefield as image;

If you do not feel comfortable with those keys, you can edit them going to the main menu, then Options > Preferences.

Tip: hold the CTRL modifier while moving in order to move faster.

Contributing

All kinds of contributions are welcome on this project. You can help:

  • Making artworks (SVG) for minefield themes and new faces reaction;
  • Documenting the source code and making tutorials of the game;
  • Sharing the game in order to attract more users;
  • Adapting the software for other Operational Systems;
  • Packaging the software for other distributions;
  • Increasing the playability and adding new features by making changes on the source code;
  • Reporting new issues or solving existing ones;
  • Adding or improve the translations.

Third party Repositories used in this software

libremines's People

Contributors

bollos00 avatar captaindrewboy avatar chilla55 avatar jefetienne avatar mnhauke avatar neroburner avatar pkubaj avatar sailormiolen avatar secularsteve avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

libremines's Issues

The lack of sound effects...

A few bugs found and feature requests

In my quest finding a free software implementation of minesweeper I've come across this game, LibreMines. Since this project appears quite small I'll post my "problems" in a list format rather than have them one thread at a time.

  1. There's a bug at least on Windows when clicking on a number it acts like I clicked at a mine if the number is adjacent to a mine leading to game loss.
  2. The app window doesn't scale properly resizing the window leading to funny scrollbars in the board.
  3. I'd also like a little bit of a smaller board while playing, currently it's a bit in-your-face. Goes hand in hand with the scaling issue, more customization of the size (I'd like to be able to "zoom out" in-game) of the board itself would be nice! Take inspiration from the Microsoft minesweeper, the classic one, well maybe not that one, that's a little bit TOO small. :P
  4. There's a typo in the readme, in the "Playing with the keyboard" section where it says to restart the game with CTRL + R it should say to restart the game, instead it says to retart the game, otherwise good grammar.
  5. I noticed in the custom games, it's limited to 10x10? I'd like to be able to play 8x8 the standard easy board but with more mines, that would be cool.

That's all for now, time for screenshots!

When clicking a number close to a mine...
Clicking a number

Boom!
You lose!

Scaling problem.
Improper Scaling

FreeBSD dependencies

On FreeBSD there are additional dependencies to those listed:
qt5-buildtools
qt5-qmake

These should be added to the README

A keyboard shortcut to restart a game

It would really be nice to have a keyboard shortcut to restart a game either only after a win/lose or also mid-game. This would make it so you don't have to use the mouse to restart a game when playing in keyboard controller mode

Saving the score after the match is finished

  • Create a new option that indicates when the dialog to save a score should appear after a game is finished. These options should be:
  • Always
  • When a new high score is achieved or when the game is completed
  • When a new high score is achieved
  • When the game is completed
  • Never
  • Create a push button, below the 'save minefield as image' button, that allows the user to save the score after a match is finished. This button should be visible only after the game is ended and until the user saves its score.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.