Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
bernhardstrobl authored Sep 8, 2024
1 parent a0ebe8c commit 099ffa9
Showing 1 changed file with 15 additions and 7 deletions.
22 changes: 15 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@


## Overview
This engine basically utilizes the second core of the RP2040 as a dedicated rasterizer/GPU.
This engine uses the second core of the RP2040 microcontroller as a rasterizer to render 3D graphics.

It contains a small city as well as an outskirts featuring shootable zombies.

[Gameplay video](https://www.youtube.com/watch?v=n6bECGQyNuk)
Expand Down Expand Up @@ -41,25 +42,32 @@ Pico3D was created as part of a master's thesis at the Kempten University of App
It was designed to answer the question of whether a modern $1 microcontroller could run a complete open world 3D game.
The thesis is available [here](https://lavarails.com/download/open_world_3D_microcontroller.pdf) and should answer most of the design decisions behind the engine.

### Where do I start?
### Will this run on a different microcontroller?
Daft-Freak has created a fork using the [32blit SDK](https://github.com/32blit/32blit-sdk) available [here](https://github.com/Daft-Freak/Pico3D).
It allows the engine to run on different 32blit enabled hardware including single-core STM32 systems and RP2350.
Other MCUs may require a 32blit sdk port to run, but this is recommended as the engine might move to it in the future.

### Where do I start as a developer?
Check out the Blender tutorials on creating your own game worlds.
The main.cpp file contains a general overview of the game and engine. The most important Pico3D feature is going to be the render_triangle() function.
This function basically does all of the hard work of transforming a triangle (in world space) and pushing it into the renderer (no deep engine/graphics knowledge needed!).
See the test models and the render_model_16bit functions for an example on how to put in your own meshes.
The rasterizer itself (performance critical code) is contained within render_rasterize.cpp.

### How big can the world be?
The included game has a grid size of 12x12 chunks (each chunk is 10x10m in size -> world size of 120x120m).
Right now the chunk cache uses an 8 bit int for each direction limiting the world size to 256x256 chunks (2.56x2.56km). This can be extended if needed.
Unless heavy use of repeat/procedurally generated chunks is made use of the binary is also likely to exceed 16MB. Plenty of creative procedural tricks are possible to get around this issue as well however if you want the next Daggerfall.
Right now the chunk cache uses an 8 bit int for each direction limiting the world size to 256x256 chunks (2.56x2.56km).
This can be extended if needed and the use of a different/modified chunk system can work around the limited storage available on most MCUs.

### How are the NPCs loaded in/out?
Right now the game simply simulates all 50 NPCs and 50 zombies at the same time since that is pretty cheap compared to the actual rendering.
It's also more realistic that way and uncovers any big issues in the self-made RNG ;).
Rendering is optimized with distance and view frustum culling.

### What is the Gamescom version of the game? ###
This version was used to demonstrate the engine at Gamescom and replaces the zombies with balloons to conform to USK ratings.
It is left in the codebase to show how to make a possible variant of the game for developers.
### Game variants
These show how to make a possible variant of the game for developers:
Picocean (picocean branch) - A Wind Waker inspired demo extending the chunk size to 50x50m with a single island while utilizing a fake ocean/horizon.
Gamescom (compile define) - This version was used to demonstrate the engine at Gamescom and replaces the zombies with balloons to conform to USK ratings.

### What were the inspirations for the game world?
The city itself was inspired heavily by Cyberpunk 2077 and the Yakuza series of games. The outskirts have a Legend of Zelda: Breath of the Wild influence.
Expand Down

0 comments on commit 099ffa9

Please sign in to comment.