Code Monkey home page Code Monkey logo

linaengine's Introduction



License Codacy Badge Build Status contributions welcome Donate Lina Discord GitHub issues GitHub repo size

Lina Engine is a lightweight and ECS based open-source game engine. Initially it's a research project and is aimed to be a basis of development for more open-source game engine projects. Lina's architecture is designed to be as modular as possible and it focuses on creating replacable modules to customize for project-specific needs, rather than stacking thousands of features into one framework.

Visit the project page on my website for more information

Lina Lina

Announcements / Notes

  • Lina Engine is currently compatible to be compiled only with x64 architecture on Windows. If you would like to use it on different architectures & platforms, you need to compile the vendors for your target architecture and platform include them manually.

  • Lina is currently in active development so it's not stable on all platforms. It's being developed in Visual Studio 2019 in Windows 10 with x64 architecture, so that's the best setup to contribute to the project for now.

Lina Engine Tools

External Dependencies

Installation

  • Clone Lina Engine git repository
# Initialize git in your desired directory.
git init

# Clone Lina Engine
git clone https://github.com/inanevin/LinaEngine

# Alternatively you can clone recursively, this will download all the submodules if there exists any along with Lina Engine source code.
git clone --recursive https://github.com/inanevin/LinaEngine
  • You can generate the project files and build using; Lina Engine Build Launcher (deprecated), CMake with Shell or CMake GUI

Using Lina Engine Build Launcher (deprecated)

  • You need to have JavaFX Runtime library installed on your computer & environment paths set for it. For more information visit Java FX.
  • Download a binary release from Lina Engine Build Launcher Repository.
  • Run the .jar file, launcher will open.

  • Select the directory where you downloaded Lina Engine's source. (this repository)
  • Select your desired build directory for project files.
  • Select your target generator & desired build options.
  • Hit "Generate Project Files" to generate only the project files, hit "Generate and Build" to generate project files and then build the binaries using the generated files.

Using CMake with Shell

  • Run your shell, command line or terminal in the repository directory. Afterwards, execute generation / build commands.
# You can define any options before generating project files.
cmake -DLINA_ENABLE_LOGGING=OFF

# You can define multiple options sequentially.
cmake -DLINA_ENABLE_LOGGING=OFF -DLINA_ENABLE_PROFILING=OFF

# It is recommended to declare the type of the option if multiple options are defined
cmake -DLINA_ENABLE_LOGGING:BOOL=OFF -DLINA_ENABLE_PROFILING:BOOL=OFF -DCMAKE_CONFIGURATION_TYPES:STRING="Debug,Release"

# Above commands will generate project files with default generator, you can specify a generator if you want.
cmake -DLINA_ENABLE_LOGGING=OFF -G "Visual Studio 15 2017"
  • After generating project files you can either open your IDE and build the ALL_BUILD project which will build all the targets or you can build the binaries from shell.
# Create a directory for binaries
mkdir bin

# Navigate to directory
cd bin

# Build the root project
cmake ../ -G "Visual Studio 16 2019" -A "x64"

# After the project files are built, you can build the project via
cmake --build . --target ALL_BUILD
  • Check out CMake Documentation for specifying more options and configurations like project file generation directories and more.

Using CMake GUI

  • Choose the directory where the repository is as the source directory.
  • Choose a build directory, this can be the same as the source directory or anywhere you like.
  • Hit configure, select the IDE you want to generate the project files for and x64 architecture.
  • Select options, you can leave them as default.
  • Hit generate, this will generate the project files for your desired IDE.

Build Options

Option Description Default
LINA_ENABLE_EDITOR Launches the sandbox in editor mode. ON
LINA_ENABLE_LOGGING Enables log features for core modules. ON
LINA_ENABLE_PROFILING Enables profiler integration & profile data serialization. ON
LINA_PRODUCTION_BUILD Disable debug error checking & reporting. OFF
CMAKE_CONFIGURATION_TYPES Config types that will be available on the IDE. Debug, Release, MinSizeRel, RelWithDebInfo

License

License Check out Licence file.

Design Diagrams

System Architecture

Diagram 1

Design Document

Link to the Software Design Document of Lina Engine (PDF)

Lina Engine Project Report (PDF)

linaengine's People

Contributors

