feroult / flutterstein-3d

🔫 A 3D raycaster implemented in Flutter

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Flutterstein 3D

A 3D raycaster implemented in Flutter.

For anyone looking for the original / unminified code, there is a branch named prior-to-reduction which is pretty much the code prior to the minification.

This app was submitted as an entry to the Flutter 5KB Challenge.

Gameplay 0 Gameplay 1 Gameplay 2 Gameplay 3

Description

This is a an implementation of the 3D raycasting algorithm as employed by games like Wolfenstein 3D. It uses the Canvas API, specifically drawRawAtlas, to render the level data and also to batch the draw calls.

On-screen controls have also been implemented using PointerData, with inflated tap areas to improve responsiveness.

To keep things interesting

Due to the 5KB restriction, I can't really add any game logic. However, when I built the level, I hid 9 other Flutter logos (10 if you count the first logo at the start) within the level, see if you can find them all before reaching the exit (the exit is another elevator).

If you want to see where all of the logos are hidden, here is the map

Running the app

flutter run --release

I highly recommend running this on Android devices since that is where I have been testing the app on. Theoretically, it should also run on iOS since there is no platform specific code or configuration employed.

Orientation

Although the app supports both portrait and landscape orientation, it looks way better in landscape.

About

🔫 A 3D raycaster implemented in Flutter

License:MIT License


Languages

Language:Dart 82.0%Language:Objective-C 12.1%Language:Java 6.0%