Coder Social home page Coder Social logo

ezhangle / sac Goto Github PK

View Code? Open in Web Editor NEW

This project forked from soupeaucaillou/sac

0.0 1.0 0.0 8.13 MB

Soupe au Caillou game engine

Home Page: http://soupeaucaillou.com/

License: Other

C++ 19.09% Java 2.17% C 73.54% CMake 4.01% GLSL 0.02% Shell 1.06% Python 0.12%

sac's Introduction

sac

sac is Soupe au Caillou's 2D C++ game engine.

Disclaimer

This engine has been done for experimentation and learning purpose. It's not suitable for production and contains lots of ugly hacks - but with limited free time available we chose to work on what was fun (adding features, publishing games). If you can't stand the varing coding-style or other horrors you might find, send a PR to fix it :)

Features

  • Entity/System design. Game objects do not have to inherit from a base class like Node or GameObject but are instead a simple identifier (32 bit integer). We then use composition to add/remove features to individual objects. See (0) and (1) for more details on the concept.

  • Multithreaded OpenGL renderer. Or more precisley: game logic updates happen on 1 thread, and rendering using OpenGL is done in another thread. The 2 threads only share 1 data structure: a rendering commands queue. The queue itself is built by transforming all renderable entities in render commands. In a second step this queue is sorted using a 64 bits key containing rendering states (which texture atlas, blending enabled or not, etc). See (2) for a more in-depth article

  • Debug UI using (imgui). Allow inspection and manipulation of all entities/components as well as enabling debug info on various systems.

  • Rewind: at any time you can pause the game and rewind (or move backward/forward frame by frame). This is really handy when debugging. You can also see graphic batches.

  • The engine is multiplatform (Android, Linux, Mac, Windows, Web) but uses a single build system: cmake

  • Music and Sound playing is supported as well. While Sound is really simple, Music can do some nice things: multi-tracks, looping at specific time, blending, etc

  • Entities can be defined in resources files, in a pseudo-ini format.

  • Assets hot reload (only on desktop), allows to see modifications to assets while running the game

  • Logging: the engine uses macros for logging - LOGI(), LOGE_IF(), LOGW_EVERY_N() etc. They can be easily disabled in release build

  • Multitouch support

  • Physics: we built our own physics engine - it's obviously not as good as Box2D and the like, but it can handle simple things well. Similarly we have a few Collision routines (and raycasting support).

  • Minimal amount of c++ costly construction (std::string, std::map, etc). Where performance matters we replaced them by hashes or vector kind of storage.

Games using sac

Heriswap Recursive Runner

  • Heriswap is an Android match-3 game (Google Play or F-droid or direct link) which wants to be zen and smooth. Sources are available here.

  • Recursive Runner is an Android runner game (Google Play or F-droid soon or direct link) where your main obstacle is yourself! Sources are available here.

  • Assault serie is a set of tactical turn-based wargames during the WWII. A demo Headquarters (Google Play) is available, first episode Normandy (Google Play) and also second episode Bastogne (Google Play) are available on the market.

Documentation

See (wiki)

sac's People

Contributors

peppsac avatar bagage avatar

Watchers

 avatar

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.