Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

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

License

Notifications You must be signed in to change notification settings

finalreality/HEngine

Open more actions menu
 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

361 Commits
361 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 git@github.com: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

About

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

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 89.0%
  • GLSL 6.3%
  • CMake 4.0%
  • Other 0.7%
Morty Proxy This is a proxified and sanitized view of the page, visit original site.