GithubHelp home page GithubHelp logo

2d-game's Introduction

2D Game with C++ and Raylib and ENTT

This project is being used to learn C++ features in combination with the Raylib game programming library and the EnTT Entity-Component-System (ECS) framework.

Dependencies

  • Raylib: A simple and easy-to-use library to learn and enjoy video games programming. Raylib is highly inspired by Borland BGI graphics lib and by XNA framework. The library provides a simple and intuitive interface towards a set of powerful tools, allowing for the development of both complex and simple games and applications.

  • EnTT: A fast and reliable Entity-Component-System (ECS) and much more. This is a header-only library, written in modern C++, to help you quickly develop games and applications. EnTT is easy to integrate with existing code and provides a lot of features (from meta programming to event handling) to speed up development and to keep your code maintainable.

Project structure

- src
  - builders
  - components
  - core
  - factories      
  - systems     
  - main.cpp 
  • src - The project root where the source code lives.
  • src/builders - Contains Builder implementations used to construct entities in a step-by-step & controlled manner. Builders are commonly needed when an object requires multiple steps to construct or when the object can have multiple representations based on some parameters.
  • src/components - Contains the Component definitions. In an ECS paradigm, a Component is a data structure that holds the attributes of entities. It does not contain any behavior. For example, a Position component might contain "x" and "y" attributes.
  • src/core - Core is where essential game functions and structures are defined. This could include the game loop, initialization and shutdown routines, and any utility or helper functions that aren't part of a game entity's behavior.
  • src/factories - Contains Factory implementations for creating game entities. Factories encapsulate the creation logic of entities that always have the same set of components. This enables consistent creation of these entities throughout the game.
  • src/systems - Contains the System implementations. Systems in ECS are where the behavior logic lives. They operate on Components, reading and writing their data. For example, a Movement system might use the data in the Position and Velocity components to update an entity's position over time.
  • main.cpp - Main application entry point.

2d-game's People

Contributors

ivandrenjanin 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.