|
|
2 سال پیش | |
|---|---|---|
| docs | 2 سال پیش | |
| examples | 2 سال پیش | |
| library | 2 سال پیش | |
| port | 2 سال پیش | |
| source | 2 سال پیش | |
| .gitignore | 2 سال پیش | |
| .gitmodules | 2 سال پیش | |
| LICENSE | 2 سال پیش | |
| README.md | 2 سال پیش | |
| SConscript | 2 سال پیش |
TinySquare is an embedded block game engine designed to provide a lightweight game development solution for devices targeting Cortex-M processors. TinySquare's design principles are small code size and lightweight running costs to ensure that the engine can run efficiently on resource-constrained embedded devices. TinySquare has the following features and advantages:
Using a minimally functional Snake as a reference, the space overhead and performance of TinySquare are given. Note that this use case does not use the Python virtual machine:
| Reference data | ||||
|---|---|---|---|---|
| -Os optimization | -Oz optimization | Remark | ||
| Configuration | Main frequency | 80MHz | 80MHz | —— |
| Optimization level | -Os -lto | -Oz -lto | —— | |
| Screen | 240 * 240 | 240 * 240 | —— | |
| PFB | 240 * 4 | 240 * 4 | —— | |
| Heap | 0x100 | 0x100 | —— | |
| Stack | 0x100 | 0x100 | —— | |
| rt heap | 0x2400 | 0x2400 | —— | |
| Performance | FPS | 140:7ms | 128:7ms | —— |
| Program size | Code | 34156 | 29688 | —— |
| RO-data | 2520 | 2512 | —— | |
| RW-data | 180 | 180 | —— | |
| ZI-data | 16052 | 16052 | Including LCD buffer, PFB pool, rt heap, rt stack, stack, heap, snake resource, etc. | |
Combining the above data, it is not difficult to conclude that the engine itself takes up very little resources, and the corresponding performance is also very powerful! The embedded world simply doesn't need 128 or even 140 FPS. Therefore, the above data can be further optimized, the size of the PFB can be further reduced, and the task stacks of engine tasks and game tasks are also very rich in the current test environment, and can be further compressed to reduce the rt heap size. To sum up, TinySquare meets the design principle of "small code size and lightweight running cost", while also showing excellent performance.
| Name | Description |
|---|---|
| docs | Document directory |
| examples | examples directory |
| library | dependent library directory |
| port | ported code directory |
| source | source code directory |
TinySquare is licensed under the Apache-2.0 license, see the LICENSE file for details.