We have a Steam curator now. You should be following it. https://store.steampowered.com/curator/44994899-RPGHQ/

Prelude to Darkness

Game development hub. Projects, modding, and resources.

Moderator: Mod Janitor

Ignore Topic
asf
Turtle
Turtle
Posts: 3252
Joined: Feb 2, '23
Gender: Helicopter

Geolocation

Prelude to Darkness

Post by asf »

In 2002, Pyrrhic Tales released Prelude to Darkness, a game more or less in the vein of the later Ultimas (except 9 which is terrible):

https://www.mobygames.com/game/18459/py ... -darkness/

A fun RPG, quite innovative for its time, but plagued with endless bugs. The original version was nigh unplayable with endless crashes to desktop and memory corruption issues . Even though it got quite a few patches in the following years, the game remained very unstable.

Fast forward a couple of decades, some nagging from @Konjad and the original devs eventually released the source code for the game in 2022. Since then, I and a fellow developer from rpgcodex put a bit of effort in rewriting parts of the source for better stability, including:
  • Replacing old Directx 7 with full opengl graphics;
  • Several fixes for memory leaks and other bizarre memory issues;
  • Rewrite of the audio framework to use miniaudio;
  • Full port to linux;
  • Inclusion of 64-bits version;
  • Fixes for events and other in-game issues;
  • Few qol stuff like double click for certain UI interactions and camera modes;
This work resulted in a new, much more stable version of the game.

Since joos have been jooing in rpgcodex, I decided to move shop here. Even though last updates were still in 2022, last reports we got was that game was much more stable. Since I should have some free time in the next few weeks, I might get back into fixing bugs if any get reported.

If you are interested in playing, you can get the full game here, thanks to rusty and his vault:

https://f.rpghq.org/mWyr9bQciOYV.zip?n= ... rkness.zip

It contains both a win32 and a linux executable.

If you just want the patched version, or want to look into the source, you can get it straight from gitlab:

https://gitlab.com/ptd3/ptd-1

Regarding the game itself, I recommend not touching gui.ini. Don't try to run it in windowed mode since it won't work. The game currently uses the desktop resolution, maintaning the old 4:3 with lateral black bars. If there is interesting in changing resolutions or using the older ones, I might rework that a bit. More advanced stuff like full support for widescreen might be viable, but will require some further changes.

If anyone is willing to play, I will be interested in hearing reports about stability, particularly any bug you might find, which is what this thread is for. Overall, the game is quite fun and worth at least one playthrough.
Last edited by asf on May 10th, 2024, 20:40, edited 1 time in total.
User avatar
Konjad
Posts: 183
Joined: Feb 8, '23

Geolocation

Post by Konjad »

Perhaps it would be better to keep PtD posts in one thread? Easier to find later
viewtopic.php?p=838-prelude-to-darkness

EDIT: Oh, this one is in dedicated to modding subforum, nevermind then.
Last edited by Konjad on May 11th, 2024, 06:54, edited 1 time in total.
asf
Turtle
Turtle
Posts: 3252
Joined: Feb 2, '23
Gender: Helicopter

Geolocation

Post by asf »

play the game and report bugs
User avatar
wndrbr
Turtle
Turtle
Posts: 3900
Joined: Feb 4, '23
Location: Siberia
Gender: Dinosaur

Geolocation

Adventurer's Guild

Post by wndrbr »

Custom portrait for the main character, I've made it exclusively for HQ. Just extract into game's dir and confirm the replacing.

https://f.rpghq.org/cYpuKtG4SwVG.zip?n= ... rtrait.zip
User avatar
NotAI
Posts: 490
Joined: Mar 3, '23

Geolocation

Post by NotAI »

Impressive!
Sounds like a huge effort.

Never heard of this game before at all.

Nothing happens when trying the 64-bit executable...do some other packages need to be installed or go with wine?
asf
Turtle
Turtle
Posts: 3252
Joined: Feb 2, '23
Gender: Helicopter

Geolocation

Post by asf »

Should work fine in linux without wine, check debug.out see if any errors, or just send it to me.
User avatar
NotAI
Posts: 490
Joined: Mar 3, '23

Geolocation

Post by NotAI »

This probably is the issue? (from debug.out)

"glfw error 65540 Invalid scancode -1"
[long list of the same error repeated]

then seems no errors until near the end:

"no mesh for item DF6EEAD0
no mesh for item E094D1B0
no mesh for item E09926B0
D3DXUninitialize"

Edit. It may be a common nvidia driver bug with originally 32 bit stuff. Since when trying in WINE:

ERROR: "...broken nvidia RandR detected..."

So might be nothing wrong with your code. Just a recent nvidia driver issue.

Edit. The gpu itself is working fine. Tried the vulkan renderer with gpu in Godot just now as a check.

Will try some other stuff later to check.
Last edited by NotAI on May 12th, 2024, 15:56, edited 4 times in total.
asf
Turtle
Turtle
Posts: 3252
Joined: Feb 2, '23
Gender: Helicopter

Geolocation

Post by asf »

