HEngine - 2D/3D Game Engine written in C++20

HEngine

HEngine: Hbh Game Engine

License: MIT Language Standard

Screenshot

Now only support platform Windows

OpenGL 4.5

TODO: D3D11 D3D12 Vulkan

命名规范

命名法

统一采用Pascal命名法(文件夹、类名等),第三方库除外

CMakeLists.txt 的变量命名也采用 Pascal 命名法,比如:

set(ProjectRootDir "${CMAKE_CURRENT_SOURCE_DIR}")

这里变量 ProjectRootDir 采用 Pascal 命名法,与 CMAKE 自带变量区分(比如 CMAKE_CURRENT_SOURCE_DIR )

include 要求

顺序

首先include同级文件,其次是同Source文件,再次为第三方依赖,最后为stl库(确保依赖顺序)

且彼此直接需要以空格隔开(仅第三方依赖与stl库用尖括号)

比如 Editor 中:

// 同级文件(同属于 Editor )
#include "EditorLayer.h"

// 同Source文件(位于 Runtime 中)
#include "Runtime/Core/EntryPoint.h"	 

// 第三方依赖
#include <imgui/imgui.h>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/type_ptr.hpp>

路径

一律以 Source 起的路径开头(第三方依赖除外),比如 "Runtime/..."

代码规范

HEngine 的代码规范偏Unreal,可参考: https://docs.unrealengine.com/4.27/zh-CN/ProductionPipelines/DevelopmentSetup/CodingStandard/

原则:(后面的规则优先级高于前面的规则)

  1. 尽量不使用下划线
  2. 变量一律小写字母开头
  3. 非类内静态变量(全局变量、局部变量),在前面加小写字母s
  4. 如果是类内部成员变量,在前面加小写字母m
  5. 如果是bool类型变量,在前面加小写字母b
  6. 类内成员统一放在类的最末尾(方法置于前)
  7. 默认情况下 std::string 为相对路径,而 std::filesystem::path 为绝对路径,相对路径到绝对路径需要由 AssetManager::GetFullPath() 去获取

Getting Started

1. Downloading the repository git clone [email protected]:hebohang/HEngine.git

2. You can choose one of the following methods to build HEngine:

2.1 Run the Win-GenProjects.bat

2.2 Run the following commands:

cd HEngine
cmake -B build
cmake --build build --parallel 4

2.3 Visual Studio: Open Folder, then choose HEngine folder :)

Credits

Similar Resources

Modern & multiplatform game engine in C++17

Modern & multiplatform game engine in C++17

RaZ Modern & multiplatform 3D game engine in C++17 Linux Windows macOS WebAssembly Compilation Unit tests No CI yet No CI yet N/A Codacy Coveralls Sum

Sep 19, 2022

A simple, funky, horrible fluid simulator, made possible by OLC's Pixel Game Engine

A simple, funky, horrible fluid simulator, made possible by OLC's Pixel Game Engine

flOwie A simple, funky, horrible fluid simulator, made possible by OLC's Pixel Game Engine! Not meant for usefulness. The big O is in the name because

Jan 21, 2022

PyMO AVG Game Engine implemention in C.

PyMO AVG Game Engine implemention in C.

__________ __ _______ / ____/ __ \__ __/ |/ / __ \ / / / /_/ / / / / /|_/ / / / / / /___/ ____/ /_/ / / / / /_/ / \____/_/ \__, /_

Sep 15, 2022

A simple 3D game engine for GameCube, Wii, 3DS, Windows, and Linux.

