Skip to content

Commit 5801bcc

Browse files
committed
Improve README + Fix premake build
1 parent 6be2b49 commit 5801bcc

6 files changed

Lines changed: 42 additions & 109 deletions

File tree

OverEngine/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ set(OE_CROSS_PLATFORM_FILES
1919
"vendor/tinyfiledialogs/tinyfiledialogsBuild.cpp"
2020

2121
"vendor/wrenpp/Wren++.h"
22-
"vendor/wrenpp/Wren++.cpp"
2322
)
2423

2524
file(GLOB_RECURSE OE_OPENGL_SOURCE_FILES "src/Platform/OpenGL/*.cpp")

OverEngine/premake5.lua

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
function wren2c_command(name)
2+
return string.format("python ../utils/wren_to_c_string.py src/Wren/" .. name .. ".wren.inc src/Wren/" .. name .. ".wren\n")
3+
end
4+
15
project "OverEngine"
26
kind "StaticLib"
37

@@ -13,12 +17,14 @@ project "OverEngine"
1317

1418
prebuildcommands
1519
{
16-
[[python ../utils/wren_to_c_string.py src/Wren/entity.wren.inc src/Wren/entity.wren
17-
python ../utils/wren_to_c_string.py src/Wren/input.wren.inc src/Wren/input.wren
18-
python ../utils/wren_to_c_string.py src/Wren/keycodes.wren.inc src/Wren/keycodes.wren
19-
python ../utils/wren_to_c_string.py src/Wren/lib.wren.inc src/Wren/lib.wren
20-
python ../utils/wren_to_c_string.py src/Wren/math.wren.inc src/Wren/math.wren
21-
python ../utils/wren_to_c_string.py src/Wren/script.wren.inc src/Wren/script.wren]]
20+
wren2c_command("entity") ..
21+
wren2c_command("input") ..
22+
wren2c_command("keycodes") ..
23+
wren2c_command("lib") ..
24+
wren2c_command("math") ..
25+
wren2c_command("scheduler") ..
26+
wren2c_command("script") ..
27+
wren2c_command("time")
2228
}
2329

2430
files
@@ -42,7 +48,6 @@ project "OverEngine"
4248

4349
-- Wrenpp
4450
"vendor/wrenpp/Wren++.h",
45-
"vendor/wrenpp/Wren++.cpp",
4651

4752
-- Resources
4853
"res/**.h",
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#include <pcheader.h>
2+
#include <wrenpp/Wren++.cpp>

README.md

Lines changed: 23 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,32 @@
11
# OverEngine
2-
## Opensource game engine under MIT license
2+
Tiny little game engine
33

