Skip to content

csaye/mono2d

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Mono2D

A 2D raycasting engine built in MonoGame.

Controls

W/S: move forwards/backwards
A/D: move left/right
Left/Right: look left/right

Installation/Running

Ensure Visual Studio and MonoGame are installed.

Clone the project by running git clone https://github.com/csaye/mono2d

Open in Visual Studio and press the big play button or use F5 to run.

Settings

Drawing.cs

public const int Grid = 1; // Size of grid
public const int GridWidth = 512; // Width of grid
public const int GridHeight = 512; // Height of grid

Map.cs

private const int Width = 64; // Width of map (x)
private const int Height = 64; // Height of map (y)

private const float Fov = Pi / 2; // Base field of view

private const float RayStepDist = 0.1f; // Distance between ray steps
private const float MaxDepth = 64; // Maximum ray depth

Player.cs

private const float Speed = 8; // Base walk speed
private const float Spin = 1.5f; // Base rotation speed

About

A 2D raycasting engine built in MonoGame.

Resources

Stars

Watchers

Forks

Languages