Widescreen hack and some other fixes aka AiO Patch

Discuss Drakan: Order of the Flame with fellow players and post any technical problems here where an 'unofficial' support team will try and help you. Gameplay help questions can go here too.

Moderators: Mechanist, Arokhs Twin, yangez93

User avatar
Mechanist
Dragon
Posts: 298
Joined: Wed Mar 07, 2018 7:27 pm
Location: Poland

Re: Widescreen hack and some other fixes aka AiO Patch

Postby Mechanist » Sun May 20, 2018 10:48 am

Awesome! It's uploading.
Also, I'm currently taking a stab at making an installer for it.
If I succeed, I'll send you the finished installer scripts, so that you can easily add the installer when you upload new versions.

BTW, we found a very strange glitch in multiplayer today...

UCyborg
Dragon
Posts: 419
Joined: Sun Jul 07, 2013 7:24 pm
Location: Slovenia

Re: Widescreen hack and some other fixes aka AiO Patch

Postby UCyborg » Sun May 20, 2018 11:28 am

I'd personally use Inno Setup to compile installer.
"When a human being takes his life in depression, this is a natural death of spiritual causes. The modern barbarity of 'saving' the suicidal is based on a hair-raising misapprehension of the nature of existence." - Peter Wessel Zapffe

UCyborg
Dragon
Posts: 419
Joined: Sun Jul 07, 2013 7:24 pm
Location: Slovenia

Re: Widescreen hack and some other fixes aka AiO Patch

Postby UCyborg » Mon May 21, 2018 2:41 am

"When a human being takes his life in depression, this is a natural death of spiritual causes. The modern barbarity of 'saving' the suicidal is based on a hair-raising misapprehension of the nature of existence." - Peter Wessel Zapffe

User avatar
mage150
Dragon
Posts: 167
Joined: Sun Aug 12, 2001 3:05 pm
Location: USA
Contact:

Re: Widescreen hack and some other fixes aka AiO Patch

Postby mage150 » Tue May 22, 2018 1:37 pm

I am going to be making many more levels at this rate. If there is an active community that will play, I will make them maps.

Currently working on a Hub map at the request of Mechanist for his server so the active players can vote on the rotation.

UCyborg: Do you think it would be possible to make changes to game modes or classes available in the game for level editing? We could really push the engine if I could get more things to play with. Example: Queen of Dragon mode remains Free for all. I'd like to make it to where the person who is Queen is on their own team and everyone else remains on another team.

2) There is a memory leak in the level editor. Any chance you could take a stab at that? windows will start to "draw" on top of each other.
Moderator Of Arokh's Lair.

UCyborg
Dragon
Posts: 419
Joined: Sun Jul 07, 2013 7:24 pm
Location: Slovenia

Re: Widescreen hack and some other fixes aka AiO Patch

Postby UCyborg » Tue May 22, 2018 8:23 pm

Do you think it would be possible to make changes to game modes or classes available in the game for level editing?

No.

There is a memory leak in the level editor. Any chance you could take a stab at that? windows will start to "draw" on top of each other.

Don't think that's a memory leak. Are you on Windows 10? If so, it's probably due to using DirectDraw/GDI in a way that doesn't play well with desktop composition. No idea how to tackle that.
"When a human being takes his life in depression, this is a natural death of spiritual causes. The modern barbarity of 'saving' the suicidal is based on a hair-raising misapprehension of the nature of existence." - Peter Wessel Zapffe

User avatar
mage150
Dragon
Posts: 167
Joined: Sun Aug 12, 2001 3:05 pm
Location: USA
Contact:

Re: Widescreen hack and some other fixes aka AiO Patch

Postby mage150 » Tue May 22, 2018 8:48 pm

Do you think it would be possible to make changes to game modes or classes available in the game for level editing?

No.

There is a memory leak in the level editor. Any chance you could take a stab at that? windows will start to "draw" on top of each other.

Don't think that's a memory leak. Are you on Windows 10? If so, it's probably due to using DirectDraw/GDI in a way that doesn't play well with desktop composition. No idea how to tackle that.
Thanks for the fast reply.

I am on windows 10. I remember that being a symptom back in the day where the editor would memory leak to crash and one symptom was the window "drawing" effect.

