Powersaurus [Lexaloffle Blog Feed]https://www.lexaloffle.com/bbs/?uid=12213 Portalsaurus <p> <table><tr><td> <a href="/bbs/?pid=95261#p"> <img src="/bbs/thumbs/pico8_portalsaurus-1.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=95261#p"> Portalsaurus</a><br><br> by <a href="/bbs/?uid=12213"> Powersaurus</a> <br><br><br> <a href="/bbs/?pid=95261#p"> [Click to Play]</a> </td></tr></table> <br /> <table><tr><td> <a href="/bbs/?pid=95261#p"> <img src="/bbs/thumbs/pico8_portalsaurus-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=95261#p"> Portalsaurus</a><br><br> by <a href="/bbs/?uid=12213"> Powersaurus</a> <br><br><br> <a href="/bbs/?pid=95261#p"> [Click to Play]</a> </td></tr></table> </p> <h2>Intro</h2> <p>Recently I decided to dig into portal renderers and start to build my own, inspired by <a href="https://fabiensanglard.net/duke3d/build_engine_internals.php">this excellent write-up of BUILD</a>. This is currently work in progress, no guarantee it will turn into a full game but thought it was interesting enough to share.</p> <p>I used a lot of stuff from other projects</p> <p>From <a href="https://www.lexaloffle.com/bbs/?pid=78599">Caped Feline Arena</a> </p> <ul> <li>Player movement</li> <li>Floor and sky casting</li> <li>Palette functions</li> </ul> <p>From <a href="https://www.lexaloffle.com/bbs/?pid=86966">Cab Ride</a></p> <ul> <li>Palette</li> </ul> <p>I also revisited <a href="https://lodev.org/cgtutor/raycasting3.html">Lodev's raycasting articles</a>, specifically the code to render sprites without fisheye distortion as they behave similarly to the ends of the walls.</p> <h2>Implementation Notes</h2> <p>01/10/21</p> <ul> <li>New features including</li> <li>Variable height sectors!</li> <li>Distance based lighting!</li> <li>Large performance gains!</li> <li>Island sectors!</li> <li>This is all thanks for being a bit smarter about how many walls to cast each ray for</li> <li>After flooding portals, the walls of each sector are grouped into subgroups (referred to in BUILD terminology as 'bunches')</li> <li>The bunches are ordered near-far (thanks to traversing the portal graph)</li> <li>Island sectors get inserted before other bunches an enclosing sector (this would cause glitches with concave sectors, out of scope for now)</li> <li>Walls within a bunch are ordered near-far, and projected into screen space, where they are further chopped down, grouped by walls that touch at one end</li> <li>Portals take account of differences in sector height - this allows for doorways/overhangs</li> <li>A very simple buffer keeps track of which x coordinates have had a wall drawn, to prevent overdraw of walls</li> <li>Rays are cast for the walls nearest bunch (from the lowest to highest x coordinate). If a hit is recorded, the 'x buffer' is updated, so no further drawing happens - that coordinate is now occluded</li> <li>Palette is set for each vertical slice of wall, based on distance from the camera</li> </ul> <p>Original post:</p> <ul> <li>At the moment it relies on casting a ray for every column of the screen to determine which walls to draw</li> <li>One wall per column at the moment</li> <li>Casting a ray traverses a subset of potentially visible walls</li> <li>Potentially visible walls are calculated by traversing the portals in the world structure, starting with the 'sector' the player/camera currently occupies</li> <li>World is represented by sectors, which hold references to a set of walls that border the sector</li> <li>A portal is a wall shared by two sectors</li> <li>Traversing the world tests which walls of a sector are in front of the camera, if any wall is a portal, it is currently discarded and the connected sector is visited, up to a hard limit of 10</li> <li>The current sector of the player/camera (or starting sector for rendering) is determined by casting a ray to the left and the number of intersections with walls is counted. Even means outside the sector (and connected sectors are tested), odd means within the sector. A short description of this is found in the 'Inside a concave polygon' of the <a href="https://fabiensanglard.net/duke3d/build_engine_internals.php">BUILD write-up</a></li> <li>The world is created when the cart starts and builds a model of how sectors are connected to each other</li> <li>tline() is used for floor and sky</li> <li>No collision detection currently</li> </ul> <h2>Controls</h2> <ul> <li>Arrow keys - move around</li> <li>X - toggle map view (off by default)</li> <li>C/Z - strafe</li> </ul> <h2>Next up??? Maybe?</h2> <ul> <li>More performance</li> <li>Sector based floor textures</li> <li>Collision detection</li> <li>/ 'Island' sectors for columns</li> <li>Basic level editor</li> </ul> https://www.lexaloffle.com/bbs/?tid=43942 https://www.lexaloffle.com/bbs/?tid=43942 Sun, 25 Jul 2021 07:30:56 UTC Cab Ride <p> <table><tr><td> <a href="/bbs/?pid=86966#p"> <img src="/bbs/thumbs/pico8_cab_ride-6.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=86966#p"> Cab Ride 1.1</a><br><br> by <a href="/bbs/?uid=12213"> Powersaurus</a> <br><br><br> <a href="/bbs/?pid=86966#p"> [Click to Play]</a> </td></tr></table> </p> <p>Drive a train, forever, through a dreamlike land.</p> <p>Transport passengers to their destination.</p> <p>Watch the world go by.</p> <p>Listen to chilled out chiptune music.</p> <p>In Cab Ride you can drive thousands of different train routes through rolling hills, winding tunnels and weaving between the tall buildings of vast cities. You can drive the train for as long as you like. When you're ready to end your journey, hold down the left arrow key to announce the last station. Stopping at stations along the way means you can pick up and drop off passengers. Try and stop at the marker at each station for a high rating. Or don't! It's up to you.</p> <p>Cab Ride is a casual train simulation, not aiming for real world accuracy, but like a real train, it takes a while to brake. If you're overshooting stations, watch for the alert for the next station and reduce the throttle so you're ready to stop.</p> <h2>Controls</h2> <ul> <li>X - horn/start/restart the game</li> <li>C - open/close doors at station (must have stopped just in front of signal)</li> <li>Up - increase braking/decrease throttle</li> <li>Down - accelerate/increase throttle</li> <li>Left - hold down to announce the last station (will end the current journey)</li> <li>Right - turn Express mode on/off aka Screensaver Mode</li> </ul> <h2>Version history</h2> <p>v1.1</p> <ul> <li>Added - second track with train</li> <li>Added - Weather - different cloud patterns and periods of rain</li> <li>More performance fixes </li> </ul> <p>v1.0.3</p> <ul> <li>Changed - tweaked station stop ratings - slightly more forgiving and more consistent</li> <li>Changed - all green signals when you're in express mode (after first couple of stations)</li> <li>Fixed - all passengers would eventually get off if you opened the doors enough times at a single station</li> <li>Various performance improvements</li> </ul> <p>v1.0.2</p> <ul> <li>Added - pause menu sound toggle - deals with no hardware button in mobile view - may fix in a different way in future</li> <li>Added - 'very chilled' mode - no goal/help messages, no HUD other than station name messages, just driving trains - good for screenshots or screen savers (even better than what I claimed was a good screen saver mode before)</li> <li>Fixed - another way to drive through the last station (activate Express mode after announcing last station)</li> </ul> <p>v1.0.1</p> <ul> <li>Fixed - crash bug where you could drive out of the last station when in 'Express' mode</li> <li>Changed - you now have to hold down the right key for 2 seconds to enable Express mode (announcing the last stop also has a 2 second delay) - this is to prevent ending up in that mode by accident and locking the controls</li> </ul> <p>v1.0</p> <ul> <li>Initial release</li> </ul> <h2>Credits</h2> <p>Programming - Ben Jones / <a href="https://www.lexaloffle.com/bbs/?uid=12213"> @Powersaurus</a> <a href="https://twitter.com/Powersaurus">Twitter</a></p> <p>Music - Stephen 'rych-t' Jones / <a href="https://twitter.com/rych_t">Twitter</a> / <a href="https://soundcloud.com/floor-machoor">Soundcloud</a></p> <p>Based on code from the Pseudo-3D Racer tutorials by Tom Mulgrew/<a href="https://www.lexaloffle.com/bbs/?uid=39676"> @Mot</a> <a href="https://www.lexaloffle.com/bbs/?tid=35767">https://www.lexaloffle.com/bbs/?tid=35767</a> licensed under Creative Commons 4 (CC BY 4.0) <a href="https://creativecommons.org/licenses/by/4.0/">https://creativecommons.org/licenses/by/4.0/</a></p> <h2>Pre 1.1 version</h2> <h3>v1.0.3</h3> <p> <table><tr><td> <a href="/bbs/?pid=86966#p"> <img src="/bbs/thumbs/pico8_cab_ride-5.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=86966#p"> Cab Ride</a><br><br> by <a href="/bbs/?uid=12213"> Powersaurus</a> <br><br><br> <a href="/bbs/?pid=86966#p"> [Click to Play]</a> </td></tr></table> </p> https://www.lexaloffle.com/bbs/?tid=41332 https://www.lexaloffle.com/bbs/?tid=41332 Sat, 30 Jan 2021 16:09:12 UTC Caped Feline Arena <p> <table><tr><td> <a href="/bbs/?pid=78599#p"> <img src="/bbs/thumbs/pico8_caped_feline_arena-3.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=78599#p"> caped_feline_arena</a><br><br> by <a href="/bbs/?uid=12213"> Powersaurus</a> <br><br><br> <a href="/bbs/?pid=78599#p"> [Click to Play]</a> </td></tr></table> </p> <p>I'm still working on this (-300- nope - <em>5</em> tokens left :D ) - let me know what you think here or on <a href="https://twitter.com/Powersaurus">my Twitter</a> - there might be bugs and/or unexplainable weirdness!</p> <p>You're a cat, you're magical, you're in a duel with the finest feline magic practitioners the realm has to offer. Grab your wand and enter the arena!</p> <h2>Controls</h2> <ul> <li>Arrow keys - move</li> <li>X - strafe/sidestep (press left and right)</li> <li>Z/C - shoot</li> </ul> <p>Use the PICO-8 menu to disable AI to wander round the maps, and to toggle overhead view.</p> <h2>What's new?</h2> <p>12 July 2020</p> <p>FIXED crash bug when dropping the quad</p> <p>11 July 2020</p> <ul> <li>ADD single player red+blue keys+doors!!!! Check single player test map for an example </li> <li>FIXED showing scoreboard upon being frogged in single player.</li> <li>No more tokens left!</li> </ul> <p>09 July 2020</p> <ul> <li>ADD light viewbob</li> <li>ADD damage indicator</li> <li>ADD new map Tower Of Confusion</li> <li>ADD basic single player map support (with sample map)</li> <li>ADD 1 second delay on scoreboard</li> <li>ADD 1 second invulnerability on respawn</li> <li>CHANGED cat AI tries to find a wand if possible/pick up your stuff after frogging</li> <li>CHANGED player movement</li> <li>CHANGED minor texture improvements</li> <li>FIXED Particles obey zbuffer</li> <li>FIXED Sounds cutting off</li> <li>FIXED Cats using incorrect palette when far away</li> </ul> <p>Since April (v early itch.io release) I have:</p> <ul> <li>Added several maps</li> <li>Rewrote chunks of the graphics for more speed and more complex geometry<br /> -- diagonal walls<br /> -- working overhang textures<br /> -- faster ceiling rendering<br /> -- tline() floors/sky<br /> -- tall ceiling indoor spaces<br /> -- doubled texture limit from 16 to 32</li> <li>Added 3 extra wands, and items</li> <li>Improved sounds</li> <li>Better AI</li> <li>Better controls</li> </ul> <h2>Still to do</h2> <ul> <li>More maps</li> <li>Map editing guide</li> <li>More sounds</li> <li>More textures</li> </ul> <h2>Credits</h2> <ul> <li>Programming, art, sounds - Ben Jones/Powersaurus</li> <li>Raycasting engine based on <a href="https://lodev.org/cgtutor/raycasting.html">Lode Vandevenne's Raycasting Tutorial</a></li> <li>PICO-8 heap sort by <a href="https://twitter.com/CasualEffects">Morgan McGuire</a></li> <li>Point-line/line-line collision based on <a href="https://twitter.com/2DArray">2DArray's</a> <a href="https://demoman.net/">Gamedev tutorials</a></li> </ul> https://www.lexaloffle.com/bbs/?tid=38587 https://www.lexaloffle.com/bbs/?tid=38587 Sun, 28 Jun 2020 05:12:20 UTC tline Rotation Demo <p> <table><tr><td> <a href="/bbs/?pid=74994#p"> <img src="/bbs/thumbs/pico8_tline_rotation_demo-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=74994#p"> tline_rotation_demo</a><br><br> by <a href="/bbs/?uid=12213"> Powersaurus</a> <br><br><br> <a href="/bbs/?pid=74994#p"> [Click to Play]</a> </td></tr></table> </p> <p>I was excited by the new tline function in 0.2.0, immediately tried to plug it into my project and ran into problems.</p> <p>I made this demo to break down rotating the map to a fairly minimal program. I've added comments to explain the different data points and what they achieve when plugged into tline.</p> <p>The demo shows a rotated 2D view into the map.</p> <p>Left and right keys move the view. X toggles the unrotated map to show the direction of the rotated view relative to the map.</p> <p>I hope this is useful to you! :)</p> https://www.lexaloffle.com/bbs/?tid=37454 https://www.lexaloffle.com/bbs/?tid=37454 Sun, 19 Apr 2020 18:16:22 UTC ROAD REX <p> <table><tr><td> <a href="/bbs/?pid=65223#p"> <img src="/bbs/thumbs/pico8_road_rex-0.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=65223#p"> road_rex</a><br><br> by <a href="/bbs/?uid=12213"> Powersaurus</a> <br><br><br> <a href="/bbs/?pid=65223#p"> [Click to Play]</a> </td></tr></table> </p> <p>ROAD REX<br /> After a day's work Road Rex just wants to get home like everyone else. Road Rex is a giant dinosaur with laser eye beams.</p> <p>Get home as fast as you can! Beat your arch-rival, the quick and messy Blue Dinosaur (tm). Stop tv traffic choppers from getting footage of the mayhem you cause. Try not to get a speeding ticket from a speed camera (speed limit is 70mph in the UK) - but if you do, make sure you do it in style for extra points. Shove cars out the way and spill delicious lorry loads of kebabs, shoes and beans. Try to exit the motorway in the left lane and don't get lost!</p> <p>Controls</p> <p>Arrow keys right and left - accelerate and decelerate<br /> Arrow keys up and down - switch lanes, aim lasers<br /> X - LASERS<br /> Z/C - charge jump (release to jump)<br /> Credits</p> <p>By Ben Jones (Powersaurus on Twitter)</p> https://www.lexaloffle.com/bbs/?tid=34526 https://www.lexaloffle.com/bbs/?tid=34526 Sat, 15 Jun 2019 21:54:51 UTC Parking Masters <p> <table><tr><td> <a href="/bbs/?pid=47401#p"> <img src="/bbs/thumbs/pico47475.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=47401#p"> Parking Masters</a><br><br> by <a href="/bbs/?uid=12213"> Powersaurus</a> <br><br><br> <a href="/bbs/?pid=47401#p"> [Click to Play]</a> </td></tr></table> </p> <p>Parking Masters is a game I made over a weekend for a friend's birthday. Said friend is fond of driving and once took a photo of his car parked very close to another which has become a running gag (many ridiculous photoshops).</p> <p>I have turned the photo into a little arcade game/&quot;very serious&quot; simulation of parking in a manual car. I thought it would be a fun thing to do, turn a photo into some sprites for a PICO-8 game. Pleased with the results - photo-realistic action!</p> <p><em>Controls</em></p> <p>Up - gas pedal<br /> Left and right - shift gear<br /> X - Clutch<br /> C - Brake</p> <p>Park as quickly as you can, as close as you can! Try and avoid stalling and also from shunting the other car!</p> https://www.lexaloffle.com/bbs/?tid=30450 https://www.lexaloffle.com/bbs/?tid=30450 Fri, 15 Dec 2017 10:07:58 UTC The Wizard Pig <p> <table><tr><td> <a href="/bbs/?pid=39703#p"> <img src="/bbs/thumbs/pico41233.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=39703#p"> The Wizard Pig</a><br><br> by <a href="/bbs/?uid=12213"> Powersaurus</a> <br><br><br> <a href="/bbs/?pid=39703#p"> [Click to Play]</a> </td></tr></table> </p> <p><strong>Aim</strong><br /> Score 10 belief points by keeping your followers happy. They like trees and plants, and eating tasty corn. They don't like swamps, being stuck in one place or things being on fire. You can also win by making your opponent's (Omnicow) followers unhappy.</p> <p><strong>Controls</strong></p> <p>Arrow keys - move<br /> Z - use power<br /> X - change power</p> <p><strong>Story</strong></p> <p>Once, Henry was just a regular pig. He dreamed of being a magnificent wizard who was popular and cool. Through the sheer force of his own will and the belief of the nearby villagers, who saw promise in him - he became a giant flying head with reality bending powers. Summoning a mountain from the earth, he marvelled at his power.</p> <p>&quot;I will use my powers for good, and make my followers happy, with lovely forests and magical instant-corn from the fields&quot;</p> <p>As he said this, the earth shook and a giant cow's head appeared from behind the mountain he had just conjured, spitting fire from its eyes&quot;</p> <p>&quot;Or maybe I'll just ruin someone else's day&quot;</p> <p><strong>Powers</strong></p> <p>Raise power (yellow mana) raise the landscape. Followers cannot walk up steep slopes, and any upward slope will slow them down<br /> Lower power (yellow mana) lower the landscape<br /> Fire power (red mana) Create fireballs from your eyes. Destroys terrain and foliage<br /> Forest power (green mana) Puts out fire and creates new foliage. Cleans out swampy land.<br /> Rain power (blue mana) Puts out fire and cultivates fields that yield follower-pleasing corn. Too much rain makes the land swampy though.</p> https://www.lexaloffle.com/bbs/?tid=29180 https://www.lexaloffle.com/bbs/?tid=29180 Sat, 15 Apr 2017 18:28:37 UTC 2D Terrain Demo <p> <table><tr><td> <a href="/bbs/?pid=38013#p"> <img src="/bbs/thumbs/pico38011.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=38013#p"> 2D Terrain Demo 1.0</a><br><br> by <a href="/bbs/?uid=12213"> Powersaurus</a> <br><br><br> <a href="/bbs/?pid=38013#p"> [Click to Play]</a> </td></tr></table> </p> <p>Demo cartridge for creating 2D terrain. I'm using this for my own project but thought it would be useful for others. If you think you'll find it useful, please use in your projects. :) For more information see here - <a href="https://medium.com/@Powersaurus/journey-into-the-hills-part-2-8a209905d3de">https://medium.com/@Powersaurus/journey-into-the-hills-part-2-8a209905d3de</a></p> <p>Controls:</p> <p>X - Regenerate landscape<br /> Left/Right - change graphics mode<br /> Up/Down - change amount of randomness</p> https://www.lexaloffle.com/bbs/?tid=28925 https://www.lexaloffle.com/bbs/?tid=28925 Fri, 03 Mar 2017 13:17:16 UTC Amateur Cat High Five Challenge <p> <table><tr><td> <a href="/bbs/?pid=37520#p"> <img src="/bbs/thumbs/pico37519.png" style="height:256px"></a> </td><td width=10></td><td valign=top> <a href="/bbs/?pid=37520#p"> Amateur Cat High Five Challenge 1.1</a><br><br> by <a href="/bbs/?uid=12213"> Powersaurus</a> <br><br><br> <a href="/bbs/?pid=37520#p"> [Click to Play]</a> </td></tr></table> </p> <p>Hi all!</p> <p>This is my first finished PICO-8 cart.</p> <p>Its an arcade game where you high five and fist bump cats.</p> <p>High five the cats with your hand moving at speed for more points. Build up a combo to get a chance to pull off a secret handshake.</p> <p>Controls:</p> <p>Arrow keys - move hand<br /> X - Switch arm position<br /> C - Switch between open hand and fist</p> <p>This is version 1.1 - I tweaked the hit detection for high fives and added a tutorial skill level.</p> <p>Hope you enjoy it! :)</p> https://www.lexaloffle.com/bbs/?tid=28839 https://www.lexaloffle.com/bbs/?tid=28839 Thu, 16 Feb 2017 12:19:38 UTC