Coder Social home page Coder Social logo

tucci / game-engine Goto Github PK

View Code? Open in Web Editor NEW
18.0 2.0 4.0 236.33 MB

A place for me to experiment/build an entire game engine from scratch

C 57.83% C++ 37.05% CMake 0.37% Objective-C 0.33% GLSL 0.25% HTML 3.45% CSS 0.04% Makefile 0.19% DIGITAL Command Language 0.37% Roff 0.06% Perl 0.05%

game-engine's Introduction

game-engine

A place for me to experiment/build an entire game engine from scratch

Features

  • PBR Rendering wth IBL(HDR Skyboxes)
  • ECS using Data Oriented Design
  • Scene Hierarchy Management
  • Asset System
  • FBX importing
  • Logging
  • Editor Integration with IMGUI
  • Early Experimental Multi Threaded Job System

Editor features

  • Scene Viewport for real time editing
  • Game Viewport to see game run in editor
  • Multi Viewports (Top, Side, Front Views)
  • Inspector with all the component data
  • Asset Browser with drag and drop
  • Scene Hierarchy with drag and drop parenting
  • Log with filtering
  • Render System Data
  • Game Loop/Engine timer Data
  • Undo/Redo System

Libs

  • zlib
  • sdl
  • imgui

Philosophy for writing this engine

  • No libraries such as stl and boost. (No std::vector or std::string)
  • Minimize dependencies
  • Try to write everything from scratch as much as possible
  • Program using Data Oriented Design
  • Avoid OOP
  • Program in C++, but avoid all the crazy modern C++ insanity
    • Templates are used sparingly (Only containers), also to avoid bloated compile times
    • Minimal use of operator overloading. Only used for Vectors, Matrices, and Quaternions
    • No Virtuals, Inheritance, or OOP-ness
    • No new/delete. Try to use custom memory allocators for everything
    • Avoid autos. Prefer fixed width int types (uint32_t/u32 over int)
    • No C++ Exceptions
    • No RTTI
    • Try to think hard about object lifetime and ownership.
  • Avoid too many layers of abstraction
  • Be explicit rather than implicit. Code is easier to follow in the debugger
  • Think about the data and data flow
  • Be wary about memory latency, memory layout, and the memory hierarchy
  • Understand that you are writing code for a real machine with constraints, finite resources and not some abstract machine
    • How much memory does a system need?
    • How much time does a system need to perform its task?
    • Does this code need to be done now, or can it be done later?
  • Write code that I need now and not in the future
  • Write code that is easy to debug, understand, and easy to change
  • Write code that can be multi-threaded easily
  • Try to read the outputted assembly and try to understand what it is trying to do
  • Understand that the compiler can't do everything

Future Goals

  • Make the renderer agnostic
  • Learn vulkan/dx12 for the renderer
  • Rendering
    • Better lighting/shadows
    • Layered Materials
    • Particle System
    • Fog/Volumentric Lighting
    • Sub surface scattering
    • Post Processing
    • Ray tracing support
  • Make everything multi threaded
  • More hotloading
  • Write/Intergrate a phsyics engine
  • Write/Intergrate an animation system
  • Better tooling/editor features
  • Actually build a game with it.

Screenshots

Glossy Marble Gold Wood Painted Cement Rusted Iron

Editor Screenshot 1 Editor Screenshot 2 Editor Screenshot 3

game-engine's People

Stargazers

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

Watchers

 avatar  avatar

game-engine's Issues

Mentoring

Hi, i saw your project and it looks pretty cool, rather even amazing. I'm a third year student of BMSTU and i have a coursework, in which i should made kind of my own 3d render engine, i really want to understand, how does it all work, but it's complicated for me to learn by my own, so if you still using github and be able to read this message, and maybe have free time, is it possible for me to be your student? I would be happy if you could explain the basics of building the engine to me, if there is a question of money, I could pay for these lessons(although as a Russian student I am not sure that I can pay a lot). 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.