VOGONS


First post, by badsectoracula

User metadata
Rank Newbie
Rank
Newbie

...and other platforms too 😜.

yK4CWms.png

Post Apocalyptic Petra is a 3D adventure/exploration/platforming game i originally made for the MS-DOS Game Jam #2 in 2020 and i've been tinkering with it ever since - mainly porting in to new platforms, fixing bugs and improving performance (the game itself is pretty much the same as the original jam release). I consider making a topic about it here, but i didn't remember my password of my older account (made it years ago) and i never received a confirmation mail (i might have used some email that i lost access to) so it wasn't until some months ago that i decided to make a new account - and then i wanted to wait until a new release to make a topic about it. Took me around a year to make that release since the last version, but here is version 0.99o of the game 😀.

In Post Apocalyptic Petra you play as Petra who wakes up in some mostly empty room by a robotic voice telling her that he (the computer) received a signal from an external source and that she should find an exit from the facility - but as the place isn't in the best of conditions and the computer does not have access to any other systems, she'll have to do everything by herself. Meanwhile Petra has no idea what is going on or why she's there, but the notes left behind in "note disks" that can be used in computers found in each of the levels can help put some pieces together.

This version has several changes from the last versions, mainly around improving performance (i was able to finish the game on a 133Hz Pentium laptop i have here), especially for the software renderer (i replaced the hacky PVS it had with portals and storing the wall polygon spans for performing occlusion queries during the next frame to avoid rendering invisible meshes - especially important since when i made the game i went a bit overboard with some meshes 😜), and fixing bugs.

Also added a "-bench" parameter to run a simple benchmark (the camera flies a bit around the first few rooms -which are the heaviest of the game- of the first level).

On the site above you can find downloads for various OSes and the source code in Free Pascal. Note that not all targets have the latest version but the game plays fine in the older versions anyway. The DOS and Windows versions are the latest ones. There are also builds for the editor for Windows (needs at least Windows 2000) and Linux (needs Gtk2 libraries).

