Giter VIP home page Giter VIP logo

maze3d_console's Introduction

Maze3D_Console (ray casting - same as Wolfenstein 3D)

3D rendering in console/command prompt/ASCII:

Snapshot

Prepared to be opened with:

  • MS Visual Studio
  • CodeBlocks

How to control the viewer:

  • A, S, D, W: to move forward/backward and strafe left/right
  • Left arrow, right arrow: to rotate left/right
  • E, C: jump, crunch

Some design aims:

  • use texture on walls, as opposed to many other similar implementations
  • try to avoid using FPU (many devices work faster with integers; some devices have no FPU - you need workarounds with integers/LUTs/etc)
  • don't sacrifice performance in favor of simpler implementation
  • try using standard libraries only (aiming for cross IDE, cross platform)
  • no extended ASCII chars as sometimes they are not really standard
  • no colors as not all consoles support colors
  • stick to the 80x25 screen resolution as some consoles only support that one (but make it configurable for custom resolutions)
  • as the resolution is really low, improve the visual appearance:
    • use texture with little details
    • make sure the walls border is always drawn
    • anti-aliasing with smaller chars at texture edges

(handling key pressing is implemented for Windows only so far)

Video demo available at: https://youtu.be/--LiD7QNHNY

maze3d_console's People

Contributors

cpocol avatar

Watchers

 avatar

maze3d_console's Issues

CastX + CastY fail sometimes

some wall corners are missed by both CastX() and CastY().

Currently, this is solved by filling the gap when 1 column belongs to a wall panel while the neighbor columns belong to other wall panels.

Unfortunately, it does not solve the same situation in the Controller.

Workaround ideas:

  • always cast all 360 columns and fill the gaps.
  • dig deeper into CastX() and CastY()

draw floor

The floor grid could be painted by multiple hits resulting while doing CastX()/CastY()

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.