Another question about the level editor, if I want to stream this I would use window mode, however the level editor / modeler open a new window for each prompt box. Would there be some update to be done that would allow all child windows of the parent program to act as one active window? I am trying to avoid sharing my whole desktop/monitor while streaming the level editor.
Moderator Of Arokh's Lair.

UCyborg
Dragon
Posts: 419
Joined: Sun Jul 07, 2013 7:24 pm
Location: Slovenia

Re: Widescreen hack and some other fixes aka AiO Patch

Postby UCyborg » Tue May 22, 2018 9:46 pm

I remember that being a symptom back in the day where the editor would memory leak to crash and one symptom was the window "drawing" effect.

There might still be small memory leaks present, but it would take a really long time for them to pile up, at least if you're not dealing with big textures, at which point memory usage of the editor would already be way beyond 1 GB. I made the executable Large Address Aware so i guess it should have at least 2 GB to play with in practice.

Another question about the level editor, if I want to stream this I would use window mode, however the level editor / modeler open a new window for each prompt box. Would there be some update to be done that would allow all child windows of the parent program to act as one active window?

The only idea that came is using OBS Studio for recording, which does let you compose the scene from multiple sources, including windows, though title bar and menus are missing for some reason, at least in the older version I have ATM.

Otherwise, I think one would have to make their own editor with window-in-window feature. Or perhaps there's some 3rd party program that would let you do that somehow. Maybe someone else has an idea.
"When a human being takes his life in depression, this is a natural death of spiritual causes. The modern barbarity of 'saving' the suicidal is based on a hair-raising misapprehension of the nature of existence." - Peter Wessel Zapffe

User avatar
mage150
Dragon
Posts: 167
Joined: Sun Aug 12, 2001 3:05 pm
Location: USA
Contact:

Re: Widescreen hack and some other fixes aka AiO Patch

Postby mage150 » Tue May 22, 2018 10:26 pm

I remember that being a symptom back in the day where the editor would memory leak to crash and one symptom was the window "drawing" effect.

There might still be small memory leaks present, but it would take a really long time for them to pile up, at least if you're not dealing with big textures, at which point memory usage of the editor would already be way beyond 1 GB. I made the executable Large Address Aware so i guess it should have at least 2 GB to play with in practice.

Another question about the level editor, if I want to stream this I would use window mode, however the level editor / modeler open a new window for each prompt box. Would there be some update to be done that would allow all child windows of the parent program to act as one active window?

The only idea that came is using OBS Studio for recording, which does let you compose the scene from multiple sources, including windows, though title bar and menus are missing for some reason, at least in the older version I have ATM.

Otherwise, I think one would have to make their own editor with window-in-window feature. Or perhaps there's some 3rd party program that would let you do that somehow. Maybe someone else has an idea.
I am going to try to just set up window sources for each item and arrange it accordingly. I just know that will take a ton of time.

The next goal I have is to somehow find the REO > REC combiner tool so I can get back to making custom REC models again. Not sure if that is something anyone has but it was something that used to be available on Drakan.ru
Moderator Of Arokh's Lair.

UCyborg
Dragon
Posts: 419
Joined: Sun Jul 07, 2013 7:24 pm
Location: Slovenia

Re: Widescreen hack and some other fixes aka AiO Patch

Postby UCyborg » Thu May 24, 2018 2:13 pm

Ugly hack for the editor that may get rid of the window overdraw problem or break the 2D view.

Editor has another interesting bug where large textures aren't displayed properly in the Databases window. It happens to display properly on Windows 7 and earlier WITHOUT desktop composition, EXCEPT on Windows NT 4.0 where the same problem as on modern Windows versions occur.

Another interesting observation on NT 4.0 with dedicated server...there you do get "Server launch successful!" message when starting the server without specifying level list, so it starts with Alwarren of Death. While on other Windowses, the message is usually absent, though it shows with certain other starting level. Very curious.

Dege also mentioned that he doesn't get sound effects, just music; a problem asked about occasionally on this forum without an answer of what goes wrong when it occurs for some people.
"When a human being takes his life in depression, this is a natural death of spiritual causes. The modern barbarity of 'saving' the suicidal is based on a hair-raising misapprehension of the nature of existence." - Peter Wessel Zapffe

User avatar
mage150
Dragon
Posts: 167
Joined: Sun Aug 12, 2001 3:05 pm
Location: USA
Contact:

