Skip to content

mazurki/konstruisto

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple city-builder using OpenGL. For Windows and Linux. See http://konstruisto.com/ for more.

Building

Just go with make rebuild run. To build release configuration: make rebuild run CONFIG=RELEASE. make help shows possible options. For development, also build tests (see below).

Deps for Windows

  1. You will need make, clang, clang++, clang-format in PATH.
  2. Install GLEW in ext/glew-2.0.0
  3. Install GLFW in ext/glew-3.2.1
  4. Extract glm library to ext/glm
  5. Put stb_image.h to ext/stb/stb/stb_image.h
  6. Build and install nanovg (see below)
  7. You will need windres in PATH from mingw-w64

Deps for Linux

  1. Install clang-3.9 lldb-3.9. Export clang, clang++, clang-format to PATH.
  2. Install libglew-dev (2.0.0): https://launchpad.net/ubuntu/+source/glew
  3. Install libglfw3-dev (3.2.1): https://launchpad.net/ubuntu/+source/glfw3
  4. Download glm and extract to ext/glm
    wget https://github.com/g-truc/glm/releases/download/0.9.8.4/glm-0.9.8.4.zip && unzip glm-0.9.8.4.zip -d ext/ && rm glm-0.9.8.4.zip
    
  5. Download stb_image.h to ext/stb/stb/stb_image.h
    mkdir -p ext/stb/stb/ && wget https://raw.githubusercontent.com/nothings/stb/master/stb_image.h -P ext/stb/stb/
    
  6. Build and install nanovg
    git clone [email protected]:memononen/nanovg.git ext/nanovg && (cd ext/nanovg && premake4 --cc=gcc gmake && mv build/ build-linux/ && cd build-linux/ && make config=release64 nanovg)
    

Building nanovg

You will need premake4 (download).

  1. Extract repo into ext/nanovg.

  2. Build x64 release:

    cd ext/nanovg
    premake --cc=gcc gmake
    mv build build-[windows|linux]
    cd build-[windows|linux]
    make config=release64 nanovg
    

Building Google Test

wget https://github.com/google/googletest/archive/release-1.8.0.zip --no-check-certificate && unzip release-1.8.0 -d ext/ && rm release-1.8.0
mkdir -p ext/googletest-release-1.8.0/googletest/lib/ && cd ext/googletest-release-1.8.0/googletest/lib/
clang++ -isystem ../include -I../ -pthread -c "../src/gtest-all.cc"
ar -rv libgtest.a gtest-all.o
cd -

Author and Open Source license

Copyright © 2017 Krzysztof Antoniak

Contents of this repository is licensed under GNU General Public License, version 3.0 (GPL-3.0) with additional term according to the section 7(c) of the license: should you make a derivative of this repository, please do not use the name "Konstruisto", Konstruisto logo or use similar naming for your game what could misguide users. See LICENSE.txt for details.

Used libraries

  • GLFW 3.2.1 under the zlib/libpng license
  • GLEW 2.0.0 under the Modified BSD License, the Mesa 3-D License (MIT) and the Khronos License (MIT)
  • GLM 0.9.8.4 under the MIT License
  • NanoVG under the zlib/libpng license
  • stb_image, a public license image loading library

About

A city-builder game.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 93.6%
  • Makefile 4.3%
  • JavaScript 1.1%
  • GLSL 1.0%