Making Graphics Like it's 1993
Posted by sklopec 8 days ago
Comments
Comment by Teslazar 7 days ago
Comment by pragma_x 7 days ago
I feel like the idea of fixed-point is under-utilized and very under appreciated. There are loads of applications where this is a better choice, let alone more performant.
Comment by dhosek 7 days ago
Comment by Const-me 6 days ago
Not anymore. On modern hardware, the only operation where integers win is single cycle add/sub. For the rest of operations (multiplication, division, square roots, etc.) floating point is faster, sometimes by a lot.
Comment by rasz 5 days ago
Comment by Const-me 5 days ago
I’m not sure that trick going to work in the context of computer graphics. To transform vectors or multiply matrices you need a mix of multiplications and additions, or an equivalent sequence of FMAs.
Comment by rob74 8 days ago
Comment by badsectoracula 8 days ago
The Build engine didn't use BSP, it treated connections between sectors as portals and rasterized the walls as (90 degree rotated) trapezoids while performing clipping against those portals. This allowed it to have dynamic wall geometry (e.g. moving trains, rotating light fixtures, etc) as well as "room-over-room" setups as long as you couldn't see both rooms at the same time (in both Blood and Shadow Warrior they found a workaround for it allowing to create more "3D" spaces by making identically shaped sectors with the floor of one sector acting as a portal to the ceiling of the other sector - supposedly this wasn't "natively" supported by the engine, but it was flexible enough for the game studios who used it -without even having access to the source- to do it themselves).
The first level of Duke Nukem 3D does use a few Build tricks - e.g. another one is that sprites can be "axis aligned" instead of following the camera and they can also have collision - this can be used to create rudimentary 3D geometry by treating each sprite as an axis aligned quad and in the first level it is used to make a bridge between two buildings (right before the level exit button).
Comment by kridsdale1 7 days ago
Comment by ant6n 7 days ago
If I were to do a raycaster today, I would use convex sectors with portals, basically like duke nukem, but constant wall heights. You can do drawing very simply by just doing a linear pass across the sector, recursively stepping into other sectors.
Then you can at least do arbitrary level geometries.
Comment by badsectoracula 7 days ago
The engine used Build/Doom-like maps and would simply raycast against the camera's current sector (sectors could be any shape not just convex) and used connections between sectors as portals to recursively follow the (2D) map until it hit a solid wall - so basically Build's portal rendering approach except using raycasting instead of trapezoid rasterization. It could also do sprite rendering (you could have both sprites facing the camera and "aligned" sprites that could be used for decals) and even had some simple 3D model rendering (the triangles were sorted and clipped against the portal during rasterization). Unfortunately Flash isn't available in browsers anymore and Ruffle isn't compatible with it (it can run the engine -much slower than real Flash- but the palette is all wrong), so i took some shots using the standalone Flash "projector"[1][2][3][4]. Also making maps for it was certainly much more laborsome than making maps for a Wolf3D-like game and that combined with me losing interest in making Flash games meant i never made a game with it.
[0] https://www.youtube.com/watch?v=Z81NhEbl3q8
[1] http://runtimeterror.com/pages/iv/images/01feb493af6dd3184b8...
[2] http://runtimeterror.com/pages/iv/images/136a8753b211ed7e3d1...
[3] http://runtimeterror.com/pages/iv/images/84c2012258982b82053...
[4] http://runtimeterror.com/pages/iv/images/e94cc334c7735e1aacb...
Comment by bananaboy 7 days ago
Comment by ant6n 7 days ago
Btw, 286 played wolfenstein rather poorly. The 386 is rather more appropriate.
Wolfenstein was built in a couple of months by a then 21-year-old Carmack. He didn't focus on optimizing levels until Doom.
Comment by bananaboy 7 days ago
It's true that Carmack has said several times, including in the readme to the source release of Wolf3d [0], that a BSP-based renderer might be faster than raycasting. He used a BSP tree based renderer for the SNES port of Wolf3d because the CPU was even slower, so I suppose that answers it! There's also a note in the GEBB page 164 from Carmack where he says it was slower than "looping through a few long wall segments". [1]
Early alpha versions of DOOM used a sector-based rendering technique, maybe like what you're describing, which ultimately was too slow [2]][3]. Then Carmack switched to BSP trees after doing the Wolf3d SNES port.
I think it would be pretty interesting to implement the same game with both a raycasting approach and a BSP or Build-style portal/sector approach and compare performance on a 386. DOOM ran terribly on a 386 but it did a lot more than Wolf3d, so it's not a great comparison. Catacomb 3D didn't use raycasting (it used a wall span rendering techniqe) and ran better than Wolf3d on similar hardware, but it had a bunch of glitches. But Carmack says they were due to lack of experience rather than the technique itself.
Anyway thanks for challenging my assumptions. This'll go on my todo list!
[0] https://github.com/id-Software/wolf3d [1] https://fabiensanglard.net/b/gebbwolf3d.pdf [2] https://youtu.be/NnkCujnYNSo?t=1592 [3] https://doomwiki.org/wiki/Doom_rendering_engine
Comment by ant6n 6 days ago
I think they main concern when doing sectors + portals for a wolf3d-type 3d engine is how much word is done when 'stepping into' portals. basically it requires changing the clipping range [x0, x] of the portal, and quickly finding the next visible wall segment. the clipping could actually be done in 'angle space', not even using vectors. That is, wall edges/"vertices" should be represented as [angle,distance]. I have also been thinking about how much of that math pipeline could be done using specialized 8-bit values and LUTs.
I have been thinking about trying to get something running on very slow hardware, although at some point the problem is more drawing on the screen quickly, not the renderer.
Comment by jamesfinlayson 7 days ago
Comment by torginus 7 days ago
Comment by bluedino 8 days ago
Blake Stone Rise of the Triad used later versions of the Wolf3D engine and had textured floors/ceilings
> Doom and IIRC Duke Nukem as well used a BSP engine which was much more flexible
Duke Nukem (Build engine) did not use BSP
Comment by debo_ 7 days ago
Comment by Grumbledour 8 days ago
Comment by kridsdale1 7 days ago
Comment by mrob 7 days ago
To work around this, people used an unofficial tool to patch the maps to support transparent water:
Comment by NBJack 7 days ago
Comment by classichasclass 7 days ago
Comment by akoboldfrying 7 days ago
Comment by scrumper 8 days ago
Comment by torginus 7 days ago
With the data structure being more efficient, and doing less overall work, I think this part of the Doom/Duke engine might even be faster than than Wolf3D
Comment by torginus 7 days ago
For floors, unfortunately there's no such luxury, and if I remember correctly DOOM subdivided floors into patches, and only did proper perspective at the corners, and interpolated inbetween.
Comment by Jare 7 days ago
The BSP may have led to some floor subdivisions, especially as it needs convex sectors. I don't remember if the engine would coalesce adjacent floor spans into a single one, but I hope it did.
Comment by torginus 7 days ago
Comment by tadfisher 7 days ago
And it looks to me like we are mapping each row with a constant y, calculating the "distance" (thus scale factor) only once using just the vertical slope for the row.
Comment by torginus 7 days ago
Comment by Jare 5 days ago
Comment by mkl 7 days ago
Comment by HerbManic 7 days ago
So while it didn't have custom processors for sprites and background layers it meant there wasn't a rigid fixed function nature to what the PC could do.
By the mid-late 90's with dedicated 3D processor this wasn't an issue any more but there was a brief time in the early 90's where there was this wonderland of unique visual rendering.
Comment by badsectoracula 7 days ago
Though your extender could make things a little more annoying on that front :-P
(DJGPP and Free Pascal -which use the same "go32" extender by DJ Delorie- do not do a full linear mapping so you need to do a bit more juggling to get stuff on screen there)
Comment by 1313ed01 6 days ago
Also some (more) free (open source) 16-bit C-compilers now, like the ia16 gcc port and Microsoft's C compiler included in the MS-DOS repo on GitHub.
Not that 32-bit extenders do not come with some advantages, but I enjoy the simplicity of 16-bit.
Comment by badsectoracula 6 days ago
Comment by russdill 7 days ago
Comment by mkl 7 days ago
Comment by pan69 7 days ago
Comment by russdill 7 days ago
Comment by corysama 7 days ago
If you want to get inspired by what can be done with palletized framebuffers check out http://www.effectgames.com/demos/canvascycle/ (click Show Options) and the GDC presentation by the artist https://youtu.be/aMcJ1Jvtef0
With that you can fire up https://github.com/mriale/PyDPainter for that classic Deluxe Paint IIe vibe. Or, https://www.aseprite.org/ for something more modern.
Comment by yunnpp 7 days ago
Comment by TazeTSchnitzel 7 days ago
Comment by bellowsgulch 7 days ago
But maybe a software renderer and SDL_Texture could preserve it?
Comment by pan69 7 days ago
int s = y*screenRect.w;
for (int x = 0; x < screenRect.w; x++) {
pixels[s + x] = argb(255, frame>>3, y+frame, x+frame);
}Comment by kmill 7 days ago
Comment by canyp 7 days ago
The even faster version, opts aside, would be to initialize the pointer at y*screenRect.w and ++ at every loop to avoid the addressing arithmetic.
Comment by kmill 7 days ago
Take a look, GCC and Clang go further than these suggestions by adding screenRect.w to the pointer each iteration to avoid the multiplication: https://godbolt.org/z/YfroqK7T6
Writing anything but pixels[y*screenRect.w + x] in an attempt to be faster, without checking the assembly first, is obfuscation.
(For what it's worth, you can beat the compiler by using *pixels++. I didn't profile the code to check it actually was faster in practice however.)
Comment by rob74 8 days ago
Comment by embedding-shape 7 days ago
It's not that rare, is it? Off-hand, and very mainstream; Perfect Dark, Mirrors Edge, Dishonored (don't remember if it's the first or second one), Metroid and more are all kind of "shooters" with female protagonist, although maybe Mirror's Edge is more just "first-person" than "shooter" to be 100% accurate.
Not to mention the large selection of "RPG + FPS" where you can be either man or woman.
---------
Seems the author also realize the thing with the pattern and likely gender of the cat:
> After all, I do need to give the protagonist his fair share. [image] (Yes, I know it's a female, but call it convention rooted in dialect.)
Comment by EvanAnderson 7 days ago
Edit: I completed forgot Chell from Portal, too!
Comment by wsc981 7 days ago
https://unrealarchive.org/wikis/the-liandri-archives/Prisone...
Comment by amiga386 7 days ago
https://unreal.fandom.com/wiki/Prisoner_849
> The character of Prisoner 849 is commonly speculated to be Gina, as her model (Female 1) and skin are the first character to appear in alphabetical order; this is even reinforced by UnCreature giving the female player a bio while the male player bio just reads "See Female Player". However, the character of Prisoner 849 is completely up to the player's choice, hence the use of neutral nouns in this article.
Comment by KerrAvon 7 days ago
Comment by egypturnash 7 days ago
Comment by wild_egg 7 days ago
If you tally all the FPS releases in a given year, a supermajority are going to have male protagonists.
Comment by amiga386 7 days ago
Mirror's Edge has a female protagonist, but it's not an FPS (First Person Shooter). It's a parkour simulator which technically lets you shoot a gun in limited sections of the game, but the protagonist is a pacifist and you get a bonus for decommisioning guns rather than firing them.
If the thread would like some hard data:
- 19,526 games on Steam tagged "female protagonist" https://store.steampowered.com/search/?tags=7208&ndl=1
- 13,578 games on Steam tagged "FPS" https://store.steampowered.com/search/?tags=1663&ndl=1
- 727 games on Steam tagged both "female protagonist" and "FPS" https://store.steampowered.com/search/?tags=7208%2C1663&ndl=...
So it looks like the two categorisations, for the most part, don't intersect.
Notable counterexamples would include Rise of the Triad, Ion Fury, No One Lives Forever, Wolfenstein: Youngblood and Far Cry 6, but definitely rare. You'd be clutching at straws to describe Portal or Alien: Isolation as FPS (they're a puzzle game and survival horror game respectively), likewise the Resident Evil / Clock Tower / Fatal Frame / etc. games with the novelty option of switching to first-person view, they're naturally third-person perspective. Left 4 Dead has one female character out of four you can play. You might count that one DLC for Bioshock: Infinite where Elizabeth gets a shot (https://www.youtube.com/watch?v=1E1lh-pb6Is). You might count the few FPS RPGs that there are with customisable characters (so yes Fallout, but not Mass Effect as it's third-person). But female protagonists are massively more prevalent in survival horror, metroidvania, third-person shooters (Tomb Raider, Monster Hunter, Horizon Zero Dawn, etc) and other genres besides FPS.
Comment by shakow 7 days ago
You probably didn't play many FPS recently: from the top of my mind, CS2, Battlefield {1, V, 6}, CoD {BO3, Vanguard, MWIII}, Control, the Borderlands, Far Cry {5, 6}, CP2077, Fallout {3, NV, 4}, Destiny, Prey, Valorant, Rainbow 6, Apex, Overwatch, all have female player characters.
And if CS2/CoD/BF/Valorant/Destiny/Apex have female players, that's more or less 90% of the current market.
I took a glance at the the most played FPS list from Steam[0], but I was too lazy to scroll far enough to find one without a playable female character.
Comment by embedding-shape 7 days ago
Choosing one specific example when I also made more recent ones, isn't such a big dunk you think it is.
> If you tally all the FPS releases in a given year, a supermajority are going to have male protagonists.
Sure, I agree, I'm not saying it's more popular, just that I don't think it's that rare, but I guess ultimately I'm a bit nitpicky (sorry) and we're just disagreeing with the specific definition of "rare".
Comment by 1313ed01 6 days ago
Comment by dabluecaboose 7 days ago
No, this isn't a Perfect Dark game
Comment by kridsdale1 7 days ago
Comment by badsectoracula 8 days ago
[0] https://store.steampowered.com/app/1592280/Selaco/
[1] https://store.steampowered.com/app/1693280/Supplice/
[2] https://store.steampowered.com/app/1378290/The_Citadel/
[3] https://store.steampowered.com/app/3371240/Beyond_Citadel/
[4] https://store.steampowered.com/app/2443360/Zortch/
[5] https://store.steampowered.com/app/3807500/Zortch_2/
[6] https://store.steampowered.com/app/1051690/Nightmare_Reaper/
[7] https://store.steampowered.com/app/1785940/COVEN/
[8] https://store.steampowered.com/app/1406780/Viscerafest/
[9] https://store.steampowered.com/app/1072150/Hedon_Bloodrite/
Comment by stronglikedan 7 days ago
Comment by egypturnash 7 days ago
"boomer shooter" + "female protagonist": 106 matches.
So a bit less than 1/10 of the games tagged with "boomer shooter". With your caveats above about being able to choose a gender, or a single brief segment where you're a lady in a game where you're mostly a dude. Is that a lot? I dunno, doesn't feel like a lot to me. Probably feels like a lot to the people who inevitably show up in the Steam discussions of any successful game that makes you be a lady for most of its length and complain about it being "woke", even one game with a female protagonist seems to be too many for them.
Comment by badsectoracula 7 days ago
Comment by lo_zamoyski 7 days ago
Comment by jimjimjim 7 days ago
Hollywood's depiction of action movies in general is unrealistic. Stereotypical Good Guy gets in a fist fight with a Random Thug, and after trading blows for a while the Good Guy knocks out Random Thug and carries on with the rest of the movie without a problem. No bruising, no eye swelling shut, no broken ribs restricting movement or breathing, no loose teeth, no broken fingers, no sore wrists from mis-angled punches.
Comment by canyp 7 days ago
Comment by kridsdale1 7 days ago
Comment by canelonesdeverd 7 days ago
So, a videogame?
Comment by ferguess_k 7 days ago
Comment by kridsdale1 7 days ago
I have no idea the names of nearly anyone but a CEO or lead Director in the games industry of the past 15 years.
Comment by ferguess_k 7 days ago
Comment by robterrell 7 days ago
Comment by shakow 7 days ago
Comment by EvanAnderson 7 days ago
Comment by ferguess_k 7 days ago
Comment by keithnz 7 days ago
random example from the Atari 800xl https://www.youtube.com/watch?v=uPjLZ4MVKCc (you can see how slow it is to draw a scene, but the animation effect due to pallete rotation is really fast).
Comment by ferguess_k 7 days ago
Comment by itomato 7 days ago
Comment by evolve2k 7 days ago
Comment by mysterydip 8 days ago
Comment by qingcharles 6 days ago
Comment by phkahler 7 days ago
Those kind of constraints can lead to increased creativity, and can also influence the overall style of a game. It's part of the reason early 80's arcade games had so much diversity.
Comment by boricj 7 days ago
It's refreshing to dust up trigonometry and good old low-level optimization tricks. When the scratchbuffer has 1 KiB and the stack can only use a fraction of that, it makes me realize how spoiled I'm at work with the microcontrollers we have, with threads being allocated 8 KiB of stack and backtraces with over 50 functions of C++ templates on it.
Comment by gotski 7 days ago
I think the mix of highly rational reasoning and "it just feels right" is a killer combo too, it gives a rigorous basis for a lot of the decisions made, while also allowing for a strongly personal aesthetic to emerge. Very cool indeed.
Comment by trumpdong 8 days ago
Comment by zackmorris 7 days ago
I consider 1993 the last "good" year of the pre-internet age. The web didn't go mainstream until around 95, and 94 felt like a liminal year (dunno why). In 93 one could still wrap a plaid shirt around one's waist without fear of ridicule. Grunge and alternative music hadn't quite landed in rural America yet, although we didn't know what we were missing. The Telecommunications Act, Digital Millennium Copyright Act (DMCA), Gramm-Leach-Bliley Act, USA PATRIOT Act, and so many other regressive/draconian laws hadn't passed yet to create the wealth inequality consuming the American Dream today. Although the Grand Upright Music vs Warner Bros decision had happened in 91 in an attempt to destroy hip-hop for racist reasons under the guise of protecting copyright. The Rodney King beating had happened the year before, but the OJ trial was still 2 years away. We were blissfully ignorant of the very ignorance and hate that would put us on this alternate timeline. It was like living in the Shire before the War of the Ring.
I can't stress enough how games like Wolfenstein 3D and DOOM completely blew our minds. They came out about 6-7 years before The Matrix, so the closest conceptual framework we had for it was probably The Lawnmower Man. Virtua Racing and Virtua Fighter came out about that time, but somehow couldn't compare. I remember using a drafting program on a 33 MHz PC with a 16 color monitor in drafting class, and DOOM revealed that even then, computers were running hundreds of times slower than they were capable of (millions of times slower today).
If I could go back to any time with what I know now, it would be spring of 93.
Comment by zackmorris 6 days ago
We did use magenta and colors near it for reserved pixels that would never be seen onscreen, but in our case it was for color animation. The Mac couldn't do full-screen palette animation in a way sanctioned by the OS, because Apple arbitrarily inserted an internal wait for the vsync monitor refresh interval in all of its palette functions, with no way to disable it or directly access the low memory variables that controlled the color lookup table (CLUT) like on the PC. So an empty main loop with palette animation ran at 60 fps, but doing any draw calls at all caused a timing miss which dropped it to 30 fps, while the CPU sat at about 50% idle. Our games redrew the whole screen anyway, so we opted to translate pixel colors on the fly via our own lookup table instead.
Apple also didn't provide OS calls for page flipping (to draw the next frame of animation while the current one is shown to double the frame rate), probably by design to maintain the Mac's image as a "professional" desktop computer, because such tricks were well-understood in the gaming industry. Or video resolutions below 640x480 (sometimes 512x384 on certain models).
Apple also tended to ship machines with half-width busses (supposedly to reduce cost) like the Mac LC, which reduced memory bandwidth so much that full-screen scrolling was difficult to achieve.
Those decisions prevented the Mac from becoming a performant gaming system, even though the RISC-like 68k chip with its numerous registers, predictable instruction set format and unsegmented memory were far superior to PC architecture at the time IMHO.
Later PowerPC chips like the 603e had a cache misalignment issue where double-width 8 byte memory copies that weren't 8 byte aligned ran at about half speed (probably using 2 copies internally) so I think we had to drop down to single-width 4 byte copies or use a cache hint function to disable caching while copying image buffers, which ran slightly slower.
Notable snafus included years-long delay of support for newer OpenGL versions, so we were stuck with fixed-pipeline 1.x calls long after the PC was exploring shaders. Then iOS only supported OpenGL ES, with no real reason not to offer an ES compatibility layer on desktop, necessitating support of 2 codepaths. Instead of remedying that stuff, they introduced Metal, which nobody asked for.
Not to mention deprecating wide swaths of the OS, forcing rewrites from MacOS 8 to 9 (Carbon), then from 9 to X (Cocoa), then from MacOS to iOS (Objective-C and Swift). Don't forget the 68k to PowerPC to Intel to ARM chip migrations, which forced developers to be aware of endianness issues, which greatly increased the complexity of reading/writing binary files.
Combining all of those permutations, MacOS software would often only survive perhaps 3 years before needing a rewrite. I probably have 10 times as many applications (mostly old games) on my Mac with a no-smoking sign through them as runnable applications.
I'm reminded of the expression "lemons for the price of peaches". The outer elegance of the Mac obfuscated the underlying byzantine layers. Denial became woven into the Mac experience, so much so that developers took a certain level of trauma to keep up appearances. I know I did. That's why I got out of the biz in the early 2010s after so many of our games that we put so much work into turned out to be commercial failures. We might have made 10 times more money targetting the PC, and conceivably 100 times more if we had cross-platform resources like Unity and Steam.
I bring this stuff up because rose colored glasses often obscure what really happened. Especially now with political insiders and the media producing so much revisionist history. Stuff we remember as cutting-edge manifested because the state of the art at the time was so abysmal.
I look around today and I see a whole lot of assumptions being made that this is all there is. That the current path of tech is the one true way. When nothing could be further from the truth. We're ruled by powerful duopoly forces presenting the illusion of choice, when all eggs are in the GPU basket. But do they use GPUs on Star Trek? Probably not.
Comment by hankbond 7 days ago
Comment by canyp 7 days ago
I'd be curious to know in more detail what exactly is going on there. I guess the box sharpening is where most of the beef is.
Comment by dhosek 7 days ago
⸻
1. I suppose some hand-written PostScript code might count as well, but I wouldn’t really count things like doing a simple function graph in python to explain something to my son as graphics programming.
2. This was for a DVI previewer running on an IBM mainframe running VM/CMS. As far as I know, this code is completely lost, which is probably a good thing.
Comment by nticompass 8 days ago
Comment by ant6n 7 days ago
Comment by wuliwong 7 days ago
I thought I could really level up with Claude and I started working on a boxing game. It's been a total disaster. .·°՞(˃ ᗜ ˂)՞°·.
Comment by ogurechny 7 days ago
Some details are a bit too cool for 1993, though, and assume high frame rate (won't work that well at low fps). Smooth weapon animations with a lot of frames, tiny per-pixel effects on bullet holes and flash sprites, smooth movement and object position calculations that use precise math instead of fast rough estimates resemble Chasm: The Rift or Quake (the concept of idle animations, e. g. objects moving in the starting view of difficulty selection room, assumes that there is some performance to waste on details that make the world less empty).
Comment by mempko 7 days ago
Comment by Terr_ 7 days ago
This is my complaint with a lot of "graphical enhancement" mods for games like Deus Ex.
Unless they touch everything, the inconsistent level of detail is worse than consistently low-res meshes/textures.
Comment by kylemaxwell 7 days ago
Comment by rezmason 7 days ago
The flight simulator / magic carpet easter egg in Microsoft Excel 97 used that same shaded-colormap palette trick, plus some dithering:
https://rezmason.github.io/excel_97_egg https://rezmason.github.io/excel_97_egg/about.html
I'm impressed by your sprite pipeline and gibs animations. Your attention to detail and navigation of constraints have really paid off, I can't wait to play this sometime
Comment by Agentlien 7 days ago
But what really stood out to me is this line.
> a linear frame buffer where each pixel was represented by a single byte indexing into a palette of 256 colors.
Of course this is nothing new, but it just really struck me because I've been working on a blog post about texture representation on modern consoles and it is crazy how complex it has gotten: texture tiles, block compression, non-linear texel ordering (e.g. Morton order), ...
Comment by purple-leafy 7 days ago
I made a very similar project [0] in C 2 years ago, a chunked ray caster that could handle multiple height levels. Was one of my first C projects, pretty crappy but was fun.
Anyone have any ideas how to make it more memory efficient?
It’s full of bugs was just a for fun project
[0] - https://github.com/con-dog/chunked-z-level-raycaster/blob/ma...
Comment by blackhaz 8 days ago
Comment by garganzol 7 days ago
Comment by badsectoracula 8 days ago
I did write a tool for generating the sprites from 3D models though[2]. It uses plain old OpenGL 1.1 to draw the sprite and grabs the framebuffer directly. It is drawn fullbright so i can paint the lighting directly on the sprite's texture (using a Krita plugin i wrote[3][4] - the model is something i threw together with Blender's default generated UV since i didn't care for the details).
I wonder if doing some sort of postprocessing (after rendering with with shading) like you do with your game would help with the finer details since i also found that rendering from 3D models to sprites creates very "mushy" results most of the time because of all the details getting lost. I notice the colors also become more saturated after postprocessing in your examples, is this after it finds the closest color in the palette or the result of the postprocess? I'd like to keep the overall hue+saturation of the model so maybe doing post-processing on a grayscale render to shade the shadows/dark areas but keep highlights as-is and then multiplying that with the fullbright image would produce results that wont shift the saturation.
[0] https://bad-sector.itch.io/post-apocalyptic-petra
[1] https://codeberg.org/badsector/PetraEngine/src/commit/14ca16...
[2] http://runtimeterror.com/pages/iv/images/95ddebc51e4dfa8a5af...
[3] http://runtimeterror.com/tools/kritaview3d/
[4] http://runtimeterror.com/pages/iv/images/535f0e09e590d8a1731...
Comment by sklopec 8 days ago
It's the result of the Blender compositor postprocessing, just keep in mind it falls apart once you go low enough in resolution (it's an image space thing after all), so I'm not sure if that helps your case.
EDIT: Also, your project is very cool!
Comment by Panzerschrek 7 days ago
I don't think someone used this approach in 1993. Textures were drawn by hand. But I think it's still fine to use such modern way of generating textures, since it may produce better-looking result.
Comment by fabiensanglard 7 days ago
Comment by renyicircle 7 days ago
Comment by progforlyfe 7 days ago
Comment by sgt 8 days ago
Comment by cautiouscat 7 days ago
This is an extremely detailed article on every level and I can’t wait to deep dive into it. Marko really nailed the “old” look but it still looks fresh and new.
Comment by mrob 7 days ago
Comment by massifist 7 days ago
EDIT: Oh nevermind. I guess brightmaps are more flexible.
Comment by Panzerschrek 7 days ago
I suggest to use not only darker variants, but also brighter ones - for bright map areas and maybe for some lighting effects like flashlight.
Comment by badsectoracula 8 days ago
Comment by low_tech_love 7 days ago
Comment by trashb 7 days ago
The author seems to consider open-sourcing the engine, I would also be interested in the mentioned scripts for asset creation. Those scripts would make a great toolset for asset creation in this style.
Comment by jonoxtoby 7 days ago
Comment by Levitating 7 days ago
Comment by microtonal 7 days ago
Comment by cosiiine 7 days ago
Comment by binaryturtle 7 days ago
Comment by wonkyfruit 7 days ago
Comment by harel 7 days ago
Comment by jiffygist 7 days ago
Comment by Panzerschrek 7 days ago
It's sad. That's why I never finished playing Wolfenstein 3D - it looks too boring. In the other hand I enjoy playing Doom, mods for it and games using its engine.
I hope the author can still add some improvements to allow such boring look typical for raycaster engines.
Comment by nopurpose 7 days ago
Comment by pragma_x 7 days ago
Comment by mrob 7 days ago
Inconsistent resolution isn't necessarily a bad thing, e.g. Elite for the BBC Micro changes video mode part way down the screen so it can display both high resolution monochrome wireframe 3D and a lower resolution color map/UI below, but it's not idiomatic to the MS-DOS style this game is going for.
Comment by reifcode 7 days ago
Comment by TheAmazingRace 7 days ago
Comment by Felger 7 days ago
(Nice job, seriously)
Comment by wazoox 7 days ago
Comment by functionmouse 7 days ago
what's unreasonable about this though?
Comment by zerr 8 days ago
Comment by pjs_ 7 days ago
Comment by relativeadv 7 days ago
The comments here are a cesspool unfortunately. People bickering about pronouns used for cats, how many shots it takes for a vase to explode, or whether or not some circa-1993 software was used or mentioned.
Comment by test1072 7 days ago
Comment by vkaku 6 days ago
It doesn't look like slop at all, and it looks like it actually is. Could have been used to generate art assets, or finish something author did not have the energy to do before. Nobody cares if that was the case. Why the hate towards AI even?
Comment by perfect_wave 7 days ago
Comment by RishiByte 7 days ago
Comment by jadecarter68 6 days ago
Comment by WhoAteSnorlax 7 days ago
Comment by tobadzistsini 7 days ago
Comment by akoboldfrying 7 days ago
Comment by mg794613 7 days ago
What I don't like is to see claims like "no AI slop"
And yet it's riddled with emdashes and language "by hand"
Seeing the skills of the writer, he definitely should be able to, but then I don't understand the claim.
Comment by engcoach 7 days ago
Comment by ch_sm 7 days ago
Comment by Supermancho 7 days ago
> If this sounds unreasonable to you, that is because it is.
Those listed, are tame. I don't understand this kind of faux modesty.
> My goal was to build a complete, shippable first-person shooter using techniques that were common in the early 90s
Goes on to explain how they used 3D blender...which wasn't available until 1998.
A vanity cat project being tailored and submitted for nostalgia clickbait. I don't think there's anything useful to take away from this other than some color shade selection ideas.
Comment by mrob 7 days ago
In the early 90s, there was enough money in this kind of software that you could have hired a specialist 3D artist to use the software that was available at the time, e.g. LightWave 3D. When it's only a single-person project, I think it's reasonable to stick with what you know.
Comment by dan-g 4 days ago
You conveniently left out the second part of that sentence:
> … modern compiler and a platform abstraction layer.
The author very explicitly laid out their constraints in a bulleted list right below; I think calling this nostalgia clickbait is infelicitous at best.
Comment by ogurechny 7 days ago
Comment by 2000UltraDeluxe 5 days ago
Comment by xyzsparetimexyz 8 days ago
Comment by sklopec 8 days ago
I think I'm gonna have to do it anyway, because some players claim they get nausea when playing at such low resolution (320x240), and the only way to give them higher resolutions that perform reasonably is to have it hardware accelerated.
Renderer is abstracted away already, but the real difference would probably be occlusion culling... With raycasting, I get it for free, but if I'd go down the hardware accelerated path I'd have to pick something more clever.
Raycasting and software rendering in general tends to scale poorly with resolution, even with vectorization and all the bells and whistles of modern CPUs.
Comment by badsectoracula 8 days ago
As an example this[0] video shows the benchmark from Post Apocalyptic Petra running on my previous GPU (RX 5700 XT) which all it does is build a per-frame (client-side) vertex-buffer in OpenGL 1.1 (the engine was made for actual retro PCs running DOS and Win9x so it does some rudimentary occlusion culling but that mainly affects 90s hardware, not anything released since 2000 or so). If anything, the rendering has so little overhead that half of the framerate is "eaten" by the FPS counter overlay :-P.
Comment by sklopec 7 days ago
Thinking about modern games, a single character model probably has more vertices than my entire level (and yours probably), so it's definitely reasonable to expect occlusion culling for such simple geometry might actually reduce performance rather than increase it.
Comment by badsectoracula 7 days ago
Meanwhile more current games have much higher polycounts, easily going above 100K triangles - e.g. Dante from DMC5, a ~7 year old game, apparently has ~190K triangles and that had to run on the more anemic PS4/XBone hardware :-P (though i'm not sure if it used the full 190K model there or some cut down version).
[0] http://runtimeterror.com/pages/iv/images/1073c7062db40837240...
Comment by trumpdong 7 days ago
Comment by pjc50 7 days ago
Comment by xyzsparetimexyz 7 days ago
But ignoring the GPU you have on your system is boring
Comment by jonoxtoby 7 days ago