yaky [Lexaloffle Blog Feed]https://www.lexaloffle.com/bbs/?uid=65754 Dark Streets Tech Demo 1 <p> <table><tr><td> <a href="/bbs/?pid=142236#p"> <img src="/bbs/thumbs/pico8_dark_streets_tech_demo_1-1.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=142236#p"> Dark Streets Tech Demo 1</a><br><br> by <a href="/bbs/?uid=65754"> yaky</a> <br><br><br> <a href="/bbs/?pid=142236#p"> [Click to Play]</a> </td></tr></table> </p> <h1>Dark Streets Tech Demo 1</h1> <p>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!</p> <h2>Raycasting renderer</h2> <p>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.</p> <ul> <li>Pretty performant: Everything below takes up only 50-60% of CPU, unless you go crazy with geometry and distances.</li> <li>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.</li> <li>Variable brightness: Based on distance, using draw palettes.</li> <li>Floor textures: Pretty basic, using horizontal TLINE</li> <li>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.</li> <li>Ceilings. Although texture-less, ceilings are rendered separately from the sky, and allow for features such as archways, underpasses, and building interiors.</li> <li>Animated doors: They are also rendered halfway on the tile to stand out from the walls.</li> <li>Z-buffer and clipped sprites: This piece is not very efficient yet, but works pretty well.</li> </ul> <h2>Gameplay</h2> <p>You can walk around, open doors, pick up and fire weapons (but can't defeat the enemies yet).</p> <ul> <li>Variety of objects: Solid obstacles, ceiling decor (can be walked under), floor decor (cannot be walked through, but can be shot over)</li> <li>Five weapons: Infinite pistol, shotgun, Gatling gun, flamethrower, and a rocket launcher (unfinished). </li> <li>One large level, hoping to keep it like that for final game. Might not be possible with number of objects per level.</li> <li>Health and weapon pickups.</li> <li>Weapon switching: When picking up a new weapon and when running out of ammo.</li> <li>Enemies: Basic move-aim-fire behavior, in beginning stages.</li> </ul> <h2>Known issues</h2> <ul> <li>Looking through open doors is slow. This is due to calculations on which vertical slice must be rendered for the door on each ray.</li> <li>Adding many objects will slow the game down a lot, due to many visibility and collision calculations.</li> </ul> <h2>Thanks</h2> <p>Big thanks to other PICO-8 first-person games for motivation:</p> <ul> <li>Trial of the Sorcerer</li> <li>Caped Feline Arena</li> <li>Star Beast</li> <li>Whiplash Taxi Co</li> </ul> https://www.lexaloffle.com/bbs/?tid=140457 https://www.lexaloffle.com/bbs/?tid=140457 Fri, 01 Mar 2024 01:17:10 UTC