Coder Social home page Coder Social logo

asdlei99 / hengine Goto Github PK

View Code? Open in Web Editor NEW

This project forked from chendeheng611/hengine

0.0 0.0 0.0 216.19 MB

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

License: MIT License

C++ 89.05% Python 0.07% C 0.57% CMake 3.96% GLSL 6.34% Batchfile 0.02%

hengine's Introduction

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

hengine's People

Contributors

hebohang avatar

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.