Works fine with nvidia drivers in one of my boxes here, so I doubt that is the problem. More likely some weird x11 behaviour. I will take a look later today.
asf
Turtle
Turtle
Posts: 3252
Joined: Feb 2, '23
Gender: Helicopter

Geolocation

Post by asf »

The glfw errors seem to be some bug in glfw related to non standard keyboard languages, and it seems most people just ignore it. None of these errors seem to be related to a lack of window in your case, are you sure you get no window? The game always abort with a proper error message when glfw fails to create the window.
User avatar
NotAI
Posts: 490
Joined: Mar 3, '23

Geolocation

Post by NotAI »

Ty for figuring out the error messages

Yep no window

Will try on a different system that has other packages including a different environment (BG3 eg worked for sure on that)

This system does run straight vulkan code when compiled, unreal, and godot but some things probably quietly broke with updates
asf
Turtle
Turtle
Posts: 3252
Joined: Feb 2, '23
Gender: Helicopter

Geolocation

Post by asf »

Send me the entire debug.out, let me dig
User avatar
Seger
Posts: 11
Joined: May 7, '25

Geolocation

Post by Seger »

@asf thanks for your efforts, but it seems this is abandoned right?
User avatar
rusty_shackleford
Site Admin
Posts: 52810
Joined: Feb 2, '23
Gender: Watermelon

Geolocation

Adventurer's Guild

Post by rusty_shackleford »

I'll look into getting this building tomorrow, see if I can fix some stuff
Thank you for your attention to this matter!
Steam friend code: 40552640 https://steamcommunity.com/friends/add | email: [email protected] | Questions or problems? PM me. I reply quickly.
Rusty's Stuff Collection
asf
Turtle
Turtle
Posts: 3252
Joined: Feb 2, '23
Gender: Helicopter

Geolocation

Post by asf »

it is pending feedback
User avatar
Konjad
Posts: 183
Joined: Feb 8, '23

Geolocation

Post by Konjad »

rusty_shackleford wrote: ↑ May 18th, 2025, 10:01
I'll look into getting this building tomorrow, see if I can fix some stuff
did you fix it yet
User avatar
Darth Cannoli
Posts: 16
Joined: Aug 8, '25

Geolocation

Post by Darth Cannoli »

wndrbr wrote: ↑ May 11th, 2024, 15:36
Custom portrait for the main character, I've made it exclusively for HQ. Just extract into game's dir and confirm the replacing.

https://f.rpghq.org/cYpuKtG4SwVG.zip?n= ... rtrait.zip
Would you be so kind to walk me through the process?
Apparently, you have to keep the original portrait's beige background or the custom portrait is scrambled.
And save it into bmp format. (PNG = crash to desktop )

I have no idea how to make custom portraits with the same background.

Do I pick an original portrait, paint over the portrait then paste a bmp portrait with a transparent background on top?
User avatar
wndrbr
Turtle
Turtle
Posts: 3900
Joined: Feb 4, '23
Location: Siberia
Gender: Dinosaur

Geolocation

Adventurer's Guild

Post by wndrbr »

Darth Cannoli wrote: ↑ August 7th, 2026, 14:12

Do I pick an original portrait, paint over the portrait then paste a bmp portrait with a transparent background on top?
yeah just edit the original portrait in photoshop or something like that, and save as .bmp
User avatar
Darth Cannoli
Posts: 16
Joined: Aug 8, '25

Geolocation

Post by Darth Cannoli »

I'll try that during the week-end, thanks.

Do you know if it works if the portrait takes more space, reducing the beige border?
It'd save me a few tries, I'm going to try to make the actual portrait take as much space as possible.
User avatar
wndrbr
Turtle
Turtle
Posts: 3900
Joined: Feb 4, '23
Location: Siberia
Gender: Dinosaur

Geolocation

Adventurer's Guild

Post by wndrbr »

Darth Cannoli wrote: ↑ August 7th, 2026, 17:46
I'll try that during the week-end, thanks.

Do you know if it works if the portrait takes more space, reducing the beige border?
It'd save me a few tries, I'm going to try to make the actual portrait take as much space as possible.
bitmap files always take the same amount of space regardless of what's on the image. The space depends on width*height.
User avatar
Darth Cannoli
Posts: 16
Joined: Aug 8, '25

Geolocation

Post by Darth Cannoli »

wndrbr wrote: ↑ August 8th, 2026, 03:57
Darth Cannoli wrote: ↑ August 7th, 2026, 17:46
I'll try that during the week-end, thanks.

Do you know if it works if the portrait takes more space, reducing the beige border?
It'd save me a few tries, I'm going to try to make the actual portrait take as much space as possible.
bitmap files always take the same amount of space regardless of what's on the image. The space depends on width*height.
I was talking about how centered are the portraits with a border around, I'll try to make the borders smaller and the face bigger, not talking about the file "weight".

Anyway, didn't find the time so maybe next week.
I'm going to try at some point well, there's no rush as someone is working again on prelude, hopefully, the game is even more stable than with the previous fixes.