Coder Social home page Coder Social logo

octolib's Introduction

octolib Build Status

Octodyssey's core library repository.

How to report problems?

Please do it using this issue tracker.

Organisation

The source files of the library are located in includes/ and src/ directories.
This repository contains an units test program located in tests/' directory and somes graphics interactives test programs located in interactive_tests/ folder.
Somes modules provides tools applications which are located in tools/ directory.

Sources of theses interactives application are a good entry point to discover the library, and they are used as examples by generated documentation.

Tools can be found in tools/<tool_name>.

  • Packager: tools/packager
  • Package reader: tools/package_reader
  • Editors: tools/editors

Documentation files are located in doc/

How to build?

Requierements

  • C++ 11 compiler (clang 6, g++ 4.8 or higher)
  • Doxygen for documentation (with Dot if you wants cutes graphs)
  • GNU make
  • SFML 2.2 or higher
  • Qt 5 framework
  • Boost test library

Building the library

Produces the library libocto.a into the root directory:

$> git clone [email protected]:IohannRabeson/octolib.git
$> cd octolib
$> make complete

Generate the documentation:

$> make doc

Builds are made in builds/ folder.

Updating the library

$> git pull origin master
$> git submodule update
$> make complete

Makefile

Rules

  • make complete: rebuilds the library then build tools and unit tests
  • make doc: generate documentation
  • make open_doc: open documentation in your web browser (OSX only)
  • make run_tests: builds unit tests
  • make tests: builds unit tests
  • make application_tests: builds interactives tests
  • make tools: builds tools

Debug/Release switch

By default the Makefile builds in release mode.
You can switch this mode to debug using MODE variable.
Exemple to run make re in debug mode:

make re MODE=debug

Documentation

Modules

Octolib is separable into several modules:

Core module

Provides commons stuff.

State management module

Provides services to manage the differents screens required by a game.

Package module

Provides services to pack multiple ressources into an unique file called package. This module provides also a way to read datas from a package file.

Resource module

Manage all the games ressources such textures, fonts, sound. Resource module use read services of packages module.

Animation system

Provides services to animate objects properties.

Graphics

Provides services to render stuff

Audio engine

Provides classes to play music composed in real-time.

Gui system

Provides basic stuffs to create simple user interface.

octolib's People

Contributors

iohannrabeson avatar glasset avatar fcvalise avatar jbalestr42 avatar

Watchers

 avatar  avatar  avatar  avatar

octolib's Issues

Camera

Doit gerer la vue de jeu, et surtout les evenement de resize!
La console et les transitions et les menu pourront aussi s'appuyer sur la camera pour se positionner sur l'ecran.

Defines in header generated is always the same

//
//  File generated at Sat Jun  6 06:43:18 2015
//
#if !defined OCTO_PACKAGE_RESOURCE_DEFINITION_HPP // <------ THIS MACRO IS THE SAME FOR ALL HEADER GENERATED
#define OCTO_PACKAGE_RESOURCE_DEFINITION_HPP
#include <cstdint>
...

PackageReader/Header

yop, j'ai rajouter octogame en submodule (normalement c'est ok)
j'ai fait un petit test mais a la compil il me sort:
et ca pour tout les uint8/64_t

In file included from ../tileMapEditor/package.cpp:3:
In file included from ../tileMapEditor/octogame/octolib/includes/PackageReader.hpp:15:
../tileMapEditor/octogame/octolib/includes/PackageHeader.hpp:42:26: error: no member named 'uint8_t' in namespace 'std'; did you mean simply 'uint8_t'?
                enum class EntryType : std::uint8_t;
                                       ^~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk/usr/include/_types/_uint8_t.h:31:23: note: 'uint8_t' declared here
typedef unsigned char uint8_t;

Math

Je commence à faire la lib math et j'ai une question, pour la plupart des fonctions j'ai besoin des vector de la SFML, tu vois aucun inconvenient au fait que j'inclue des choses en rapport avec SFML ? ou tu préfère que la lib math soit indépendante ?

Audio engine

The audio engine should be able to compose the game music track by track, in real time.
I thinks this can be done with filling a sound buffer continuously (producer/consumer pattern?).

Possible implementation:
A separated thread produce audio data from different sources and each values is pushed to a concurrent FIFO. In the same time audio engine can pop the concurrent FIFO to retrieve audio data to play it.
I hopes an implementation of FIFO stack with std::atomic is possible..

fps counter average