octave A Simple 3D Game Engine for GameCube, Wii, 3DS, Windows, and Linux Windows Setup Download and Install: Visual Studio Community 2017 (with C++ s

Jul 28, 2022

Sokoban written in C using VIM in Termux. A very easy game

Ncurses Sokoban Installation and how to use apt update apt install git git clone https://github.com/JyanJohn/sokoban cd sokoban make ./soko

Nov 15, 2021

A cross-platform,lightweight,scalable game server framework written in C++, and support Lua Script

A  cross-platform,lightweight,scalable game server framework  written in C++, and support Lua Script

Current building status Moon Moon is a lightweight online game server framework implement with multithread and multi-luaVM. One thread may have 1-N lu

Sep 17, 2022

A simple terminal-based solitaire game written in C using Ncurses

A simple terminal-based solitaire game written in C using Ncurses

Solitaire A simple terminal-based solitaire game written in C using Ncurses Dependencies Requires an installation of ncursesw as unicode is used exten

Apr 7, 2022

Cross-platform sandbox RPG game written in C++ with OpenGL and SDL2.

Cross-platform sandbox RPG game written in C++ with OpenGL and SDL2.

Forradia test Forradia is a cross-platform sandbox survival/RPG game written in C++ with OpenGL and SDL2. The engine loads 3D models in Wavefront-form

Jun 29, 2022

Tiny and portable Game Boy emulator written in C.

TinyGB TinyGB is a tiny and portable Game Boy emulator written entirely in C as a hobbyist one-man project. I only wrote this to deepen my understandi

Sep 21, 2022
Comments
  • 与路径相关的操作可以考虑使用 std::filesystem::path

    与路径相关的操作可以考虑使用 std::filesystem::path

    std::filesystem::path 是 C++17 引入的, 用于表示文件路径. 如果能用其替代 std::string 应该可以提高代码的可读性. 例如可以简化以下代码: https://github.com/hebohang/HEngine/blob/41e4568b6511539ac1da6085aa5b643a0fc51b41/Engine/Source/Runtime/Mesh/Mesh.cpp#L46-L47

Love 6's Regular Expression Engine. Support Concat/Select/Closure Basic function. Hope u can enjoy this tiny engine :)
Love 6's Regular Expression Engine. Support Concat/Select/Closure Basic function. Hope u can enjoy this tiny engine :)

Regex_Engine Love 6's Blog Website: https://love6.blog.csdn.net/ Love 6's Regular Expression Engine Hope u can love my tiny regex engine :) maybe a fe

May 24, 2022
Sword Engine is a fork of Psych Engine that plans on adding more features and quality of life improvements.
Sword Engine is a fork of Psych Engine that plans on adding more features and quality of life improvements.

⚠️ WARNING: This README is currently incomplete, This warning will be removed once it's complete. Friday Night Funkin' - Sword Engine Sword Engine is

Jul 9, 2022
Two Tribes Engine; the engine which we used to create Toki Tori 2+ and RIVE with

Two Tribes Engine We, Two Tribes, have used this engine for over a decade. It started with early development on the Nintendo DS and ultimately resulte

Sep 16, 2022
OpenGL Template Engine - a C++ OpenGL graphics engine which aimed to be a simple startup template for 3D OpenGL projects.
OpenGL Template Engine - a C++ OpenGL graphics engine which aimed to be a simple startup template for 3D OpenGL projects.

OpenGL Template Engine is a C++ OpenGL graphics engine which aimed to be a simple startup template for 3D OpenGL projects. This is the template I personally use for my own projects and provides me with the general OpenGL 3D render setup with model import and UI.

May 16, 2022
ASMotor is a portable and generic assembler engine and development system written in ANSI C99

ASMotor is a portable and generic assembler engine and development system written in ANSI C99 and licensed under the GNU Public License v3. The package consists of the assembler, the librarian and the linker. It can be used as either a cross or native development system.

Jul 28, 2022
this is my simple voxel engine, appart from librairies like glad it is entierly written in C++ and GLSL

simple-voxel-raycaster this is my simple voxel engine, appart from librairies like glad it is entierly written in C++ and GLSL here is a gif: https://

Jun 4, 2022
Sep 10, 2022
Graphics engine written in C++ using DirectX11
Graphics engine written in C++ using DirectX11

Adria-DX11 Graphics engine written in C++/DirectX11. For successful build you will need textures that you can find here. Features Entity-Component Sys

Sep 12, 2022
Graphics engine written in C++ using DirectX12/DXR
Graphics engine written in C++ using DirectX12/DXR

Adria-DX12 Graphics engine written in C++ using DirectX12/DXR. For successful build you will need textures that you can find here. Features Entity-Com

Sep 11, 2022
A Graphical Engine written in C++ for abstract OpenGL

Lukeda Graphical Engine (LGE) It's a simple graphical library, written in C++ with OpenGL(GLEW) and GLFW Start as a fork from my other project named "

Jul 13, 2022