Page 1 of 1

Deadlock 2 Demo Upgrade Patch

Posted: Thu Dec 31, 2020 7:54 pm
by Tggtt
Hello GalliusIV members.

I am aware that while some prefer Deadlock 1, I am pretty sure that almost everyone here likes Deadlock 2.

The Deadlock 2 Demo is commonly used by me to decode the structures of Deadlock 2 because it features debugging symbols.
However, this debug feature is not important to players themselves.

Then, out of curiosity, last month I tried playing Deadlock 2 Demo for the first time.
I considered to use it as a test bed for teaching some newbies about the features of Deadlock 2 and see how they behave.

Actually, I had a terrible experience. I am lucky to have tried the full version first.
We have to admit, Deadlock 2 Demo is REALLY TERRIBLE!
This could be the worst playable demo I have ever tried.
I have no idea if this is intended to encourage players to buy the full version, what were the developers thinking?

Consider that you are a newbie who never played Deadlock 1 and then try the Deadlock 2 Demo for the first time.

There is no tutorial and the sample saved games are a bit too hard for beginners.
The game already starts crowded and you don't really learn what are the buildings for.
But that is not the worst.
They have put an insane 15 turn limit to the game, regardless of single or multi-player.

Can you imagine someone back in late 1998 trying to setup a modem connection for a multi-player game that only lasts for 15 turns?
It is completely revolting, Deadlock 2 did not deserve this. I am sorry developers. ;(

[rant ends]


Note: You can find demo download links at Galliusiv's download page.


Disclaimer: No Warranty. Use at your own risk.

Here is my last patch of 2020! I hope you enjoy it.

This is my simple attempt to make some justice to Deadlock 2 by providing a better version of the demo.
The patched version is still a demo, with incomplete features and bugs, but without the nonsense of excessive limitations.
I am certain that this is going to make at least the experience more enjoyable for players and beginners would be able to learn how to play and still wish to play the full version.

Really, the demo still does not have the campaign, complex world generation, map editor, videos or music; and it is still buggy and incomplete. Therefore, I am not replacing the value of the full version.

First of all, I have removed the 15 turn limit of the demo.

Regardless, the patch is still workaround based, I did not bother to perfect it because this is not my priority.

Procedure 1- How to a save game (single and multi-player):
I could not find how to enable the save button correctly, but I enabled the dialog to save before exit and disabled the actual exit.

This means you should hit "Alt+F4" to make the dialog to ask if you want to save and you can save from there.
Regardless of the answer, the game does not exit any more to allow the player to keep saving.
Game saving via the confirm exit dialog.
Game saving via the confirm exit dialog.
save.gif (86.66 KiB) Viewed 5138 times
If you really want to exit, click on the disk icon (next to the question mark) and then on exit scenario. You can then exit via the main menu.
Procedure 2- How to load a game (single and multi-player):
I could not find how to enable the load button correctly, but the game loads by default the DEMO-SP.SAV for single player and DEMO-MP.SAV for multi-player. Therefore you can rename your save game accordingly.

You can play multi-player saves as single player as well, where remote players are replaced by AI.

For resuming multi-player games, only the host needs to have the saved game file, the clients receive the game data automatically.

Any player can save the game and continue playing using Procedure 1.
Upon loading the multi-player game, the players have the option to select the race again.
Players can reselect race when restoring a saved MP game.
Players can reselect race when restoring a saved MP game.
reselect.gif (177.41 KiB) Viewed 5146 times
This also means that you can use any save game and/or switch host/client roles while keeping your own colony.
Running MP game after restoring a saved game created by the client.
Running MP game after restoring a saved game created by the client.
switched.gif (242.98 KiB) Viewed 5146 times
Procedure 3- How to start a custom world single player game:
There is no direct way of doing that, you need to host a custom multi-player game, save the game and load the multi-player saved game as a single player game. This could be solved later, but I don't plan to fix it.
Procedure 4- How to host a custom world multi-player game:
From the Host [virtual] machine, click on Join a Game. Any connection method should suffice.
Then click on cancel and immediately on the X to return to the Multiplayer Setup screen.
Hint: You can simply hit the Esc key once or twice, until it returns to the Multiplayer Setup.
Cancel Joining to Host.
Cancel Joining to Host.
cancel.gif (48.51 KiB) Viewed 5146 times
Now, try to Host a Game from there, and the game options should appear.
Game Options screen unlocked.
Game Options screen unlocked.
settings.gif (57.85 KiB) Viewed 5146 times
A custom world game starts correctly from the select race and landing site screen.
Select Landing site available in MP.
Select Landing site available in MP.
select.gif (224.54 KiB) Viewed 5146 times
Do not return to the Main Menu, or it is going to load DEMO-MP.SAV instead.

The clients should proceed as usual.
Beware that some options are incomplete and may cause the game to bail out the game creation or even crash.

The patch file is attached (DL2_PATCH_1.ZIP), you need BSPATCH to apply it to DL2_DEMO.EXE.

How to apply:
Get yourself bspatch (usually comes with bsdiff).
Windows version links:
https://www.pokorra.de/coding/bsdiff.html (Compiled with GCC 3, for old Windows 32-bit versions)
https://github.com/cnSchwarzer/bsdiff-win/ (Compiled with VC 2015, requires recent Windows versions)
http://sites.inka.de/tesla/download/bsdiff4.3-win32.zip (Old link)

Run bspatch using cmd or other console/terminal tool like this:

Code: Select all

bspatch DL2_DEMO.EXE DL2_PATCH.EXE DL2_PATCH_1.ZIP
Hint: extract bspatch.exe from the Windows version zip to Deadlock's folder then run a cmd.exe at that path.

Then run DL2_PATCH.EXE when you want to play this patched version. Please post here if it works.

Side notes:
The Demo is buggy! Some combinations that I have unlocked will cause crashes. You need to test them carefully.

Happy new year!

Re: Deadlock 2 Demo Upgrade Patch

Posted: Wed Jan 13, 2021 12:19 am
by MildewMan1
Ha it's funny that you posted this. I started working on deadlock 2 around Thanksgiving trying to solve the black screen/flickering in version 1.20, and I was visiting the forum today to say that I think I'm very close to fixing it.

Someone in another thread mentioned that he thought it had to do with the custom cursor that they use, and he was almost right. They have a structure that they use to store the DirectDrawSurface info, and I'm pretty sure they have a global array of pointers to these structures that they show as a chain.

I'm thinking that one or more of these is not getting the pixels drawn to it, so you end up it displaying a solid black surface. They also implemented multithreading to handle the mouse move windows messages, and use a different drawing function than the original. I'm not sure if the thread is the problem or the different function at the moment. Need more investigation.

Re: Deadlock 2 Demo Upgrade Patch

Posted: Sat Jan 16, 2021 1:17 am
by Tggtt
Hello MildewMan1, I am glad you are also interested in improving DL2.

To be honest, the DirectDraw issue is not a problem to me because I usually play using a VM (specially because it is limited at 640x480).

In any case, we had reports that by using the ddraw.dll file provided by one of these projects already fix the issue:
https://github.com/narzoul/DDrawCompat/
https://github.com/elishacloud/dxwrapper

Both are based on same source, see the compatible games list:
https://github.com/elishacloud/dxwrappe ... ible-Games

Also related:
https://sourceforge.net/projects/dxwnd/