44
![linux-build](https://github.com/OverShifted/OverEngine/workflows/linux-build/badge.svg)
55
![windows-build](https://github.com/OverShifted/OverEngine/workflows/windows-build/badge.svg)
66

7-
![Logo](https://repository-images.githubusercontent.com/246120634/f6e9f080-a288-11ea-9a12-502646520a32)
8-
9-
## Game Editor
10-
* Work in progress 🚧
11-
* Drag and drop support
12-
* Asset management
13-
* ...
14-
15-
### New:
16-
![Screenshot 2020-11-10 143415](https://user-images.githubusercontent.com/53635046/98666307-16ba3000-2362-11eb-9b85-fa64c0153776.png)
17-
### Old:
18-
![OverEditorScreenShot](https://user-images.githubusercontent.com/53635046/93054565-c20a7980-f67e-11ea-89f5-d72a1e0a315c.PNG)
19-
20-
## Standalone OverEngine Application (Sandbox Demo)
21-
![Sandbox Demo](https://user-images.githubusercontent.com/53635046/98666301-1326a900-2362-11eb-9231-e6509e95d573.png)
22-
![Sandbox Demo](https://user-images.githubusercontent.com/53635046/98665068-68fa5180-2360-11eb-88be-da2482cbb210.png)
23-
24-
## Used third-party libraries and tools:
25-
* [premake](https://github.com/premake/premake-core) Project file generator
26-
* [CMake](https://cmake.org) Build system
27-
* [spdlog](https://github.com/gabime/spdlog) Logger
28-
* [GLFW](https://github.com/glfw/GLFW) Windowing
29-
* [Glad2](https://gen.glad.sh/) OpenGL loader
30-
* [DearImGui](https://github.com/ocornut/imgui) GUI library
31-
* [glm](https://github.com/g-truc/glm) Math library
32-
* [stb_image](https://github.com/nothings/stb/blob/master/stb_image.h) Image loader
33-
* [stb_rect_pack](https://github.com/nothings/stb/blob/master/stb_rect_pack.h) Rectangle packer
34-
* [EnTT](https://github.com/skypjack/entt) Entity Component System (ECS)
35-
* [box2d](https://github.com/erincatto/box2d) 2D physics library
36-
* [yaml-cpp](https://github.com/jbeder/yaml-cpp) YAML parser and emitter
7+
<!-- ![Logo](https://repository-images.githubusercontent.com/246120634/f6e9f080-a288-11ea-9a12-502646520a32) -->
8+
![Demo](https://user-images.githubusercontent.com/53635046/212471698-c1f55569-1f98-4c1b-b29d-0e8fa02a00af.png)
379

3810
## Build Instructions
39-
this is my own ideal way to develop OverEngine:
40-
### On Windows
41-
On Windows, I use `GenerateProjectFiles.bat` to generate project files for Visual Studio 2019 using Premake. Premake's VS project generator is fast and clean.
11+
### Windows
12+
Run `GenerateProjectFiles.bat` and open the generated solution file in Visual Studio 2022
4213

43-
### On Linux
44-
On Linux I prefer using `CMake` because it is just better and cleaner than `premake`'s `gmake2` generator.
45-
You can use any generator but `Ninja` and `Unix Makefiles` generators are my favorite ones.
46-
```bash
47-
# we are in project's root directory
48-
# 'mkdir build' is not needed
49-
# run this command:
50-
cmake -S . -B build -G Ninja
51-
# or this one (not both)
52-
cmake -S . -B build -G "Unix Makefiles"
53-
54-
# To build
55-
cmake --build build
56-
# or (not both)
57-
cd build
58-
ninja
14+
### Linux
15+
Build with CMake:
16+
```sh
17+
cmake -S . -B build && cmake --build build
5918
```
60-
61-
## IDE / Build tool - platform - compiler support
62-
* Visual Studio 2019 - Windows - MSVC
63-
* CMake (with make or ninja) - Linux - GCC / G++
64-
65-
## How to contribute
66-
1. Create a fork using the button in the top right corner
67-
2. Clone your fork on your computer
68-
3. Apply your modifications on your local clone. You can search the codebase for `TODO:`s and `FIXME:`s to find "help-wanted" parts. You can also try to fix bugs that you've found.
69-
4. Commit and push your changes to your own fork
70-
5. Apply a pull request to `OverShifted/OverEngine` and wait for your request to be accepted (or rejected)
19+
## Credits
20+
* [spdlog](https://github.com/gabime/spdlog)
21+
* [GLFW](https://github.com/glfw/GLFW)
22+
* [Glad2](https://gen.glad.sh/)
23+
* [DearImGui](https://github.com/ocornut/imgui)
24+
* [glm](https://github.com/g-truc/glm)
25+
* [stb_image](https://github.com/nothings/stb/blob/master/stb_image.h)
26+
* [EnTT](https://github.com/skypjack/entt)
27+
* [box2d](https://github.com/erincatto/box2d)
28+
* [yaml-cpp](https://github.com/jbeder/yaml-cpp)
29+
* [wren](https://github.com/wren-lang/wren)
30+
* [wrenpp](https://github.com/Nelarius/wrenpp)
31+
32+
Contributions are welcome.

Sandbox/imgui.ini

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,7 @@
11
[Window][Debug##Default]
2-
Pos=1291,28
3-
Size=268,139
4-
Collapsed=0
5-
6-
[Window][Camera]
7-
Pos=114,142
8-
Size=394,41
9-
Collapsed=0
10-
DockId=0x00000003,0
11-
12-
[Window][Renderer2D Statistics]
13-
Pos=114,55
14-
Size=394,85
15-
Collapsed=0
16-
DockId=0x00000002,0
17-
18-
[Window][Neural Network Settings]
19-
Pos=151,65
20-
Size=1077,1080
2+
Pos=60,60
3+
Size=240,112
214
Collapsed=0
225

236
[Docking][Data]
24-
DockNode ID=0x00000001 Pos=114,55 Size=394,128 Split=Y
25-
DockNode ID=0x00000002 Parent=0x00000001 SizeRef=223,85 Selected=0x343432D5
26-
DockNode ID=0x00000003 Parent=0x00000001 SizeRef=223,41 HiddenTabBar=1 Selected=0x3CB0EB33
277

Sandbox/src/SandboxECS/SandboxECS.cpp

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -186,8 +186,6 @@ SandboxECS::SandboxECS()
186186
ImGui::GetStyle().Alpha = 0.8f;
187187
}
188188

189-
static int s_MaxFPS = 0;
190-
191189
void SandboxECS::OnUpdate(TimeStep deltaTime)
192190
{
193191
OE_PROFILE_FUNCTION();
@@ -213,26 +211,13 @@ void SandboxECS::OnImGuiRender()
213211
{
214212
OE_PROFILE_FUNCTION();
215213

216-
auto& camTransform = m_MainCamera.GetComponent<TransformComponent>();
217-
218-
ImGui::Begin("Camera");
219-
Vector3 pos = camTransform.GetPosition();
220-
ImGui::PushItemWidth(-1);
221-
if (ImGui::DragFloat3("##CameraPosition", glm::value_ptr(pos), m_MainCamera.GetComponent<CameraComponent>().Camera.GetOrthographicSize() / 20))
222-
camTransform.SetPosition(pos);
223-
ImGui::End();
224-
225-
ImGui::Begin("Renderer2D Statistics");
226-
227-
ImGui::Text("FPS : %i ", (int)(1.0f / Time::GetDeltaTime())); ImGui::SameLine();
228-
ImGui::Text("MaxFPS : %i ", s_MaxFPS);
229-
230214
if (ImGui::Button("Reload Renderer2D Shader"))
231215
Renderer2D::GetShader()->Reload();
232216

233-
ImGui::SameLine();
217+
ImGui::Text("FPS: %i", (int)(1.0f / Time::GetDeltaTime()));
234218

235-
ImGui::End();
219+
Vector3 camPos = m_MainCamera.GetComponent<TransformComponent>().GetPosition();
220+
ImGui::Text("Camera position: %.3f %.3f", camPos.x, camPos.y);
236221
}
237222

238223
void SandboxECS::OnEvent(Event& event)

0 commit comments

Comments
 (0)