Note that to play the game on DOS you need at least a Pentium around 133MHz (the lowest-end i've tried) though i'd recommend a 200MHz or 233MHz CPU. For smooth 70Hz you'd need a faster PC though - or you can try a 3D accelerator with the Direct3D Windows version (it needs Direct3D 7, though it should work fine with a Voodoo 1). For audio only Sound Blaster 16 is supported at the moment (might add "plain" SB support at some point since several late 90s/early 2000s Windows 9x systems emulate that instead of SB16).

Also note that it wont work with DOSBox 0.74 due to (i guess) RDTSC. Seems to work with DOSBox SVN and DOSBox-X though.

I'm curious about comments and any benchmarks you can post to see how it behaves in hardware out there 😀.

Reply 1 of 18, by Garrett W

User metadata
Rank Oldbie
Rank
Oldbie

hey BadSector, good to see you here! We've known each other from another, now defunct PC magazine and associated forum 😉

I played this one some months ago on a Pentium III 500 and Voodoo3 and I wanted to tell you that I really enjoyed it, great nostalgia trip! Though I think I got stuck pretty close to the end and never got to see how the game ends 😒 . It reminded me a lot of Excalibur 2555 AD, was it an influence?

Reply 2 of 18, by badsectoracula

User metadata
Rank Newbie
Rank
Newbie
Garrett W wrote on 2022-06-03, 12:13:

hey BadSector, good to see you here! We've known each other from another, now defunct PC magazine and associated forum 😉 [...] It reminded me a lot of Excalibur 2555 AD, was it an influence?

Hey 😀.

No, Excalibur 2555 AD wasn't really an influence, it was more Tomb Raider, in fact initially i was planning on making it primarily a platformer (what i had in my mind was Tomb Raider without the shooting bits - which i never liked in Core's TR games anyway) but that ended up requiring too many animations - and GOG had the Dishonored trilogy released during the jam period, which didn't help 😜 - so i decided to add more adventure/puzzle elements. That said, Excalibur 2555 AD there was a tiny influence in that i wanted to add some inventory puzzles (and was thinking of that game), which is why you actually have an inventory you can see, but didn't have time implementing those (hence even though you can see the items you collect in your inventory you can't do anything with them in the inventory screen).

I might do something Excalibur-ish at some point though as despite its reception i liked that game (then again i got it used on ebay after playing a demo from archive.org, dunno how i'd react if i paid full price for it back when it was new). Though if i do i'll try with either better combat (IIRC the combat in Excalibur 2555 AD is essentially the same timed attacks that play the same way for the entirety of the game) or no combat at all and focus on puzzles again 😜.

Reply 3 of 18, by Garrett W

User metadata
Rank Oldbie
Rank
Oldbie

Yeah, Excalibur was pretty rough, but I love the cheesy 90's premise and aesthetics and I did play the demo at a very formative age.

I have an MMX 233 and Voodoo Banshee connected at the moment and I figure I might Petra on that, see how it performs. I also have a couple of 486 systems, would you be interested in seeing some performance on those systems?

Reply 4 of 18, by badsectoracula

User metadata
Rank Newbie
Rank
Newbie

I'd be curious about the 233MHz PC, but i'm not sure it'll run on a 486 since AFAIK it doesn't have the RDTSC instruction that the game uses for timing (and even if it did, the engine is using floating point math everywhere aside from the rasterizer).

Reply 5 of 18, by Garrett W

User metadata
Rank Oldbie
Rank
Oldbie

I'll see if I can run try it this weekend, you're probably right that it won't run, but can't hurt to try. If it does run, it'd be fun just how much it chugs. I've got a DX2 66 and a Cyrix 5x86 120MHz which is an odd CPU with some features from Cyrix's Pentium equivalent chip, the 6x86, so it definitely has a bit more oomph than your typical 486.

Reply 6 of 18, by liqmat

User metadata
Rank l33t
Rank
l33t

Thanks for posting this. Could you possibly have an updated "all versions" download on Itch? Would be nice to download all your iterations at once instead of clicking on multiple download buttons. Thanks in advance.

Reply 7 of 18, by badsectoracula

User metadata
Rank Newbie
Rank
Newbie

Sure, i just added a PetraAll.zip archive that contains all the other 60 files. Perhaps in the future i might remove all the individual files except those for the latest version of each platform and keep the older versions in an archive file for those who want to check out the older stuff.

Reply 8 of 18, by liqmat

User metadata
Rank l33t
Rank
l33t
badsectoracula wrote on 2022-06-04, 06:45:

Sure, i just added a PetraAll.zip archive that contains all the other 60 files. Perhaps in the future i might remove all the individual files except those for the latest version of each platform and keep the older versions in an archive file for those who want to check out the older stuff.

Excellent. Appreciate you including your older builds.

Reply 9 of 18, by Garrett W

User metadata
Rank Oldbie
Rank
Oldbie

It took a while but I finally got around to testing Petra on an MMX 233 with 64MB RAM, a Voodoo Banshee and a Creative Vibra 16 (low-end SB16 variant). A few things I noticed (granted I only ran around the first room):

- Software rendering, be it through the DOS executable or Windows, is understandably slow. It mostly sat at 20FPS and below although there were points were 30FPS were achieved. I didn't bother to check, is it doing 320x200 or 320x240 in software?

- D3D was much faster, although I suspect the processor is still holding things back. I got wild fluctuations (due to double buffered V-Sync perhaps?) between 60/30/20 FPS. It mostly sat at 30, perhaps a frame cap of some sort would help if you ever feel like iterating on this.

- Despite using an official Creative "SB16" variant, using CTCM to initialize it, I could not get the DOS executable to produce any sound, be it through pure DOS or Windows.

I might try it on the DX2/66 tomorrow, see if it even run 😁

Reply 11 of 18, by badsectoracula

User metadata
Rank Newbie
Rank
Newbie
Garrett W wrote on 2022-06-11, 18:19:

- Software rendering, be it through the DOS executable or Windows, is understandably slow. It mostly sat at 20FPS and below although there were points were 30FPS were achieved. I didn't bother to check, is it doing 320x200 or 320x240 in software?

What was the output of "petra -bench"? It should have more than 20FPS (my 133MHz P1 laptop has ~16 FPS, so i'd expect a bit more from a 233MHz desktop CPU).

Both DOS petra.exe and winpetra.exe are using 320x200 (DOS uses mode 13h).

- D3D was much faster, although I suspect the processor is still holding things back. I got wild fluctuations (due to double buffered V-Sync perhaps?) between 60/30/20 FPS. It mostly sat at 30, perhaps a frame cap of some sort would help if you ever feel like iterating on this.

So, two things that kinda affect this is that when i first started making the game i was a bit overoptimistic in what could be done (and didn't really had any target hardware aside from "running in DOS" 😜). First is that the game is running at an internal update rate of 70Hz (the same as the mode 13h) - everything updates at that rate regardless of the real framerate, so capping it would be kinda wasteful - and chances are any other cap than 35 FPS would feel stutter-y since there isn't any state interpolation going on.

The other is that the cryopod model (which is basically two models, one for the bed and another for the cover) was basically the first model i made after Petra's model (and Petra's model was supposed to be temporary, but i ran out of time) - here is a screenshot from when i placed it in the first map - and i hadn't yet figured out the performance characteristics of the engine (and it wasn't optimized at all anyway). The model not only has a ton of triangles, but i also put a ton of copies around the first room 😜. As such the first room is by far the "heaviest" in the game and the initial "scene" (the one you see when you start the game) has -IIRC- 3 visible copies of it.

This is also why the benchmark flies around the other rooms a bit, because the rest of the models aren't that high poly.

Having said that there might be some CPU limitations too. Sadly while i have a Voodoo 1, i only have a P3 PC at 800MHz to try it out (which right now uses a Voodoo 3 as its only GPU so i'd need to swap them) so any CPU overhead is washed away.

- Despite using an official Creative "SB16" variant, using CTCM to initialize it, I could not get the DOS executable to produce any sound, be it through pure DOS or Windows.

Hm, did you configure the sound card (the game doesn't use the BLASTER variable, this is something i should implement at some point) from config.bat? Though there is yet another bug with the SB16 that i didn't notice (and didn't happen on my laptop that has a SB16 -or very compatible variant- but it did happen on the PC of a friend of mine) where i didn't make sure the audio buffer to be used with DMA doesn't cross 64k pages. Though if you hit that bug you'd probably hear cracked sound instead of no sound at all - just in case, a workaround until i make a fix (problem is that i can't reproduce it on my own hardware) is to load some TSR like doskey or whatever to "reserve" some memory so that new DOS memory allocations wont cross 64k pages (you may need to load 2-3 such TSRs).

Garrett W wrote on 2022-06-12, 17:37:

As expected, it will not run on a 486. Here's the error message I got:

Yeah i expected something like that, even ignoring the direct use of RDTSC the game does, the target instruction set i use with the compiler is for pentium CPUs 😀.

Reply 12 of 18, by Garrett W

User metadata
Rank Oldbie
Rank
Oldbie

Ah, I didn't know there was a benchmark switch. I'll make sure to give it a try and provide you some results. Unfortunately I've decommissioned the system for a little while, I opened up the PSU and gave it a thorough cleaning, I should be able to try again in a few days.

As for sound, the card is indeed initialized through autoexec.bat (not config.sys) using Creative's CTCM. Perhaps I'll look into that again.
I also forgot to mention that in Windows I did get some sound crackling. I seem to remember this being the case with my Pentium III 500 that I first played this on which had an AWE32, which for all intents and purposes should identify as a SB16 unless there is specific support for the EMU8000 chip on board that card.

Reply 13 of 18, by badsectoracula

User metadata
Rank Newbie
Rank
Newbie

I made a fix for the SB16 DMA bug yesterday and today my friend (who had the issue on his PC - it didn't happen on my laptop for some reason) confirmed that it works, so you may want to replace the PETRA.EXE with this until i make a proper new release:

http://runtimeterror.com/pages/badsector/nyan … gimme/petra.dos (rename petra.dos to petra.exe)

I don't know if this is the reason you do not have sound though - perhaps you may want to use Creative Mixer or something to raise the volume? On my laptop the audio was very low by default too.

I've also found this blog post that mentions a variant of the SB16 (using the "ViBRA VX" chip) used for the cheapest models does not have high DMA support, which is used by the other SB16 variants - and Post Apocalyptic Petra - for stereo sound (a second low DMA is used instead). If you have that model you may also not hear anything.

At some point i may also add "plain" (ie. non-SB16) Sound Blaster support since that seems to be used even by other non-Creative sound cards as a compatibility mode. Even the onboard sound card another P3 machine i had had a SB emulation mode (but not SB16 😜).

Reply 14 of 18, by Garrett W

User metadata
Rank Oldbie
Rank
Oldbie

Hi again, I ended up running a few tests with the -bench switch:

Petra.exe (under DOS) 29fps average

WinPetra 23fps average

D3DPetra (VSync On) 46fps average

D3DPetra (VSync Off) 56fps average

GLPetra (VSync On) 32fps average

GLPetra (VSync Off) 33fps average

I think the overhead from the OpenGL ICD is to blame for the lackluster performance on GLPetra. I tried running it with 3Dfx's miniGL but it wouldn't render anything and I'd get a black screen. I tried the new executable you provided and unfortunately I have to report that it did not fix the lack of sound under DOS. Anyway, hope these are helpful, let me know if you want me to try anything else.

Reply 15 of 18, by badsectoracula

User metadata
Rank Newbie
Rank
Newbie

Nice, these stats (mainly the DOS one) are more in line with what i was expecting from a 233MHz CPU 😀. The OpenGL vs D3D makes sense i think as 3dfx wasn't that great on OpenGL - i added a D3D backend exactly so that the game can run on Voodoo cards. The HW backends work pretty much the same, only at the very last moment the API-specific work is done so they should have similar performance.

I do want to add Glide support at some point and there is some partial S3D (for S3 Virge) support in the code, however clipping isn't implemented and i want to refactor the HW backends a bit so that i can share that code between the backends that do not do their own clipping (i want to let OpenGL do its own clipping since it is accelerated in later GPUs).

About SB16, the only thing i can think of is chip support. Which exactly chip do you have? There are a few in the blog post i mentioned above.

Reply 17 of 18, by badsectoracula

User metadata
Rank Newbie
Rank
Newbie

Hopefully this forum has some sort of notification system when mentions and/or quotes are made since i can't reply to a PM @MrFlibble sent me about Post Apocalyptic Petra (too low post count perhaps? I don't visit this forum often), so i'll post the reply here as it is something others might be interested anyway:

MrFlibble wrote:

I would like to ask if you permit other sites to mirror the download of the game?

Yes, you (or anyone else) can freely mirror the game as you want. You can link to the itch.io page but it isn't necessary.

One thing to note is that if you do mirror version 0.99o (the latest at this point), please apply the SB16 patch (the version from the DOS Game Jam Demo Disc 2023 already has the patch applied) otherwise some systems may not have sound. If you want to download/mirror all versions you can download PetraAll.zip instead of the individual ZIP files (this file just contains the other files).

Reply 18 of 18, by MrFlibble

User metadata
Rank Oldbie
Rank
Oldbie
badsectoracula wrote on 2024-04-19, 22:01:
MrFlibble wrote:

I would like to ask if you permit other sites to mirror the download of the game?

Yes, you (or anyone else) can freely mirror the game as you want. You can link to the itch.io page but it isn't necessary.

One thing to note is that if you do mirror version 0.99o (the latest at this point), please apply the SB16 patch (the version from the DOS Game Jam Demo Disc 2023 already has the patch applied) otherwise some systems may not have sound. If you want to download/mirror all versions you can download PetraAll.zip instead of the individual ZIP files (this file just contains the other files).

Thank you very much!

DOS Games Archive | Free open source games | RGB Classic Games