# TinySquare **Repository Path**: RT-Thread-Mirror/TinySquare ## Basic Information - **Project Name**: TinySquare - **Description**: No description available - **Primary Language**: Unknown - **License**: Apache-2.0 - **Default Branch**: dev - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2023-10-03 - **Last Updated**: 2024-03-21 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # TinySquare [中文页](./docs/README_cn.md) ## 1. Introduction 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: - Layer rendering uses the Arm-2d library as the underlying support, which is specifically optimized for the Cortex-M processor. By fully utilizing the characteristics of the Cortex-M processor, the engine can provide efficient performance and optimized gaming experience. - In order to meet the resource constraints of embedded systems, TinySquare focused on the small code size of the engine and the lightweight running environment during the development process. During the running process, dynamic dirty matrix refresh technology was used, and only one partial frame buffer was needed to refresh. All layers greatly save RAM overhead during runtime to ensure that the performance and functionality of the engine can be balanced under limited resources. - TinySquare focuses on block game types. Whether it is classic games like Snake, Tetris, or other innovative block-based gameplay, the engine provides highly customized configuration items for layers to support game development and customization. - TinySquare focuses on lightweight design, while also having a certain degree of flexibility and high configurability. The engine provides a concise and powerful set of APIs: only 24 C APIs and only 18 Python APIs. A rich set of configurable options allows developers to customize according to their needs to create a unique and satisfying gaming experience. - TinySquare code writing and API naming follow RT-Thread coding standards. The development process follows the principle of minimum information disclosure. In theory, developers using TinySquare only need to pay attention to the API documentation to quickly get started with TinySquare development. 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. |