Skip to content

3D Raycast Engine in Flutter, using DDA(Digital Differential Analyzer) Algorithm.

License

Notifications You must be signed in to change notification settings

hamed-rezaee/flutter_3d_raycast_engine

Repository files navigation

Flutter 3D Raycasting Engine

This project implements a 3D raycasting engine in Flutter, allowing you to simulate a 3D environment using 2D graphics and basic raycasting techniques. The engine renders a first-person perspective view similar to classic games like Wolfenstein 3D.

Features

  • Raycasting Rendering: Simulates 3D graphics using 2D projections and raycasting, based on DDA(Digital Differential Analyzer) algorithm.
  • Player Movement: Move the player using W, A, S, D keys.
  • Map Editing: Includes a map editor to create custom maps interactively.
  • Mini Map: Toggleable minimap for navigation.
  • Texture Rendering: Toggle to enable/disable texture rendering on walls.
  • Shadow Casting: Renders shadows based on the distance from the player.

Getting Started

  1. Clone the repository:
git clone https://github.com/hamed-rezaee/flutter_3d_raycast_engine.git
  1. Navigate to the project directory:
cd flutter_3d_raycasting
  1. Run the project:
flutter run

Controls

  • Move Forward: W
  • Move Backward: S
  • Strafe Left: A
  • Strafe Right: D
  • Rotate Left: Q
  • Rotate Right: E
  • Toggle Minimap: 1
  • Toggle Textures: 2

Map Editor

The map editor allows you to create custom maps interactively.

Demo

Demo

License

This project is open source and available under the MIT License.

Acknowledgements

Wolfenstein 3D was developed by id Software and released in 1992. This project is inspired by the original game and implements a simplified version of the raycasting engine used in Wolfenstein 3D.

About

3D Raycast Engine in Flutter, using DDA(Digital Differential Analyzer) Algorithm.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published