Re: Widescreen hack and some other fixes aka AiO Patch

Postby mage150 » Sat May 26, 2018 1:30 am

Ugly hack for the editor that may get rid of the window overdraw problem or break the 2D view.

Editor has another interesting bug where large textures aren't displayed properly in the Databases window. It happens to display properly on Windows 7 and earlier WITHOUT desktop composition, EXCEPT on Windows NT 4.0 where the same problem as on modern Windows versions occur.

Another interesting observation on NT 4.0 with dedicated server...there you do get "Server launch successful!" message when starting the server without specifying level list, so it starts with Alwarren of Death. While on other Windowses, the message is usually absent, though it shows with certain other starting level. Very curious.

Dege also mentioned that he doesn't get sound effects, just music; a problem asked about occasionally on this forum without an answer of what goes wrong when it occurs for some people.
Thanks for that. I will give it a try. I had a map crash so horribly it corrupted the LVL file to where it wouldn't load. Luckily I set it up to backup and recovered. My stream is seeing tons of crashes on level editor due to 3d view / engine.
Moderator Of Arokh's Lair.

User avatar
Mechanist
Dragon
Posts: 298
Joined: Wed Mar 07, 2018 7:27 pm
Location: Poland

Re: Widescreen hack and some other fixes aka AiO Patch

Postby Mechanist » Sun May 27, 2018 6:16 am

OK, I can confirm that the lens flare effects work properly in dgVoodoo on my end now. :D

UCyborg, do you know if there's a command line parameter that can be passed to Drakan.exe to bring up Riot Engine Options with the "Developer" tab visible?
Or - even better - to just force developer mode without bringing up the options window?
I know that the dev mode can also be turned on/off via writing registry values, but that isn't a good option in this case.

BTW, I found some hilarious text strings in Drakan.exe, while checking for supported parameters:
  • "DANGER WILL ROBINSON"
  • "Llama"
  • "Raging A..holes" - perhaps fittingly, this was near the multiplayer commandline parameters :lol:

User avatar
mage150
Dragon
Posts: 167
Joined: Sun Aug 12, 2001 3:05 pm
Location: USA
Contact:

Re: Widescreen hack and some other fixes aka AiO Patch

Postby mage150 » Sun May 27, 2018 1:41 pm

Something I noticed that makes setting up my stream a nightmare is that the Drakan game does not play audio unless the window has full focus. Is it possible to get a full screen windowed mode that also plays audio in the background? If I alt tab and the audio shuts off constantly that is not a great thing for streaming.
Moderator Of Arokh's Lair.

UCyborg
Dragon
Posts: 419
Joined: Sun Jul 07, 2013 7:24 pm
Location: Slovenia

Re: Widescreen hack and some other fixes aka AiO Patch

Postby UCyborg » Sun May 27, 2018 7:31 pm

UCyborg, do you know if there's a command line parameter that can be passed to Drakan.exe to bring up Riot Engine Options with the "Developer" tab visible?

AFAIK, there isn't anything more beyond what's documented in the ReadMe.

"Raging A..holes"

Default team name. Haven't checked if it's actually ever used...maybe if you leave empty team names in config?

Is it possible to get a full screen windowed mode that also plays audio in the background?

Yes, with IndirectSound or Creative ALchemy. Or by modifying the code to enable DSBCAPS_GLOBALFOCUS flag for sound buffer creation.

3rd party DirectSound wrappers don't emulate the default behavior of DirectSound that mutes all sound buffers unless instructed to do otherwise, so if the game plays sounds while it's minimized (which is what Drakan does), sounds will play with those regardless of parameters passed to sound buffer creation function, but they are muted otherwise.
"When a human being takes his life in depression, this is a natural death of spiritual causes. The modern barbarity of 'saving' the suicidal is based on a hair-raising misapprehension of the nature of existence." - Peter Wessel Zapffe

User avatar
Mechanist
Dragon
Posts: 298
Joined: Wed Mar 07, 2018 7:27 pm
Location: Poland

Re: Widescreen hack and some other fixes aka AiO Patch

Postby Mechanist » Wed May 30, 2018 1:27 pm

