git repos / blockattack-game

blame: README.md

normal view · raw

343e102f Poul Sander 2021-09-10 16:00 1
# blockattack-game ![Build status](https://github.com/blockattack/blockattack-game/actions/workflows/main.yml/badge.svg) [![Codacy Badge](https://app.codacy.com/project/badge/Grade/044d09ab34be4a1fa93e31d9585adacf)](https://www.codacy.com/gh/blockattack/blockattack-game/dashboard?utm_source=github.com&utm_medium=referral&utm_content=blockattack/blockattack-game&utm_campaign=Badge_Grade) [![license](https://img.shields.io/github/license/blockattack/blockattack-game.svg)]()
a23ffbc1 sago007 2016-03-06 11:49 2
Block Attack - Rise of the Blocks - the game<br/>
c8b43ea3 sago007 2016-02-02 18:20 3
A Tetris Attack Clone under the GPL.
3327bb0f Poul Sander 2015-11-08 19:30 4
487845e9 sago007 2018-11-10 10:28 5
Homepage: <https://blockattack.net><br/>
487845e9 sago007 2018-11-10 10:28 6
Source: <https://github.com/blockattack/blockattack-game>
0540c530 Poul Sander 2016-01-19 20:48 7
c0e47392 Poul Sander 2018-12-23 16:39 8
## Screen shot
ddf1da0e Poul Sander 2019-03-11 18:10 9
![Block Attack - Rise of the Blocks](https://blockattack.github.io/images/screenshots/blockattack-2.3.0-3.png "Screen shot")
0540c530 Poul Sander 2016-01-19 20:48 10
de504f2e Poul Sander 2024-05-05 20:48 11
## Supported OS
de504f2e Poul Sander 2024-05-05 20:48 12
de504f2e Poul Sander 2024-05-05 20:48 13
### Linux
de504f2e Poul Sander 2024-05-05 20:48 14
Recent Linux version. Target is all current Ubuntu Desktop LTS versions (up to 5 years).
de504f2e Poul Sander 2024-05-05 20:48 15
de504f2e Poul Sander 2024-05-05 20:48 16
### Windoes
de504f2e Poul Sander 2024-05-05 20:48 17
Target is all official supported versions of windows for x86-64 that allows manually installed software. Currently Windows 10+.
de504f2e Poul Sander 2024-05-05 20:48 18
487845e9 sago007 2018-11-10 10:28 19
## Dependencies
66d34b8a Poul Sander 2025-09-21 13:07 20
* A version of g++ with C++17 support. Tested on g++-11
8b93b3e1 sago007 2018-11-10 10:24 21
* libSDL2
8b93b3e1 sago007 2018-11-10 10:24 22
* libSDL2_image
8b93b3e1 sago007 2018-11-10 10:24 23
* libSDL2_mixer
8b93b3e1 sago007 2018-11-10 10:24 24
* libSDL2_ttf
8b93b3e1 sago007 2018-11-10 10:24 25
* libphysfs
16476649 Poul Sander 2022-01-09 10:29 26
* libfmt
8b93b3e1 sago007 2018-11-10 10:24 27
* libboost (only needed for compiling)
8b93b3e1 sago007 2018-11-10 10:24 28
* libboost-program-options
3327bb0f Poul Sander 2015-11-08 19:30 29
487845e9 sago007 2018-11-10 10:28 30
## Building
072c01eb sago007 2017-03-01 18:59 31
The only supported build method is using the CMake<br/>
3327bb0f Poul Sander 2015-11-08 19:30 32
To build do:
50644cb7 Poul Sander 2022-01-18 19:14 33
```bash
daad7b02 sago007 2016-01-19 19:33 34
./packdata.sh
5614ab55 sago007 2016-01-17 13:44 35
cmake .
d9476292 sago007 2016-04-29 17:20 36
# or
d9476292 sago007 2016-04-29 17:20 37
# cmake -DCMAKE_BUILD_TYPE=Debug .
d9476292 sago007 2016-04-29 17:20 38
# or
d9476292 sago007 2016-04-29 17:20 39
# cmake -DCMAKE_BUILD_TYPE=Release .
3327bb0f Poul Sander 2015-11-08 19:30 40
make
3327bb0f Poul Sander 2015-11-08 19:30 41
```
3327bb0f Poul Sander 2015-11-08 19:30 42
The result should be in the "Game"-folder. To run
50644cb7 Poul Sander 2022-01-18 19:14 43
```bash
ad0118c2 sago007 2016-01-31 14:41 44
./Game/blockattack
3327bb0f Poul Sander 2015-11-08 19:30 45
```
3327bb0f Poul Sander 2015-11-08 19:30 46
daad7b02 sago007 2016-01-19 19:33 47
You can also choose to install it with
50644cb7 Poul Sander 2022-01-18 19:14 48
```bash
daad7b02 sago007 2016-01-19 19:33 49
sudo make install
daad7b02 sago007 2016-01-19 19:33 50
```
daad7b02 sago007 2016-01-19 19:33 51
16476649 Poul Sander 2022-01-09 10:29 52
Windows build uses MXE (mxe.cc) and Docker. See "Building with Docker".
3327bb0f Poul Sander 2015-11-08 19:30 53
487845e9 sago007 2018-11-10 10:28 54
## Building using Docker
072c01eb sago007 2017-03-01 18:59 55
As getting a C++ project with many dependencies to compile can be a daunting task then I have provided a couple of Docker images that can perform a build. Both for Windows and Linux.
072c01eb sago007 2017-03-01 18:59 56
e18a5059 Poul Sander 2021-06-18 19:38 57
The project should at all time be able to compile on the oldest and latest supported version of Ubuntu. This is tested with Docker.
e18a5059 Poul Sander 2021-06-18 19:38 58
072c01eb sago007 2017-03-01 18:59 59
On a fresh checkout you can use:
50644cb7 Poul Sander 2022-01-18 19:14 60
```bash
e18a5059 Poul Sander 2021-06-18 19:38 61
docker build -f source/misc/docker/Dockerfile.Ubuntu18.04build . -t blockattack_test
072c01eb sago007 2017-03-01 18:59 62
```
072c01eb sago007 2017-03-01 18:59 63
and
50644cb7 Poul Sander 2022-01-18 19:14 64
```bash
072c01eb sago007 2017-03-01 18:59 65
docker build -f source/misc/docker/Dockerfile.WindoesBuild . -t blockattack_test
072c01eb sago007 2017-03-01 18:59 66
```
072c01eb sago007 2017-03-01 18:59 67
487845e9 sago007 2018-11-10 10:28 68
## Source Structure
e18a5059 Poul Sander 2021-06-18 19:38 69
This project is a bit unconventional because I didn't know any better at the time.
557a8065 Poul Sander 2016-05-13 17:35 70
8b93b3e1 sago007 2018-11-10 10:24 71
* Game - The output is placed here
8b93b3e1 sago007 2018-11-10 10:24 72
* man - The manual file and the script to generate it. May be moved to source/misc at some point
8b93b3e1 sago007 2018-11-10 10:24 73
* source/code/ - The source code
8b93b3e1 sago007 2018-11-10 10:24 74
* source/code/Libs - External libs that are compiled into the project because they are either header only (Cereal) or not designed for use as a shared library.
8b93b3e1 sago007 2018-11-10 10:24 75
* source/code/sago - Source code. Not designed to be specific to Block Attack - Rise of the Blocks
8b93b3e1 sago007 2018-11-10 10:24 76
* source/assets - Source for the assets if relevant. For instance svg source for the graphics.
8b93b3e1 sago007 2018-11-10 10:24 77
* source/misc - Misc stuff. Code related tool that are used for development but not part of the final product.
8b93b3e1 sago007 2018-11-10 10:24 78
* source/misc/astyle - Helper script that enforces code style using the "astyle"-program
8b93b3e1 sago007 2018-11-10 10:24 79
* source/misc/docker - Docker files used by Travis CI  (but can just as well be used for local testing and release builds)
364e133d Poul Sander 2022-01-18 19:46 80
* source/misc/embedded_libs - Contains dependencies not present on all supported systems
8b93b3e1 sago007 2018-11-10 10:24 81
* source/misc/icons - Icons for the installer
8b93b3e1 sago007 2018-11-10 10:24 82
* source/misc/screenshots - Screen shots like the one in this README file.
8b93b3e1 sago007 2018-11-10 10:24 83
* source/misc/translation - Translations and related tools and scripts
8b93b3e1 sago007 2018-11-10 10:24 84
* windows installer - Information needed to Windows installer. May be moved to source/misc at some point
557a8065 Poul Sander 2016-05-13 17:35 85
487845e9 sago007 2018-11-10 10:28 86
## Reporting bugs
487845e9 sago007 2018-11-10 10:28 87
Please report bugs on github: <https://github.com/blockattack/blockattack-game/issues>
bddd74d0 Poul Sander 2016-04-12 18:31 88
If possible: Check if the bug is already fixed in master. But if you don't know how to check it then just report it.
bddd74d0 Poul Sander 2016-04-12 18:31 89
487845e9 sago007 2018-11-10 10:28 90
## Contributions
bbf54672 Poul Sander 2022-01-10 18:07 91
Contributions are welcome. See CONTRIBUTING.md for details.
1970-01-01 00:00 92