bekirbatuhan avatar codacy-badger avatar inanevin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

linaengine's Issues

Memory Allocator Needed

We need to create a system, which will act as a memory allocator, presumably for the message bus, that will allocate memory needed for the big systems in the beginning of the program as a iteratable chunk into an array, to prevent fragmentation issues.

Improving Console

Currently the console is able to receive messages, their senders, and flag the messages with various colors for outputting them properly. However, it does not handle multiple messages sent in the same frame. Also it doesn't do a nice job when delivering too many amounts of messages. Needs improvement.

Transparent Sorting In Renderer System

Right now the priority queue in transparent sorting puts the objects into the list one by one, later on make sure that if the distances are the same only 1 object is put into the list w/ multiple model matrices instead of 2 objects with single model matrix.

Quaternion to Euler in 360 d Span

Currently glm euler spans in -180, 180 degrees when converted from radians, convert the front-end for the editor UI to a more human-readable manner.

Testing on the Action System

Perform tests of:

  • 10 K actions per frame with no listeners.
  • 10 K actions per frame with 1 K listeners.
  • 100 K actions per frame with 1 K listeners.
  • 100 K actions per frame with 25 K listeners.
  • 1 M actions per frame with 100 K listeners.

Core pipeline improvements

  • Get rid of static templates for input engine.
  • Introduce input devices and use them over input engine.
  • Some headers are messed up, compilation takes too much time. Go over the header files & core structure, remove unnecessary headers.
  • Improve public API. Do some header work on LinaPch.hpp
  • Go over the encapsulation of internal classes, make sure of variable encapsulation.
  • Go over default, copy, assign and move constructors on internal classes. Make sure public API prevents access of construction/destruction of internal Lina classes. Also make sure that their instantiation is done within Lina internally, memory is managed correctly.
  • Add some extra common headers.

Render pipeline improvements

  • Unify all standard shaders, make sure that all of them uses Uniform Buffers properly.
  • Finish standard lighting work.
  • ECS lighting system.
  • Shadow mapping.
  • AA
  • PBR

Pixel Formats

Determine pixel formats directly from the bitmap data.

For Loop Stall inside Input.cpp

Inside the Update function of Lina_Input.cpp, there is a for loop in order to fill corresponding key arrays. However, due to the nature of the main game loop, this for iteration stalls the main game loop, so that the main loop needs to wait until the iteration of the for loop is completed. We need to change this into another system.

Instancing Arrays

Right now primitives are being drawn via loaded models & using draw elements, which is an unnecessary overhead. Make sure you use glDrawArrays for them instance the non-transparent ones.

Completing Trivial Input System

Deliver a robust input system, with a capability of accepting various modules and handles low-level devices properly, that uses an event-based system.

Message Bus Needed

So far we have implemented some of the systems to see some basic functionality. But as the systems get bigger, the maintenance starts to get clunky. We need some sort of a message bus system, that will seperate the core and the frameworks from each other.

Frame buffer resizing

Resize currently bound frame buffer textures when application window is resized, or alternative delete & re-generate the frame buffers.

Compiler error

"Lina_critical": identifier not found ------------------------------------------in LinaCommon, LinaAudio and LinaGraphics
#error: Exactly one of NDEBUG and _DEBUG needs to be defined! -------in LinaPhysics and LinaEditor
Unable to open the file ".. \ lib \ debug, release \ linaeditor. Lib"----------in sandbox

It wasn't like this before. I don't know why

Icon blur

Of course, the icons in other projects are the same

Please understand my perfectionism😢

Testing on the Signal & Slot Mechanism

Perform tests of:

  • 10 K signals per frame with no listeners.
  • 10 K signals per frame with 1 K listeners.
  • 100 K signals per frame with 1 K listeners.
  • 100 K signals per frame with 25 K listeners.
  • 1 M signals per frame with 100 K listeners.

Some Questions...

I was seeing this repo and found out a very interesting thing about the window... The title bar of the window is totally changed. It doesn't look like the normal, typical window title bar in WindowsOS. I have seen that this project uses GLFW. Can I see the code which does the styling ⬇️
image
Any help regarding this styling and how it is done is appreciated. You can also tell me the file name in which this style-ing is done.
Thanks In Advance! 😄

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.