Log In  
Follow
yaky
[ :: Read More :: ]

Cart #dark_streets_tech_demo_1-1 | 2024-03-01 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA
16

Dark Streets Tech Demo 1

Hi all! Dark Streets is a first-person shooter, mechanically most similar to Wolfenstein 3D or Blake Stone, but also inspired by Doom, Blood, and Ion Fury. I have been slowly developing this game in my free time over the last year and a half. I referenced LoDev and a paper by Amanatides and Woo for some of the raycasting steps, but the rest of the code and graphics are mine. Enjoy a small preview!

Raycasting renderer

Since the setting of the game is a city, I specifically wanted to write a renderer that could draw tall buildings, short objects, doors, and interiors. I think I am pretty close.

  • Pretty performant: Everything below takes up only 50-60% of CPU, unless you go crazy with geometry and distances.
  • Fixed camera height: This makes walls look better. Originally, I had variable camera height and headbob, but that made textures a bit too jagged.Might reconsider based on performance later.
  • Variable brightness: Based on distance, using draw palettes.
  • Floor textures: Pretty basic, using horizontal TLINE
  • Multiple floors! Normally, I see raycasters render just one floor (Caped Feline Arena and Anarch are notable exceptions), so this is a bit unusual, and it allows more interesting designs.
  • Ceilings. Although texture-less, ceilings are rendered separately from the sky, and allow for features such as archways, underpasses, and building interiors.
  • Animated doors: They are also rendered halfway on the tile to stand out from the walls.
  • Z-buffer and clipped sprites: This piece is not very efficient yet, but works pretty well.

Gameplay

You can walk around, open doors, pick up and fire weapons (but can't defeat the enemies yet).

  • Variety of objects: Solid obstacles, ceiling decor (can be walked under), floor decor (cannot be walked through, but can be shot over)
  • Five weapons: Infinite pistol, shotgun, Gatling gun, flamethrower, and a rocket launcher (unfinished).
  • One large level, hoping to keep it like that for final game. Might not be possible with number of objects per level.
  • Health and weapon pickups.
  • Weapon switching: When picking up a new weapon and when running out of ammo.
  • Enemies: Basic move-aim-fire behavior, in beginning stages.

Known issues

  • Looking through open doors is slow. This is due to calculations on which vertical slice must be rendered for the door on each ray.
  • Adding many objects will slow the game down a lot, due to many visibility and collision calculations.

Thanks

Big thanks to other PICO-8 first-person games for motivation:

  • Trial of the Sorcerer
  • Caped Feline Arena
  • Star Beast
  • Whiplash Taxi Co
P#142236 2024-03-01 01:17