git repos / blockattack-game

blame: README.md

normal view · raw

ac424880 sago007 2018-04-02 14:21 1
# blockattack-game [![Build Status](https://travis-ci.org/blockattack/blockattack-game.svg?branch=master)](https://travis-ci.org/blockattack/blockattack-game) [![Codacy Badge](https://api.codacy.com/project/badge/Grade/0dfba60f2ce9484a828bd7c112f50089)](https://www.codacy.com/app/github_43/blockattack-game?utm_source=github.com&utm_medium=referral&utm_content=blockattack/blockattack-game&utm_campaign=Badge_Grade) [![Coverity Status](https://scan.coverity.com/projects/8278/badge.svg)](https://scan.coverity.com/projects/8278) [![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
487845e9 sago007 2018-11-10 10:28 11
## Dependencies
8b93b3e1 sago007 2018-11-10 10:24 12
* A version of g++ with C++11 support. Tested on g++-4.9
8b93b3e1 sago007 2018-11-10 10:24 13
* libSDL2
8b93b3e1 sago007 2018-11-10 10:24 14
* libSDL2_image
8b93b3e1 sago007 2018-11-10 10:24 15
* libSDL2_mixer
8b93b3e1 sago007 2018-11-10 10:24 16
* libSDL2_ttf
8b93b3e1 sago007 2018-11-10 10:24 17
* libphysfs
8b93b3e1 sago007 2018-11-10 10:24 18
* libboost (only needed for compiling)
8b93b3e1 sago007 2018-11-10 10:24 19
* libboost-program-options
8b93b3e1 sago007 2018-11-10 10:24 20
* libutfcpp (only needed for compiling)
3327bb0f Poul Sander 2015-11-08 19:30 21
487845e9 sago007 2018-11-10 10:28 22
## Building
072c01eb sago007 2017-03-01 18:59 23
The only supported build method is using the CMake<br/>
3327bb0f Poul Sander 2015-11-08 19:30 24
To build do:
3327bb0f Poul Sander 2015-11-08 19:30 25
```
daad7b02 sago007 2016-01-19 19:33 26
./packdata.sh
5614ab55 sago007 2016-01-17 13:44 27
cmake .
d9476292 sago007 2016-04-29 17:20 28
# or
d9476292 sago007 2016-04-29 17:20 29
# cmake -DCMAKE_BUILD_TYPE=Debug .
d9476292 sago007 2016-04-29 17:20 30
# or
d9476292 sago007 2016-04-29 17:20 31
# cmake -DCMAKE_BUILD_TYPE=Release .
3327bb0f Poul Sander 2015-11-08 19:30 32
make
3327bb0f Poul Sander 2015-11-08 19:30 33
```
3327bb0f Poul Sander 2015-11-08 19:30 34
The result should be in the "Game"-folder. To run
3327bb0f Poul Sander 2015-11-08 19:30 35
```
ad0118c2 sago007 2016-01-31 14:41 36
./Game/blockattack
3327bb0f Poul Sander 2015-11-08 19:30 37
```
3327bb0f Poul Sander 2015-11-08 19:30 38
daad7b02 sago007 2016-01-19 19:33 39
You can also choose to install it with
daad7b02 sago007 2016-01-19 19:33 40
```
daad7b02 sago007 2016-01-19 19:33 41
sudo make install
daad7b02 sago007 2016-01-19 19:33 42
```
daad7b02 sago007 2016-01-19 19:33 43
5614ab55 sago007 2016-01-17 13:44 44
Windows build uses MXE (mxe.cc) with these installed:
5614ab55 sago007 2016-01-17 13:44 45
```
98273512 sago007 2017-03-18 12:49 46
sdl2 sdl2_image sdl2_mixer sdl2_ttf physfs libtool gettext freetype zlib boost
5614ab55 sago007 2016-01-17 13:44 47
```
5614ab55 sago007 2016-01-17 13:44 48
and libutfcpp copied from "source/misc/travis_help/utf8_v2_3_4/source/" to "/path/to/mxe/usr/lib/gcc/i686-w64-mingw32.static/4.9.3/include"
3327bb0f Poul Sander 2015-11-08 19:30 49
5614ab55 sago007 2016-01-17 13:44 50
Compiled with:
5614ab55 sago007 2016-01-17 13:44 51
```
40fca54e sago007 2016-04-30 11:38 52
i686-w64-mingw32.static-cmake -DCMAKE_BUILD_TYPE=Release . && make
5614ab55 sago007 2016-01-17 13:44 53
```
bddd74d0 Poul Sander 2016-04-12 18:31 54
487845e9 sago007 2018-11-10 10:28 55
## Building using Docker
072c01eb sago007 2017-03-01 18:59 56
072c01eb sago007 2017-03-01 18:59 57
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 58
072c01eb sago007 2017-03-01 18:59 59
On a fresh checkout you can use:
072c01eb sago007 2017-03-01 18:59 60
```
420ab05c Poul Sander 2019-03-27 19:13 61
docker build -f source/misc/docker/Dockerfile.Ubuntu16.04build . -t blockattack_test
072c01eb sago007 2017-03-01 18:59 62
```
072c01eb sago007 2017-03-01 18:59 63
and
072c01eb sago007 2017-03-01 18:59 64
```
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
557a8065 Poul Sander 2016-05-13 17:35 69
This project is a bit unconversionel 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/cmake - Files needed by CMake
8b93b3e1 sago007 2018-11-10 10:24 80
* source/misc/docker - Docker files used by Travis CI  (but can just as well be used for local testing and release builds)
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
* source/misc/travis_help - Helper files for Travis CI
8b93b3e1 sago007 2018-11-10 10:24 85
* windows installer - Information needed to Windows installer. May be moved to source/misc at some point
557a8065 Poul Sander 2016-05-13 17:35 86
487845e9 sago007 2018-11-10 10:28 87
## Reporting bugs
bddd74d0 Poul Sander 2016-04-12 18:31 88
487845e9 sago007 2018-11-10 10:28 89
Please report bugs on github: <https://github.com/blockattack/blockattack-game/issues>
bddd74d0 Poul Sander 2016-04-12 18:31 90
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 91
487845e9 sago007 2018-11-10 10:28 92
## Contributions
072c01eb sago007 2017-03-01 18:59 93
Contributions are welcome. Both the current graphics and the original sharedir support was provided by kind individuals.
072c01eb sago007 2017-03-01 18:59 94
Patches can be attached to a github ticket or sent to poul@poulsander.com directly. You can also create pull requests on Github.
1970-01-01 00:00 95