Skip to content

ckinvents/c-raycaster

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

65 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

c-raycaster project

Now with sprites!

Connor Ennis, 2019-2020

A basic raycaster engine built in C using SDL2. This is a messy expirement at the moment and more of a learning exercise than anything. I'll be adding more features over time, but for now it has basic functionality and can load simple maps.

Now with sprites: Not fully implemented yet but they render! That's a thing.

WARNING: This project is very much a wip and doesn't even have a makefile yet (Just added!). I'll be sure to add more info as stuff progresses (including documentation, which is currently very lacking) but this is an expirement so it will never be a particularly good engine. If you want something to use for your own game, with multiple level support and texturing (now added) and all of that other jazz (that actually runs well, RIP optimization), there's plenty of other stuff online.

Update: Now there's a makefile. (Yay!) Now there's a working makefile (working-ish, make sure to change library dirs)

Controls:

  • w, s to move forward and backwards
  • q, e to strafe left and right, respectively
  • a, d to rotate counterclockwise and clockwise (respectively, duh) Nope we're using mouse movement now :|
  • shift to sprint in literally every direction
  • left control to crouch
  • k to kill the player
  • r to respawn when dead

Features / Goals:

  • Textured grid-based raycasting on a single plane
  • Pixel scaling, dithering, and palletization
  • Automatic texture scaling
  • Gradient and rectangle drawing, as well as arbitrary pixel drawing functions
  • 3D sprites with depth buffering, alpha transparency, animation, height and scaling
  • 2D overlay sprites with alpha transparency and scaling
  • Depth fog (sort of)
  • Alpha translucency and multi-collision ray tracing with supported textures
  • Adjustable player controls and maps
  • Map collisions
  • Floors / Ceilings
  • AI and collisions for entities
  • More complex sprite handling
  • Improved memory management (hah)
  • Mapable floors / ceilings
  • Scrolling skyboxes (currently in progress)
  • Multi-level maps with transitions/procedural generation
  • Player height
  • More pixel shaders
  • Full overlays
  • Text engine
  • Audio engine
  • Single-plane offset walls
  • Animated wall textures
  • Interactive objects
  • Additional, better reference artwork (I'm doing my best, it takes practice) (currently in progress)
  • Controller support (yes, UDXS, including the Steam controller)
  • Player information (inventory, health, etc)
  • Maybe make an actual game with this thing???
  • Actual documentation D:
  • Oh yeah, probably a state system for events. Might be nice.
  • More things for doing things with things. Yeah.

About

Basic raycasting engine in C using SDL2.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages