vincemann / sfml-game-development-book Goto Github PK
View Code? Open in Web Editor NEWThis project forked from sfml/sfml-game-development-book
Full and up-to-date source code of the chapters of the "SFML Game Development" book
License: Other
This project forked from sfml/sfml-game-development-book
Full and up-to-date source code of the chapters of the "SFML Game Development" book
License: Other
##################### SFML Game Development Code Base ##################### This file explains how to build the code accompanying the book SFML Game Development. There are 10 directories that correspond to each of the chapters in the book. For example, 02_Resources contains the code for Chapter 2. The code for all chapters can be built at once. ================ I. Install CMake ================ Install CMake, preferably CMake-GUI (www.cmake.org or the cmake-gui package in Linux). ================ II. Install SFML ================ Download SFML 2 (www.sfml-dev.org). We recommend using a precompiled version of SFML which can be directly downloaded. It is also possible to build SFML yourself, in this case make sure that it is *installed* (make install, or compile the INSTALL project). Refer to the online tutorials for more details. Eventually, you should have a directory with at least the subdirectories "include" and "lib" that contain headers and binaries of the SFML library, for example C:\SFML in Windows or /usr/local in Linux. ===================================== III. Generate the build configuration ===================================== 1. Start cmake-gui. 2. In the field "Where is the source code", enter the path of the directory containing this ReadMe.txt file. Use forward slashes. 3. In the field "Where to build the binaries", enter a different path, where you want the intermediate build files of the book's code to be generated. 4. Click "Configure" and choose your compiler. 5. After, an error message might appear, telling that SFML is not found. This is intended. In order to fix it, enter the path to SFML in the field next to the SFML_ROOT variable. This is the directory mentioned in step II with the "lib" and "include" subdirectories (e.g. C:/SFML or /usr/local). 6. Choose your build configuration by setting CMAKE_BUILD_TYPE to either "Release" or "Debug". We recommend "Release" (it should be the default). 7. In Windows, check the box next to SFML_STATIC_LIBRARIES if you want to link SFML statically. Leave it unchecked if you prefer linking SFML dynamically and using DLL files. 8. Set the CMAKE_INSTALL_PREFIX to the path where you want the executables of the book's code to be installed. Choose a different directory (it can be a subdirectory of this one). 9. Click again "Configure". Now, there should be no more error messages. 10. Click "Generate". ==================== IV. Compile the code ==================== 1. Switch to the build directory (the one you entered in "Where to build the binaries"). 2. Now you should see the files required to compile the code. For g++ or clang, this will be a Makefile. In the terminal, type "make install". If you use MinGW on Windows, you might have to type "mingw32-make install" instead. For Visual Studio, you will see a .sln solution. Open it, choose the correct build configuration ("Release" or "Debug") and build the INSTALL project. For other integrated development environments, it will be similar. Compile the INSTALL project. 3. After compiling, the executables and media files should be output to the directory you specified with CMAKE_INSTALL_PREFIX. ========== V. Results ========== The executables for each chapter are located in the install directory (CMAKE_INSTALL_PREFIX). If you like to inspect the code itself, the current directory comes with 10 subdirectories, each containing the source and header files of the corresponding chapter. Also, the media files can be found for each chapter.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.