La moyenne prend en compte toutes les valeur enregistrée, il faudrait qu'elle prenne seulement les dernieres.

Outil frame per frame

Est ce que ça serait possible (probablement) et rapide (peut etre moins) de faire une option pour choisir d'avancer l'application frame par frame ?

Vertical sync failed

Lorseque je lance l'appli j'ai ce message d'erreur:
Setting vertical sync failed
Setting vertical sync failed

Animation system

Provides services to animate any property.
A property can be:

  • a free function:
    void    setCaptainAge(unsigned int age);
  • a member function:
    class Captain
    {
        void setAge(unsigned int age);
    };
  • a functor:
    struct MakeYoungCaptain
    {
        MakeYoungCaptain(Captain& captain) : m_captain(captain){}

        void    operator()()
        {
            m_captain.setAge(20);
        }
        Captain&  m_captain;
    };

PostEffect

Pouvoir appliquer un ou plusieurs shader sur un objet unique ou sur tout l'ecran.

Basic GUI system

  • relative position:
    Manage all position and size values relatively to the view.
    This is an elegant way to display user interface well sized with any screen resolution.
    An example of implementation is the CEGUI library that provides classes to manipulate the positions and relative sizes.
  • classes to manage a main menu and some in-game menus (such pause, options, ...)

Array2D

On fais des tests de perf un peu, et je me demandais si ça serait pas intéressant de mettre les fonction de Array2D (et des autres) en inline ? on pourrait gagner des perfs en changeant ça ?

Bug compilation palette

Après une petite mise à niveau de ma branche dev, et un git submodule update, j'ai cette erreur :

src/Palette.cpp: In constructor ‘octo::Palette::Palette(std::initializer_listsf::Color)’:
src/Palette.cpp:30:11: error: no matching function for call to ‘octo::Palette::Palette()’
Palette()
^
src/Palette.cpp:30:11: note: candidate is:
In file included from src/Palette.cpp:13:0:
./includes/Palette.hpp:34:8: note: octo::Palette::Palette(octo::Palette&&)
class Palette : public IColorProvider
^
./includes/Palette.hpp:34:8: note: candidate expects 1 argument, 0 provided
make[1]: *** [builds/Palette.o] Error 1
make[1]: Leaving directory `/home/bany/dev/octogame/octolib'
make: *** [complete] Error 2

Resource management system

Provide a way to load all ressources.
Ressources will be stored as simples files or loaded from an unique package file.

Compressed package

Allow package compiler to compress packaged file and package reader to
uncompress it.

This feature require reading file before making header because the bytes count of datas packaged
will be change after compression.

Add shader management

Est-il envisageable, quand tu auras le temps de mettre en place un système pour gérer les shader ? (ce n'est pas urgent du tout)

double free corruption

J'ai un double free, je suis pas encore certain de l'origine, je le met içi pour le moment, ça te parlera peut être, mais c'est possible que ça vienne de chez moi.
Le message d'erreur pique les yeaux
http://pastebin.com/1BBq3HaW

codecvt not found

error message:
src/StringUtils.cpp:15:10: fatal error: 'codecvt' file not found

include

     ^

1 error generated.
make: *** [builds/StringUtils.o] Erreur 1

clang version:
Ubuntu clang version 3.4-1ubuntu3 (tags/RELEASE_34/final) (based on LLVM 3.4)
Target: x86_64-pc-linux-gnu
Thread model: posix

Assertion au lancement du jeu

Elle s'est reproduite:

exception: basic_string
Assertion failed: (s_instance != nullptr), function destroy, file src/Application.cpp, line 56.
[2] 975 abort ./octodyssey.app

Add framerate limits control

Serait-il possible d'ajouter dans les options la limite de framerate ? j'ai besoin de diminuer le mien et activer la synchro vertical ne change rien (probablement un driver mal installé)

Aarray2D clear

Tu pourrais ajouter une method clear dans array2D qui delete tout ? comme dans els autre conteneur en fait (c'est vraiment pas important, fais le si tu as le temps)

Packager produce invalid constant name

Packager produce invalid constant name if you put in it some file with a name beginning by a number.
C++ does not allows constant name beginning by a number, this will be fixed.

  • solution 1:
    remove the first numbers
  • solution 2:
    add a prefix to force name to begin by a letter (as "RES_" or something like that)
  • solution 3:
    dont process the file and show an error

FPS counter

Je sais pas si je dois le mettre içi, mais ça serais cool un fps counter histoire d'évaluer ce que je fais au fur et à mesure.

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.