Coder Social home page Coder Social logo

anoctonautodyssey's Introduction

An Octonaut Odyssey

Clone

$> git clone [email protected]:IohannRabeson/octogame.git
$> git submodule init
$> git submodule update

Des explications à propos des sous modules: issues 2

Mettre a jour le depot

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

Compilation, installation, et tout ça

Dependances

- SFML 2.3
- [hatedepend](https://github.com/IohannRabeson/hatedepend)
- [cppcheck](https://github.com/danmar/cppcheck/)
- Tout ce qui est requis pour [libocto](https://github.com/IohannRabeson/octolib#requierements)

Compiler le projet

Pour compiler la librairie, les tests et les outils et le jeu:

$> make complete

Les tests

Hatedepend vous previendra de certains probleme liee au inclusions.
Vous pouvez lancer l'analyse statique avec cppcheck en tapant:

$> make static-check

Executer le projet

Sous mac

Pas de soucis pour l'instant, tout devrait se faire normalement.

Sous linux

Il est possible que les fichiers des librairies dynamique SFML soit introuvable.
Dans ce cas, il est necessaire d'utiliser ldconfig apres l'installation en regle de la sfml:

$> ldconfig /usr/local/bin/

Configuration de l'execution via le fichier default.conf

Le fichier default.conf permet le parametrage du programme.
Vous pouvez y modifier differente chose, comme le package de ressource a utiliser, le premier etat a lancer, etc...
La documentation a ce sujet est dans la classe Application.

Travis

Travis effectue differents tests a chaque fois qu'un pull request est ouverte ou mise a jour. Les compilations se feront avec clang, en mode debug et release. Hatedepend n'est pas necessaire a travis, pour ne pas avoir a l'installer, il est desactive.

anoctonautodyssey's People

Contributors

fcvalise avatar jbalestr42 avatar glasset avatar iohannrabeson avatar

Watchers

 avatar  avatar

anoctonautodyssey's Issues

Build fails with MODE=debug

Physics/PhysicsEngine.cpp:82:22: error: no member named 'size' in 'octo::Array2D<PolygonShape *>'
        assert(m_tileShapes.size() < MaxShapes);

Segfault lorsque je quitte l'application

J'ai parfois un segfault au moment ou je quitte l'application. Ce n'est pas gênant pour le moment, mais je n'arrive a identifier d'ou ça peut venir (probablement de quelque part dans mon code car a priori j'ai longtemps été le seul a avoir le problème).
Il faudra un jour que l'on enquête :)

Crash when state game is re-started [branch fc]

Reproduce the bug:
Start the game on state game, change the current state to any other state with system.change_state() then change back the state to game.

LLDB backtrace:

  • thread #1: tid = 0x21867, 0x000000010ffd523f, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x1127d4008)
    frame #0: 0x000000010ffd523f
    -> 0x10ffd523f: movsd (%rdx,%rax), %xmm1
    0x10ffd5244: movsd %xmm1, (%rsi)
    0x10ffd5248: movq %r8, 0x8(%rsi)
    0x10ffd524c: movq 0x3b0(%rcx), %rdx
    (lldb) bt
  • thread #1: tid = 0x21867, 0x000000010ffd523f, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x1127d4008)
    • frame #0: 0x000000010ffd523f
      frame #1: 0x00007fff8e78972d GLEngineglDrawArrays_IMM_Exec + 856 frame #2: 0x000000010029c0ff libsfml-graphics.2.2.0.dylibsf::RenderTarget::draw(sf::Vertex const*, unsigned long, sf::PrimitiveType, sf::RenderStates const&) + 463
      frame #3: 0x0000000100055c70 octodyssey.appTransitionManager::draw(this=0x0000000100974a00, render=0x000000010100c0c8, states=RenderStates at 0x00007fff5fbff510) const + 80 at TransitionManager.cpp:384 frame #4: 0x000000010029bf29 libsfml-graphics.2.2.0.dylibsf::RenderTarget::draw(sf::Drawable const&, sf::RenderStates const&) + 41
      frame #5: 0x0000000100051d9a octodyssey.appMapManager::draw(this=0x0000000100974958, render=0x000000010100c0c8, states=RenderStates at 0x00007fff5fbff5e0) const + 90 at MapManager.cpp:56 frame #6: 0x000000010029bf29 libsfml-graphics.2.2.0.dylibsf::RenderTarget::draw(sf::Drawable const&, sf::RenderStates const&) + 41
      frame #7: 0x000000010003b638 octodyssey.appStateGame::draw(this=0x0000000100974950, render=0x000000010100c0c8) const + 72 at StateGame.cpp:44 frame #8: 0x000000010007f7bd octodyssey.appocto::StateManager::draw(this=0x000000010100c010, render=0x000000010100c0c8) const + 93 at StateManager.cpp:248
      frame #9: 0x0000000100099297 octodyssey.appocto::ApplicationImp::drawAll(this=0x000000010100c000) + 119 at Application.cpp:246 frame #10: 0x00000001000991b7 octodyssey.appocto::ApplicationImp::run(this=0x000000010100c000) + 343 at Application.cpp:270
      frame #11: 0x0000000100095410 octodyssey.appocto::Application::run(stateKey=0x00007fff5fbff978) + 112 at Application.cpp:339 frame #12: 0x00000001000657f5 octodyssey.appmain(argc=1, argv=0x00007fff5fbffb10) + 821 at main.cpp:56
      frame #13: 0x00007fff8dc465c9 libdyld.dylib`start + 1

remove GameObject.hpp

Je sais pas si c'est encore utilisé, il y a aussi peut etre d'autre fichier qui trainent, pense a faire le tri :)

Chutte de fps

Depuis que l'on a migré sur ton dépôt mes fps on grandement baissé. Je ne peux même plus faire de video car ça chute trop :s. Est ce que tu aurais une idée d'ou cela peux venir?

Controls

  • AbstractControler (octolib)
  • Keyboard/Mouse
  • Mapping

README

Explain how to clone and build the project...

Utilisation de define provoque le fail de la compilation

./octolib/includes/Math.hpp:90:25: error: expected ',' or '>' in template-parameter-list
        template <unsigned int N, class T = std::uint64_t>
                               ^
Octo/OctoNoise.hpp:7:12: note: expanded from macro 'N'
# define N 0x1000
           ^
In file included from Map/MapInstance.cpp:4:
In file included from ./octolib/includes/Interpolations.hpp:19:
./octolib/includes/Math.hpp:90:26: error: expected unqualified-id
        template <unsigned int N, class T = std::uint64_t>
                                ^
./octolib/includes/Math.hpp:97:9: error: explicit specialization of non-template struct 'Factorial'
        struct  Factorial<0u, T>
                ^        ~~~~~~~
./octolib/includes/Math.hpp:110:25: error: expected ',' or '>' in template-parameter-list
        template <unsigned int N, class T>
                               ^
Octo/OctoNoise.hpp:7:12: note: expanded from macro 'N'
# define N 0x1000
           ^
In file included from Map/MapInstance.cpp:4:
In file included from ./octolib/includes/Interpolations.hpp:19:
./octolib/includes/Math.hpp:110:26: error: expected unqualified-id
        template <unsigned int N, class T>
                                ^
./octolib/includes/Math.hpp:120:9: error: explicit specialization of non-template struct 'Exponential'
        struct  Exponential<1u, T>
                ^          ~~~~~~~
./octolib/includes/Math.hpp:136:25: error: expected ',' or '>' in template-parameter-list
        template <unsigned int N, class T = std::uint64_t>
                               ^
Octo/OctoNoise.hpp:7:12: note: expanded from macro 'N'
# define N 0x1000
           ^
In file included from Map/MapInstance.cpp:4:
In file included from ./octolib/includes/Interpolations.hpp:19:
./octolib/includes/Math.hpp:136:26: error: expected unqualified-id
        template <unsigned int N, class T = std::uint64_t>
                                ^
./octolib/includes/Math.hpp:143:9: error: explicit specialization of non-template struct 'Power2'
        struct  Power2<0u, T>
                ^     ~~~~~~~
./octolib/includes/Math.hpp:152:25: error: expected ',' or '>' in template-parameter-list
        template <unsigned int N>
                               ^
Octo/OctoNoise.hpp:7:12: note: expanded from macro 'N'
# define N 0x1000
           ^
In file included from Map/MapInstance.cpp:4:
In file included from ./octolib/includes/Interpolations.hpp:19:
./octolib/includes/Math.hpp:163:67: error: template argument for template type parameter must be a type
                                                           Sign::value * pow<(IsPair) ? N : 0u>(value) / Factorial<(IsPair) ? N : 0u, float>::Value);
                                                                                                                   ^~~~~~~~~~~~~~~~~
