Git Product home page Git Product logo

sfml-game-development-book's Introduction

SFML logo

SFML — Simple and Fast Multimedia Library

SFML is a simple, fast, cross-platform and object-oriented multimedia API. It provides access to windowing, graphics, audio and network. It is written in C++, and has bindings for various languages such as C, .Net, Ruby, Python.

State of Development

Development is focused on the next major version in the master branch. No more features are planned for the 2.x release series.

  • The master branch contains work in progress for the next major version SFML 3. As such it's considered unstable, but any testing and feedback is highly appreciated.
  • The 2.6.1 tag is the latest official SFML release and will be the last minor release in the 2.x series.

CMake Template

The easiest way to get started with SFML is our CMake-based project template. This template will automatically download and build SFML alongside your own application. Read the README for full instructions on how to use it.

Download

  • You can get the latest official release on SFML's website.
  • You can also get the source code of the current development version from the Git repository.
  • Alternatively, you can get the latest snapshot / artifact builds from the artifacts storage.

Install

Follow the instructions of the tutorials, there is one for each platform/compiler that SFML supports.

Learn

There are several places to learn SFML:

Community

Here are some useful community links:

Contribute

SFML is an open-source project, and it needs your help to go on growing and improving. If you want to get involved and suggest some additional features, file a bug report or submit a patch, please have a look at the contribution guidelines.

Authors

License

The SFML libraries and source code are distributed under the zlib/libpng license. See license.md. External libraries used by SFML are distributed under their own licenses.

In short, SFML is free for any use (commercial or personal, proprietary or open-source). You can use SFML in your project without any restriction. You can even omit to mention that you use SFML -- although it would be appreciated.

External libraries used by SFML

sfml-game-development-book's People

Contributors

bromeon avatar groogy avatar laurentgomila 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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sfml-game-development-book's Issues

CMake compatibility issues

get this warning when configuring cmake:

CMake Deprecation Warning at CMakeLists.txt:2 (cmake_minimum_required):
Compatibility with CMake < 3.5 will be removed from a future version of
CMake.

Editing CMakeLists.txt:2 to "cmake_minimum_required(VERSION 2.8...3.5)" prevents the error message,
but the compatibility issues are not solves.

At the SFML-Game-Development-Book-master\CMake directory there is a FindSFML.cmake file,
which is said to no longer be supported anymore, but rather SFMLConfig.cmake is now used instead.

Brightness.frag fails to load visual studio 2017

sample code compiled with visual studio 2017 fails to load shader, to fix change Brightness.frag line 12
from:
sourceFragment *= clamp(luminance - Threshold, 0.0, 1.0) * Factor;
to:
sourceFragment *= clamp(luminance - Threshold, 0.f, 1.f) * Factor;

SFML High DPI

Not an issue, just a question.
SFML don't support high dpi and the only solution right now is to set NSHighResolutionCapable to false, that way we get low resolution but the actual window size.
I'm not really interested in making my own games, but I'm very interested in reading this book!
Is there a way that you can edit CMakeList to support creating an app bundle for OSX?

Right now I'm on a MacBook Pro and it is imposible to work through the book, sadly I don't have the knowledge to edit the CMake files myself and share it with other people.

Thanks!

No virtual destructor in SceneNode

No SceneNode class contains a virtual destructor declaration, while it is a base class with many other virtual functions. I suppose it is a bug, causing memory leaks.

Command.hpp - derivedAction wont compile in VS2013 Express

template <typename GameObject, typename Function>
Command::Action derivedAction(Function fn)
{
    return [=] (SceneNode& node, sf::Time dt)
    {
        // Check if cast is safe
        assert(dynamic_cast<GameObject*>(&node) != nullptr);

        // Downcast node and invoke function on it
        fn(static_cast<GameObject&>(node), dt);
    };
}

This function produces a compiler error C3848 in VS2013 Express on Windows 7.
It's line 33

fn(static_cast<GameObject&>(node), dt);

a non-const function is invoked by const function

CMake script and SFML_ROOT

The CMake script provides the SFML_ROOT variable to provide the location of SFML when installed outside of the system's default locations. However, find_path() is implemented to look in system default location first, and looks in the custom paths provided in PATHS only if no match is found in the system default. This means that if the system contains a version of SFML but the user has a (supposedly newer) version manually installed somewhere else that they want to use instead, the (older) system version will always be picked first.

To fix this, I would suggest specifying SFML_ROOT in HINTS instead of PATHS. Indeed, contrary to PATHS, HINTS are looked up before the system locations.

# find the SFML include directory
find_path(SFML_INCLUDE_DIR SFML/Config.hpp
          PATH_SUFFIXES include
          HINTS ${SFML_ROOT} $ENV{SFML_ROOT}
          PATHS ${FIND_SFML_PATHS})

The same should then be done for the find_library() calls, and SFML_ROOT should be removed from FIND_SFML_PATHS.

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.