Login
You're viewing the ruby.social public feed.

Replies

  • Apr 23, 2025, 3:28 PM

    @raptor85 It's funny that a lot people tend to assume I'm using Raycasting, but I'm actually using a span renderer. I love the look of Raycasters, but making some more evolved geometry tends to get very tricky very fast.

    Do you have plans on how to tackle this? Perhaps using a 1D stencil buffer of sorts?

    💬 1🔄 0⭐ 0
  • Apr 23, 2025, 3:40 PM

    @montyontherun I actually assumed as such from the way the geometry angled, not that you can't do that in a raycaster (mine allows any angle/any elevation) but it's slower than doing it block based so wouldn't be ideal on a gba.

    I use a few tricks, my statics get sorted into the grid and do a fast sort then a slower actual cast, the moving objects are limited in number but technically ANYTHING can move. I also do employ z buffering. By being modern I also cheat a bit, I use worker threads

    💬 2🔄 0⭐ 0
  • Apr 23, 2025, 3:43 PM

    @montyontherun basically each x position is drawn completely independently in it's own thread as a vertical span then the scene is composed at the end, lets me get away with doing more accurate ray casts/ray traces for some things and have more dynamic motion, this particular engine is shooting for more the early 3d era "look" than true accuracy. I'm a big fan of games like king's field, SMT, and t he like so I was shooting for a similar look.

    💬 1🔄 0⭐ 0
  • 💬 1🔄 0⭐ 0
  • Apr 23, 2025, 3:50 PM

    @montyontherun just basic thread pooling, when my engine starts up it queries the cpu, creates a bunch of basic worker threads that pause until you trigger them by passing a function to them, once triggered they execute the function (which just takes a pointer to the renderer object, camera, map file, and current x position)

    💬 2🔄 0⭐ 0
  • Apr 23, 2025, 3:53 PM

    @montyontherun the nice thing about how raycasting works is each vertical slice needs to know NOTHING about any of the others so it's pretty easy to run them in parallel. I do use a kinda weird algorithm for floor and ceiling though as obviously a horizontal fill (which is normally faster) won't really work with this setup, plus I do variable ceiling/object heights. The math itself is all pretty straightforward though.

    💬 0🔄 0⭐ 0
  • Apr 23, 2025, 3:54 PM

    @raptor85 Ah, I was under the impression this was the 486 version.

    But very cool none-the-less. How about the context-switching costs, doesn't it add up?

    💬 1🔄 0⭐ 0
  • Apr 23, 2025, 3:58 PM

    @montyontherun if doing just a mundane grid based raycast (like a classic raycaster) it's very slightly slower than just executing in sequence, but the gains in speed in doing it parallel go up considerably the higher the render resolution and as I'm using complex moving objects that don't align to the grid those are FAR slower without calculating them in parallel. (the engine supports any polygonal shape at any size/height with full UV mapping of textures)

    💬 1🔄 0⭐ 0
  • Apr 23, 2025, 4:09 PM

    @montyontherun doesn't show up the best in a still but I'm also doing a bit of post processing and blending of a few passes, so it looks less like a "real" saturn/ps1 era game but more like your nostalgia makes you think they looked like. (also has a full dynamic lighting engine).

    💬 1🔄 0⭐ 0
  • 💬 1🔄 0⭐ 0
  • Apr 23, 2025, 4:15 PM

    @montyontherun so...funnily enough one of the two "engines" i'm using to get that look is an actual NTSC encoder, I'm encoding and decoding frames to force the color blending and glitching, then the final raster is drawn to the screen as continuous scanlines. I intended to for to look as close to CRT as possible without having the proper hardware (I DO have the proper hardware and do test it though, but I figure not everyone has a bunch of CRTs and a retrotink 4k like I do, lol)

    💬 0🔄 0⭐ 0
  • Apr 23, 2025, 3:44 PM

    @raptor85 Nice solution for things!

    For now, I only support 45-angles and peg everything to grids (since my vis-sorting assumes the occlusion will respect the boundaries of cells).

    The beauty is that I rely mostly on integer math and only use fixed point for the actual rasterization (in fact, I have a version that's pure integer math, running on Z80 and 68K machines).

    But if you ask me after a beer or two, my next project will probably use a more general portal-rendering approach ("Duke3D")

    💬 1🔄 0⭐ 0
  • Apr 23, 2025, 4:18 PM

    @montyontherun I honestly love writing z80 and m68k code, I have a stack of brand new z80's on my desk I scooped up when zilog issued that they were going to stop production....just in case.

    💬 0🔄 0⭐ 0