Giter Club home page Giter Club logo

spaceshipbp's Introduction

Asteroids game

A classic video game is developing for training in creating and maintaining large codebase

Currently implemented features

General

  • Used SFML, RapidJSON, GTest, better-enums.
  • Cross-compilation on CMake 3.27: MSVS2019/MinGW-w64.

MVC

  • Controller, Core
    • ListenersEmitters - observer pattern interpretation in Qt/UE manner.
    • LowLevelApplication - it handles I/O from windows level, organizes a game loop.
    • Application - it a singleton contains all globally needed semi-related to ECS resources (configs, textures, etc).
  • Model, Simulation, ECS
    • Each of Component holds a map of <EntityPtr, UserComponent>.
    • Each of Entity can claim/reject a Component and get the value of it.
    • Each of System contained in and updated by a Level class.
      • Each of UserLevel provided by a LevelProvider that delegates level creating to a LevelCreatorsStorage.
      • LevelCreatorsStorage holds unique lazy creator-function taken from static-initialization stage for each UserLevel.
  • View, Menus and Layers
    • Still as a stub.

Utility

  • Structure-intrusive automatic serialization solution like a code generation in UE.
    • Used a lot of C++20 concepts for replacing SFINAE.
    • Main classes:
      • SerializableBase - is common staff for serialization via RapidJSON.
      • SerializableStruct - is container and base class for user structure contains several SerializableVariable and/or SerializableStructs. It iterates recursively on self members.
      • SerializableVariable - it contains an object of RapidJson-supported literal type or third-party type which defined fromJson/toJson in GameJsonConversions/StdJsonConversions structures.
    • For user-usage defined several macro e.g. SERI_V(...), SERI_S(...) & SERI_C(...), etc.
    • TODO: Implement a serializable representation of std::vector, std::array/c-array.
  • FrameByFrame - is an encapsulation of a sprite-sheet png-file
    • For each png-file exists a ConfigTexture object describes name, frame rate, frame size, origin, orientation, etc.
    • TextureProvider - it used for create FrameByFrame object. When application starts, it loads all textures that enumerated in a ConfigTextures object via visitor pattern implemented in a SerializableStruct class via iterating on internal structure-members array.

SAST Tools

PVS-Studio - static analyzer for C, C++, C#, and Java code.

spaceshipbp's People

Contributors

aeomanate avatar

Stargazers

 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.