Mercurial > games > semicongine
comparison README.md @ 289:0eef4eba9c17
add: another completed feature
author | Sam <sam@basx.dev> |
---|---|
date | Wed, 14 Jun 2023 22:56:43 +0700 |
parents | c6bfe0eacb5c |
children | f25e9e19b5fa |
comparison
equal
deleted
inserted
replaced
288:5af702c95b16 | 289:0eef4eba9c17 |
---|---|
1 Semicongine | 1 # Semicongine |
2 =========== | |
3 | 2 |
4 Hi there | 3 Hi there |
5 | 4 |
6 This is a little game engine, mainly trying to wrap around vulkan and the | 5 This is a little game engine, mainly trying to wrap around vulkan and the |
7 operating system's windowing, input and audio system. I am using the last | 6 operating system's windowing, input and audio system. I am using the last |
8 programming language you will ever need, [Nim](https://nim-lang.org/) | 7 programming language you will ever need, [Nim](https://nim-lang.org/) |
9 | 8 |
10 Building | 9 ## Building |
11 -------- | |
12 | 10 |
13 Requires Nim to be installed and ```glslangValidator``` to be downloaded to the | 11 Requires Nim to be installed and `glslangValidator` to be downloaded to the |
14 directory of the main compilation file (e.g. into ```examples/``` in order to | 12 directory of the main compilation file (e.g. into `examples/` in order to |
15 compile the examples). It can be downloaded at | 13 compile the examples). It can be downloaded at |
16 https://github.com/KhronosGroup/glslang/releases/. | 14 https://github.com/KhronosGroup/glslang/releases/. |
17 | 15 |
18 Run ```nim help``` to see a list of available build commands. | 16 Run `nim help` to see a list of available build commands. |
19 | 17 |
20 Roadmap | 18 ## Roadmap |
21 ------- | |
22 | 19 |
23 Here a bit to see what has been planed and what is done already. Is being | 20 Here a bit to see what has been planed and what is done already. Is being |
24 updated frequently (marking those checkboxes just feels to good to stop working). | 21 updated frequently (marking those checkboxes just feels to good to stop working). |
25 | 22 |
26 Rendering: | 23 Rendering: |
36 - [ ] Allow different shaders (ie pipelines) for different meshes | 33 - [ ] Allow different shaders (ie pipelines) for different meshes |
37 | 34 |
38 Required for 3D rendering: | 35 Required for 3D rendering: |
39 | 36 |
40 - [ ] Depth buffering | 37 - [ ] Depth buffering |
41 - [ ] Mipmaps | 38 - [ ] Mipmaps |
42 | 39 |
43 Asset handling: | 40 Asset handling: |
44 - [x] Resource loading | 41 |
45 - [x] Mod/resource-pack concept | 42 - [x] Resource loading - [x] Mod/resource-pack concept - [x] Load from directory - [x] Load from zip - [x] Load from exe-embeded |
46 - [x] Load from directory | |
47 - [x] Load from zip | |
48 - [x] Load from exe-embeded | |
49 - [x] Mesh/material files (glTF, but incomplete, not all features supported) | 43 - [x] Mesh/material files (glTF, but incomplete, not all features supported) |
50 - [x] Image files (BMP RGBA) | 44 - [x] Image files (BMP RGBA) |
51 - [x] Audio files (AU) | 45 - [x] Audio files (AU) |
52 - [x] API to transform/recalculate mesh data | 46 - [x] API to transform/recalculate mesh data |
53 | 47 |
54 Other (required for alpha release): | 48 Other (required for alpha release): |
49 | |
55 - [x] Config files ala \*.ini files (use std/parsecfg) | 50 - [x] Config files ala \*.ini files (use std/parsecfg) |
56 - [x] Mouse/Keyboard input handling | 51 - [x] Mouse/Keyboard input handling |
57 - [x] X11 | 52 - [x] X11 |
58 - [x] Win32 | 53 - [x] Win32 |
59 - [x] Enable/disable hardware cursor | 54 - [x] Enable/disable hardware cursor |
60 - [x] Fullscreen mode + switch between modes | 55 - [x] Fullscreen mode + switch between modes - [x] Linux - [x] Window |
61 - [x] Linux | 56 - [x] Audio playing - [x] Linux - [x] Windows Waveform API |
62 - [x] Window | |
63 - [x] Audio playing | |
64 - [x] Linux | |
65 - [x] Windows Waveform API | |
66 - [ ] Generic configuration concept (engine defaults, per-user, etc) | 57 - [ ] Generic configuration concept (engine defaults, per-user, etc) |
67 - [ ] Input-mapping configuration | 58 - [ ] Input-mapping configuration |
68 - [ ] Telemetry | 59 - [ ] Telemetry |
69 - [x] Add simple event logging service | 60 - [x] Add simple event logging service |
70 - [ ] Add exception reporting | 61 - [ ] Add exception reporting |
71 | 62 |
72 Other important features: | 63 Other important features: |
64 | |
73 - [ ] Multisampling | 65 - [ ] Multisampling |
74 - [x] Text rendering | 66 - [x] Text rendering |
75 - [ ] Animation system | 67 - [x] Animation system |
76 - [ ] Sprite system | 68 - [ ] Sprite system |
77 - [ ] Particle system | 69 - [ ] Particle system |
78 | 70 |
79 Other less features: | 71 Other less important features: |
72 | |
80 - [ ] Viewport scaling (e.g. framebuffer resolution != window resolution) | 73 - [ ] Viewport scaling (e.g. framebuffer resolution != window resolution) |
81 - [ ] Query and display rendering information from Vulkan? | 74 - [ ] Query and display rendering information from Vulkan? |
82 - [ ] Game controller input handling | 75 - [ ] Game controller input handling |
83 - [ ] Allow multipel Uniform blocks | 76 - [ ] Allow multipel Uniform blocks |
84 - [ ] Documentation | 77 - [ ] Documentation |
87 | 80 |
88 - [x] Better scenegraph API | 81 - [x] Better scenegraph API |
89 - [x] Better rendering pipeline API | 82 - [x] Better rendering pipeline API |
90 | 83 |
91 Build-system: | 84 Build-system: |
85 | |
92 - [x] move all of Makefile to config.nims | 86 - [x] move all of Makefile to config.nims |
93 | 87 |
94 | 88 # Documentation |
95 Documentation | |
96 ============= | |
97 | 89 |
98 Okay, here is first quick-n-dirty documentation, the only purpose to organize my thoughts a bit. | 90 Okay, here is first quick-n-dirty documentation, the only purpose to organize my thoughts a bit. |
99 | 91 |
100 Engine parts | 92 ## Engine parts |
101 ------------ | |
102 | 93 |
103 Currently we have at least the following: | 94 Currently we have at least the following: |
104 | 95 |
105 - Rendering: rendering.nim vulkan/* | 96 - Rendering: rendering.nim vulkan/\* |
106 - Scene graph: entity.nim | 97 - Scene graph: entity.nim |
107 - Audio: audio.nim audiotypes.nim | 98 - Audio: audio.nim audiotypes.nim |
108 - Input: events.nim | 99 - Input: events.nim |
109 - Settings: settings.nim | 100 - Settings: settings.nim |
110 - Meshes: mesh.nim | 101 - Meshes: mesh.nim |
112 - Telemetry: telemetry.nim (wip) | 103 - Telemetry: telemetry.nim (wip) |
113 - Resources (loading, mods): resources.nim | 104 - Resources (loading, mods): resources.nim |
114 | 105 |
115 Got you: Everything is wip, but (wip) here means work has not started yet. | 106 Got you: Everything is wip, but (wip) here means work has not started yet. |
116 | 107 |
117 Handling of assets | 108 ## Handling of assets |
118 ------------------ | |
119 | 109 |
120 A short description how I want to handle assets. | 110 A short description how I want to handle assets. |
121 | 111 |
122 Support for file formats (super limited, no external dependencies, uses quite a bit of space, hoping for zip): | 112 Support for file formats (super limited, no external dependencies, uses quite a bit of space, hoping for zip): |
123 | 113 |
129 | 119 |
130 - Images: 4 channel with each uint8 = 32 bit RGBA, little endian (R is low bits, A is high bits) | 120 - Images: 4 channel with each uint8 = 32 bit RGBA, little endian (R is low bits, A is high bits) |
131 - Audio: 2 Channel 16 bit signed little endian, 44100Hz | 121 - Audio: 2 Channel 16 bit signed little endian, 44100Hz |
132 - Meshes: non-interleaved, lists of values for each vertex, one list per attribute | 122 - Meshes: non-interleaved, lists of values for each vertex, one list per attribute |
133 | 123 |
134 Configuration | 124 ## Configuration |
135 ------------- | |
136 | 125 |
137 Or: How to organize s\*\*t that is not code | 126 Or: How to organize s\*\*t that is not code |
138 | 127 |
139 Not sure why, but this feels super important to get done right. The engine is | 128 Not sure why, but this feels super important to get done right. The engine is |
140 being designed with a library-mindset, not a framework mindset. And with that, | 129 being designed with a library-mindset, not a framework mindset. And with that, |
151 | 140 |
152 Okay, let's look at each of those and how I plan to implement them: | 141 Okay, let's look at each of those and how I plan to implement them: |
153 | 142 |
154 **1. Build configuration** | 143 **1. Build configuration** |
155 | 144 |
156 | |
157 **2. Runtime settings** | 145 **2. Runtime settings** |
158 | 146 |
159 This is mostly implemented already. I am using the Nim module std/parsecfg. | 147 This is mostly implemented already. I am using the Nim module std/parsecfg. |
160 There is also the option to watch the filesystem and update values at runtime, | 148 There is also the option to watch the filesystem and update values at runtime, |
161 mostly usefull for development. | 149 mostly usefull for development. |
163 The engine scans all files in the settings-root directory and builds a | 151 The engine scans all files in the settings-root directory and builds a |
164 settings tree that can be access via a setting-hierarchy like this: | 152 settings tree that can be access via a setting-hierarchy like this: |
165 | 153 |
166 setting("a.b.c.d.e") | 154 setting("a.b.c.d.e") |
167 | 155 |
168 ```a.b``` refers to the settings directory ```./a/b/``` (from the settings-root) | 156 `a.b` refers to the settings directory `./a/b/` (from the settings-root) |
169 ```c``` refers to the file ```c.ini``` inside ```./a/b/``` | 157 `c` refers to the file `c.ini` inside `./a/b/` |
170 ```d``` refers to the ini-section inside the file ```./a/b/c.ini``` | 158 `d` refers to the ini-section inside the file `./a/b/c.ini` |
171 ```e``` refers to the key inside section ```d``` inside the file ```./a/b/c.ini``` | 159 `e` refers to the key inside section `d` inside the file `./a/b/c.ini` |
172 | 160 |
173 ```a.b``` are optional, they just allow larger configuration trees. | 161 `a.b` are optional, they just allow larger configuration trees. |
174 ```d``` is optional, if it is not give, ```e``` refers to the top-level section | 162 `d` is optional, if it is not give, `e` refers to the top-level section |
175 of the ini-file. | 163 of the ini-file. |
176 | 164 |
177 **3. Mods** | 165 **3. Mods** |
178 | 166 |
179 A mod is just a collection of resources for a game. Can maybe switched from | 167 A mod is just a collection of resources for a game. Can maybe switched from |