./octolib/includes/Math.hpp:96:18: note: template parameter is declared here
        template <class T>
                        ^
11 errors generated.

Vous voyez ce qu'il se passe?
N est un parametre template de nombreuse fonction, et une definition de macro s'appelle N...
Quand je vous dis de pas utiliser les macros...

Makefile

Meme avec le makedepend, quand on modifie un .hpp, ça ne recompile pas.

Make a loop with clouds

Il faudrait me rendre accessible depuis le skyManager la fonction qui permet au décors d'être replacés en zero lorsqu'ils ont fait le tour de la map. Dans le skyManager j'ai un std::vectorsf::Vector2f originClouds
Siteplé @jbalestr42 :)

Perlin noise

Retoucher l'algo pour le faire à notre sauce

Remarques sur la pluie

  • Il n'est pas possible pour le moment de mettre des vitesses négatives
  • Lorsque l'on ajoute une vitesse en x le coin en bas a gauche se retrouve vide

RessourcesDefinitions.hpp

Je me demandais pourquoi tu n'inclue pas directement ce fichier dans le ressource manager? A priori on aura toujours besoin des deux en même temps non?

Fixe uninitialized variable in Decor classes

[Decors/Rock.cpp:4]: (warning) Member variable 'Rock::mn_countOctogon' is not initialized in the constructor.
[Decors/Tree.cpp:4]: (warning) Member variable 'Tree::mn_countLeaf' is not initialized in the constructor.

Menu

Retour
Options

  • Graphique
  • Sons
  • Key bindings

Reset la partie
Quitter

Decor Tree tronc

Il faut porlonger le tronc vers le bas, sinon dans certain cas on vois le bas de l'arbre

Fixe unititialized variables in Map classes

[Managers/CollisionManager.cpp:7]: (warning) Member variable 'CollisionManager::m_mapManager' is not initialized in the constructor.
[Managers/TransitionManager.cpp:6]: (warning) Member variable 'TransitionManager::swap' is not initialized in the constructor.
[Map/Map.cpp:5]: (warning) Member variable 'Map::m_biome' is not initialized in the constructor.

Connaitre le Type d'un décor

@IohannRabeson Existe t'il un moyen de savoir a quel décor j'ai a faire lorsque je les parcours a partir d'un DecorManager?
Je songe a creer un DecorManager par type de decors mais ça peut etre dommage de multiplier les draw non?

Crystal shinning/stars

  • La brillance des cristaux est dessinée pour le moment à partir des étoiles, la brillance doit être déplacée directement dans les cristaux.
  • La brillance et les étoiles nécessitent une texture, ce qui n'est pas présent dans ADecors.

Solution: Dessiner les gradients en sf::Triangles, forme octogonale

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.