Skip to content

danmacnaughtan/pyxel-raycast

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Pyxel Raycast

example

A basic raycast example using the Pyxel retro game engine. The project started as an experiment porting the OneLoneCoder CommandLineFPS (see video tutorial here) to Python and Pyxel, but went a bit farther with some dithering and camera control (including "vertical" looking).

A resolution of 240x136 and framerate of a whopping 30fps was achieved using two techniques:

  1. Interleave rendering (alternate drawing even and odd columns)
  2. Using one of Pyxel's image banks as a display buffer so the scene can be rendered with a single draw command

Some additional tips, specifically "vertical" look, can be found in this article.

Requirements

Controls

Key Description
1 Reduce FOV
2 Increase FOV
3 Reset FOV
4 Toggle interleave rendering on/off (default on)
5 Increase visible distance
6 Reduce visible distance
7 Reset visible distance
8 Toggle wall boundaries on/off (default on)
W Move forward
A Turn left
S Move backward
D Turn right
Z Strafe left
C Strafe right
Q Look up
E Look down
X Center look
SHIFT Hold to run

About

Raycasting with the Pyxel retro game engine

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages