Code Monkey home page Code Monkey logo

tmingengine's Introduction

在这里插入图片描述

TmingEngine

@[toc]

Open Source

https://github.com/xiaomingfun/TmingEngine

UI Library

TmingEnggine use a open source UI framework named dear-imgui . The advantage of this framework is easy using ,convenient extension ,little limilimit with using MIT LICENSE 。So we can easy to develop a game editor by import this framework.

My goal is to develop a full-platform Editor (Windows Mac Linux) ,then I need to abstract a windows layer,above this abstract layer to develop the game engine editor。So I use OpenGL for backend rendering,use glfw to create a windows , finally use the dear-imgui to build editor layout widget 。I want to use vulkan to replace the OpenGL in the future。If the abstract windows layer design good enough ,then we can easy to change backend rendering library.

The Editor Layout

在这里插入图片描述 在这里插入图片描述

Even though I have used Unity for a long time , but I still don't know why Unity have to design those widgets . But those layout design is the really reason that I change use the tool from Cocos to Unity. Because of the continuation of the user habit , as a beginner ,we can also fellow the old version tutorial to exercise in the the latest editor tool .

So the design of TmingEngine editor , I just imitate the Unity . I will learn other 3D rendering tool UI layout , then bring the good design to my project.

Current Focus on-------Shader

It's a demo stage now ,so we can't develop all part of a completed engine at the same time. So I focus on support a convenient IDE to test and display the shader ,then to finish other part of a completed engine.

Soft Rendering

I have imported a soft rendering framework tinyrenderer to TmingEngine . We can make the vertext shader and fragment shader by just writting c++ code directly .

Because all the part of the rendering pipeline we defined by ourself , so we can just use c++ code to change the model's vertext and the screen pixel color , and we can make a breakpoint at the runtime. But a model maybe have a thousand of vertext , therefore the performance of soft rendering will be not effective enough.

Internal Shader Code Editor

Thrid part Code editor ImGuiColorTextEdit Use this code editor we can write glsl shader more easy , maybe support other feature in the future. We can select a glsl file at the editor asset layout , then the shader code will be open .

Editor Download Link

Windows 64

MacOS (outdated)

Building

The Required Tools

CMake https://cmake.org

Build the Project

Windows (Visual Studio)

  1. git clone https://github.com/xiaomingfun/TmingEngine
  2. cd TmingEngine
  3. click GenerateProject.bat
  4. open the build/TmingEngine.sln
  5. enjoy it !!

Mac OS & Windows (Xcode & Visual Studio)

  1. git clone https://github.com/xiaomingfun/TmingEngine
  2. You can use CMake GUI Tool the generate the Project to build folder
    1. CMake GUI Tool : Set Source Path (path/to/TmingEngine)
    2. CMake GUI Tool : Set Binary Source Path (path/to/TmingEngine/build)
    3. Congigure
    4. Genarate
    5. Open Project
  3. enjoy it !!

Linux & Mac OS (Unix Makefile)

  1. git clone https://github.com/xiaomingfun/TmingEngine
  2. cd TmingEngine
  3. ./GenerateProject.sh
  4. enjoy it !!

Scripting With Mono

TmingEngine use mono to support C# for scripting . And we can debug the c# code from source code with Visual Studio. So we can make a breakpoint in the c++ Editor project and make breakpoint in C# script project at the time.

在这里插入图片描述

Run TmingCore.dll

  1. Open TmingEngine\src\Managed\TmingCore\TmingCore.sln
  2. build sln to generate 2 files TmingCore.dll TmingCore.dll.pdb
  3. VS build success event will use pdb2mdb tool generate TmingCore.dll.mdb
  4. dll output path : TmingEngine\Data\EngineScript
  5. TmingEngine Editor ==> Console ==> Command run TmingCore.dll

Soft Debug TmingCore.dll

  1. Visual Studio install plugin MonoRemoteDebugger
  2. run TmingCore.dll
  3. run TmingEngine\Data\Tools\MonoRemoteDebugger.Server
  4. use TmingCore.sln
  5. Toolbar -> Extensions -> MonoRemoteDebugger -> Debug with Mono (remote)
  6. Type remote IP Address .
  7. Click Connect button.

Roadmap

  • import assimp by source code
  • Auto docking layout that windows can mixing and dispersing
  • write math lib by myself
  • optimize the scene view for editor
  • export iOS project
  • Base on the Editor framework ,create a independent window
  • Project file manager to display file
  • internal code editor
  • add preview to display a picture
  • test lua and AngleScript
  • using script to write editor layout
  • load a model from file manager
  • 使用思源字体支持中文

The reference

  1. https://github.com/BalazsJako/ImGuiColorTextEdit
  2. https://github.com/ocornut/imgui
  3. https://github.com/PanosK92/SpartanEngine
  4. https://github.com/urho3d/Urho3D
  5. https://github.com/assimp/assimp
  6. https://github.com/erincatto/Box2D
  7. https://github.com/Dav1dde/glad
  8. https://github.com/g-truc/glm
  9. https://github.com/rokups/ImNodes
  10. https://github.com/nothings/stb
  11. https://github.com/jbeder/yaml-cpp
  12. http://www.angelcode.com/angelscript/
  13. https://github.com/adobe-fonts/source-han-sans/tree/release
  14. https://github.com/ssloy/tinyrenderer
  15. http://www.yinwang.org/blog-cn/2012/08/01/interpreter
  16. https://marketplace.visualstudio.com/items?itemName=Bongho.MonoRemoteDebugger
  17. https://learnopengl-cn.github.io/

tmingengine's People

Contributors

xiaomingfun avatar

Watchers

James Cloos 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.