Feature request for future releases: could you provide some means for the Gold Pack installer to allow specifying default values to be written into "\My Games\Drakan\Drakan.cfg" (in cases where that Drakan.cfg doesn't already exist at runtime, eg. on a fresh install)?

Currently, rather than using the values from Drakan.cfg in the installation folder as the new defaults, they appear to be hardcoded into the AiO patch instead. :?:
As far as I can see, the only ways around this issue are to either disable PerUserConfgAndSaves in Arokh.ini (bad idea in today's frequently multi-user environments), or to pre-place a modified Drakan.cfg into \My Games\Drakan - which is also not a great idea, since it would only work for the one user who runs the installer.


On an unrelated note: we need to think about some form of version control, because of Drakan multiplayer now being very much a thing. :!:
Jage (aka mage150) will be releasing more maps soon (both completely new ones, as well as patched versions of old maps); so to avoid chaos, the AiO patch build number will need to be incremented when those are incorporated, even if no other changes are made to the AiO patch itself in the meantime.

I'll also make an installer for a "Community Patch", which will combine (the 445 patch + your AiO patch + all the maps) into one package, that can be installed over the original game (or over the Gold Pack) to bring it completely up to date with just a single download and install.
So my remark (above) about using version control also very much applies here.

So my suggestion here is, we'd have the Community Patch as the actual "release" version (hosted on Arokh's Lair server, too), in part because of the maps, and with your AiO patch being a key component of it.
As for the version number, we'd append the map pack version to the AiO patch build, eg. "AiO patch build 133.01". This should prevent any confusion as to which version is the latest one, while also allowing us to easily release updates to the map pack without having to increment the AiO patch build.
Are you OK with this?

UCyborg
Dragon
Posts: 419
Joined: Sun Jul 07, 2013 7:24 pm
Location: Slovenia

Re: Widescreen hack and some other fixes aka AiO Patch

Postby UCyborg » Mon Jun 04, 2018 11:43 pm

Back with a smallish update, maybe the final one (word "final" is in there for a reason :wink:):

  • Added option to enable DSBCAPS_GLOBALFOCUS flag for DirectSound buffers.
  • Copy Drakan.cfg from install folder to user's personal Drakan folder if (s)he doesn't have config file already.
  • Prevent Windows from scaling game window at high DPI settings because it breaks the mouse.
  • Don't call SetWindowPos on fullscreen window, it's redundant and can permanently mess up other applications' window sizes and positions.
  • Allow system supported resolutions for editor's 3D window.
  • Added option to turn off window message based execution blocking for editor's 3D window during inactivity for cases when it causes problems.
  • Enabled enhanced GDI scaling at high DPI settings by default for the editing tools (supported on Windows 10 version 1703 and above).
Feature request for future releases: could you provide some means for the Gold Pack installer to allow specifying default values to be written into "\My Games\Drakan\Drakan.cfg" (in cases where that Drakan.cfg doesn't already exist at runtime, eg. on a fresh install)?

Done. Conveniently, it only required a single call to CopyFile in hooked function that intercepts path for config save location.

So my suggestion here is, we'd have the Community Patch as the actual "release" version (hosted on Arokh's Lair server, too), in part because of the maps, and with your AiO patch being a key component of it.
As for the version number, we'd append the map pack version to the AiO patch build, eg. "AiO patch build 133.01". This should prevent any confusion as to which version is the latest one, while also allowing us to easily release updates to the map pack without having to increment the AiO patch build. Are you OK with this?

So we have "raw" AiO Patch download here as it has always been for people that may just want to patch their game so they can get through single player story and separate community patch with the extra content. I always thought it's best to keep the patch itself serve the intended purpose, to fix coding issues.

Player-created levels and updates to them would go into Mods category. So, since you're going to create separate community patch, you're free to incorporate AiO Patch in it. I'd call it Community Upgrade Pack.

I'm not sure how you'd do the version control thing, by some version control software like git? I wonder if GitHub is used by some people for this sort of thing, hosting data files instead of code. Might be an overkill unless people are gonna be popping out new maps every day, in which case Steam's Workshop would be handy to have.
"When a human being takes his life in depression, this is a natural death of spiritual causes. The modern barbarity of 'saving' the suicidal is based on a hair-raising misapprehension of the nature of existence." - Peter Wessel Zapffe


Return to “Drakan (PC) Game Discussion & Technical Support”

Who is online

Users browsing this forum: No registered users and 2 guests

cron