GithubHelp home page GithubHelp logo

lionkor / antsim3 Goto Github PK

View Code? Open in Web Editor NEW
2.0 3.0 0.0 1.5 MB

A minimal modern 2D engine for simulation projects

License: MIT License

CMake 1.63% C++ 95.45% Shell 0.04% C 1.22% Lua 0.40% Go 1.26%

antsim3's Introduction

moved to lionkor/Volty

Building a simple modern 2D engine for simulation projects like simulating ants and possibly other agent based systems (that's where the name is from) and small games.

CodeFactor

What's implemented so far

  • Super simple 2D rendering (WIP)
  • Entity-Component-System (ECS)
  • Lua scriptable component
  • C scriptable component (runtime loading of mods as DLL)
  • Entity Hierarchy (almost a Scene Graph), parent-child relationships between Entities
  • Simple UDP server and client, and a udp server in golang
  • Texture atlas

Demos included:

  • cells, a multithreaded Conway's game of life
  • orbits, a little orbital physics simulation
  • mpgame, a simple multiplayer game
  • sandbox, a bouyancy physics sandbox

Planned

I'm currently shooting for 1.0, which will be the MVP, not the finished project.

Take a look at the project(s)

How to build & run

General guide

This is a quick guide for experienced devs. Inexperienced devs should check out the other sections below.

  1. Ensure you have boost installed and up-to-date (dev headers, too) and all dependencies of SFML
  2. Clone this repo recursively
  3. Make a new directory for the build files, e.g. antsim3/build
  4. Run cmake
  5. Run make
  6. Run from antsim3 directory (not the build directory!)
  7. profit

Note: If you want to help develop this engine, make sure to use GCC 10 and ensure that CPP_20 is defined.

Windows

The windows build is currently not maintained. If you're experienced with C++ development on windows, feel free to contact me, we could use some help!

Debian / Mint / Ubuntu

Make sure the following libraries are installed with this command (all of them are required):

# apt install libboost-dev cmake git build-essential libgl-dev libflac8 libogg0 libopenal1 libvorbis0a libvorbisenc2 libvorbisfile3 libfreetype6 libgl1 libx11-6 libxrandr2 libudev1 libudev-dev libopenal-dev libvorbis-dev libflac-dev libxrandr-dev libfreetype6-dev liblua5.3

You'll also need lua and lua development headers to compile ECS/ScriptableComponent.

Clone the git repo:

$ git clone https://github.com/lionkor/antsim3 --recursive
$ cd antsim3

After this, you are ready to build. For this, run the following commands in order:

$ mkdir build
$ cd build
$ cmake .. -DDEBIAN_PATHS=1
$ cd ..
$ make -C build -j $(shell grep -c ^processor /proc/cpuinfo) all

Now you can run the demos you'd like to run with ./build/XXX where XXX is the name of the demo. Example: $ ./build/orbits. Make sure to run all demos from the antsim3 directory and not from the build directory.

Requirements

  • fmt, included
  • doctest, included
  • bitops, included

All it will be is a simple lightweight hobby project engine.

This project is under MIT. See the "LICENSE" file for more information.

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.