Open Deadlock clone

See what Deadlock fans are creating, whether it be fan games, art or scenarios.
User avatar
Tggtt
Ancient
Ancient
Posts: 259
Joined: Sun Oct 06, 2013 8:08 pm

Open Deadlock clone

Post by Tggtt »

Hello.
I would like to know if someone is working on a real open source clone of deadlock.
I acknowledge the efforts on the mod Sid Meier's Alpha Centauri mod, but I refer to something closer to the original game.

I'm talking about something similar to OpenTTD (engine reverse engineering and keep the rest), CorsiTH (create a new engine and keep the rest), OpenXcom (that uses files of a Xcom but I haven't tried it) even like TA Spring (create a new engine which uses sounds and 3D model files of TA). There are other success cases that don't use original files. (examples include freeciv and freecol).

Also, (optionally) I think Deadlock could be ported to become a browser game with multiplayer support and still maintaining all of its features and even improving something. It could be far better than the current browser games we can find these days. (I dislike every one I've tried because they try to force you to play everyday. I don't want something to play every day, I would like something like deadlock. I heard there's browser based freeciv nowadays, but a civ match takes too long, that makes me bored)

I have considered making one myself but I was unsure if I could keep it up for long. Seeing how there're more people interested it could become a fact, maybe.
User avatar
Ubergeneral Grunt
Site Admin
Site Admin
Posts: 189
Joined: Fri Nov 19, 2010 10:20 am
Favourite Race: Tarth
Location: Perth, Western Australia
Contact:

Re: Open Deadlock clone

Post by Ubergeneral Grunt »

Welcome to the forum Tggtt,

At this stage, no one is working on a clone.

A few months back I did toy with the idea of creating a very basic Deadlock clone in C++, basic as in: perfectly square territories and no enemies or AI. I didn't really get anywhere because I don't really know how to do a proper interface, apart from the command line and saving is something quite complex. I did create a basic UML diagram of a possible design for the clone too, something with which I was quite happy, although I am not an advanced programmer, so it could probably be better designed.

Paul Kwinn did upload information on how Deadlock's sprites are stored, but he also said you'd need the source code to know where each graphic starts and finishes in the file. Therefore, it should be possible to use the original sprites like OpenTTD, but a bit of work will need to be done first.

Something like OpenTTD for Deadlock would be pretty neat and I'd love to help out if one was made.

A few thoughts about an open-source clone do cross my mind:
• I have no clue about program logic reverse engineering, so someone would be needed who knows how to do that.
• Paul Kwinn might be able to give some pointers logic-wise.
• I think C++ would be best language to write it in, as this was what Deadlock was written in originally (and I can write in it reasonably well).
• I think there are some tools that allow C++ to be compiled into HTML5 (or maybe it's just C).
• Deadlock for Windows was compiled in Borland C++ (I think), while on the Mac it was compiled in CodeWarrior. With this knowledge, reverse engineering may be a little easier.
• The strategy guide does include some technical details on Deadlock, including the formulas for how the resources in each territory tile is calculated.

So, just a question, who would be interested in working on a clone of Deadlock (something like OpenTTD)? I would, but I wouldn't want to do it alone!

I am still curious with what is happening with the rights to Deadlock though, I think Atari might not have sold them. I'd love to buy the rights, but I don't have a lawyer unfortunately.
Tarth cooks make best strudel, barbecue, bean dip, fish, cat food, smelt, piston rings, tofu and cam shafts...
User avatar
Ubergeneral Grunt
Site Admin
Site Admin
Posts: 189
Joined: Fri Nov 19, 2010 10:20 am
Favourite Race: Tarth
Location: Perth, Western Australia
Contact:

Re: Open Deadlock clone

Post by Ubergeneral Grunt »

I'd love to work on a clone of Deadlock I anyway, Deadlock I with some Deadlock II features would be awesome!
Tarth cooks make best strudel, barbecue, bean dip, fish, cat food, smelt, piston rings, tofu and cam shafts...
User avatar
Tggtt
Ancient
Ancient
Posts: 259
Joined: Sun Oct 06, 2013 8:08 pm

Re: Open Deadlock clone

Post by Tggtt »

Ubergeneral Grunt wrote:Welcome to the forum Tggtt,
Thank you, ubergeneral!
Ubergeneral Grunt wrote: A few months back I did toy with the idea of creating a very basic Deadlock clone in C++, basic as in: perfectly square territories and no enemies or AI. I didn't really get anywhere because I don't really know how to do a proper interface, apart from the command line and saving is something quite complex. I did create a basic UML diagram of a possible design for the clone too, something with which I was quite happy, although I am not an advanced programmer, so it could probably be better designed.
Congrats on your attempt, I have been considering making a game inspired by deadlock since 2006, I have actually started it but the idea was too complex and I didn't have time (also no one else was interested to help). Back in 2009 I started considering working on a clone, but I thought it was wiser to wait for someone to start it. It seems no one really made it.
Ubergeneral Grunt wrote: Paul Kwinn did upload information on how Deadlock's sprites are stored, but he also said you'd need the source code to know where each graphic starts and finishes in the file. Therefore, it should be possible to use the original sprites like OpenTTD, but a bit of work will need to be done first.
I tried decoding but I couldn't reach any success, I managed to find a few images when browsing the memory region allocated by deadlock.exe, but I couldn't manage to get their proportions or their pallete right.
Ubergeneral Grunt wrote:Something like OpenTTD for Deadlock would be pretty neat and I'd love to help out if one was made.
TTD had a few mods/patches before openttd, they already had tool support, it was easy enough to decode the sprites. I feel that the format deadlock uses may not be a good choice to be used by a clone, I hope for something more moddable.
Ubergeneral Grunt wrote:• I have no clue about program logic reverse engineering, so someone would be needed who knows how to do that.
I'm not very good at reverse engineering, but I can disassemly and read the code. It takes too long and it is boring. Still, I don't think we should do much reverse engineering, I prefer planning it again thinking on things that did not exist or were not possible for them during the original development times. (ex: browser based, larger planets, more players, open and non-binary formats, mods and addons).
Ubergeneral Grunt wrote:• Paul Kwinn might be able to give some pointers logic-wise.
I hope we don't bother him too much if this really becomes something.
Ubergeneral Grunt wrote:• I think C++ would be best language to write it in, as this was what Deadlock was written in originally (and I can write in it reasonably well).
It is possible, but more analysis should be performed. I like C++ but it could cause trouble inviting more developers. I just do not want to use the wrong language like the developers of Frets on Fire and Minecraft did (examples).
Ubergeneral Grunt wrote:• I think there are some tools that allow C++ to be compiled into HTML5 (or maybe it's just C).
There are toolkits that allows you to write web applications in c++. They usually give a good performance.
Ubergeneral Grunt wrote:• Deadlock for Windows was compiled in Borland C++ (I think), while on the Mac it was compiled in CodeWarrior. With this knowledge, reverse engineering may be a little easier.
Actually that is the second thing you discover when trying to disassemble (Borland C++ - Copyright 1994 Borland Intl), the first is the architecture (i386).
Ubergeneral Grunt wrote:• The strategy guide does include some technical details on Deadlock, including the formulas for how the resources in each territory tile is calculated.
This would avoid the hardest part of disassemble: finding numbers. If they used integers and defined them by using #define, the value could be converted into another representation and get scattered all over the code... you may never find its meaning again. Example: negative values have different representations depending on their size.
Ubergeneral Grunt wrote:So, just a question, who would be interested in working on a clone of Deadlock (something like OpenTTD)? I would, but I wouldn't want to do it alone!
Good news then.
Ubergeneral Grunt wrote:I am still curious with what is happening with the rights to Deadlock though, I think Atari might not have sold them. I'd love to buy the rights, but I don't have a lawyer unfortunately.
Now that's up to you. If you really think you are able to buy it, go ahead. I suspect that finding a lawyer wouldn't be the hardest part of that. Still, I don't think Atari is interested on Deadlock anyway, you might even manage to get something. For example, a group of fans managed to create an improved version of Falcon 4.0 and had permission to sell it.
Ubergeneral Grunt wrote:I'd love to work on a clone of Deadlock I anyway, Deadlock I with some Deadlock II features would be awesome!
That's more good news. Thank you very much.
Attachments
My first attempt on decoding Deadlock 1's memory. However I didn't get any successes.
My first attempt on decoding Deadlock 1's memory. However I didn't get any successes.
failedattempt.png (3.38 KiB) Viewed 32377 times
User avatar
Tggtt
Ancient
Ancient
Posts: 259
Joined: Sun Oct 06, 2013 8:08 pm

Re: Open Deadlock clone

Post by Tggtt »

Here it is!
The long awaited clone... of the GUI.

Just an example to show it's not hard to deal with GUI in C++ if you use the right tools.
I didn't take long to create this using a gui design tool that generates c++ code.
Attachments
GUI Preview
GUI Preview
Deadlock4.png (121.33 KiB) Viewed 32374 times
User avatar
Ubergeneral Grunt
Site Admin
Site Admin
Posts: 189
Joined: Fri Nov 19, 2010 10:20 am
Favourite Race: Tarth
Location: Perth, Western Australia
Contact:

Re: Open Deadlock clone

Post by Ubergeneral Grunt »

Good stuff, but Deadlock IV?

If we were to make a clone, I am all for using the OS's GUI with the game, that's one thing I liked about Deadlock, especially on the Mac.
Tarth cooks make best strudel, barbecue, bean dip, fish, cat food, smelt, piston rings, tofu and cam shafts...
User avatar
Tggtt
Ancient
Ancient
Posts: 259
Joined: Sun Oct 06, 2013 8:08 pm

Re: Open Deadlock clone

Post by Tggtt »

The name was a joke :lol: I was expecting someone to point it. I'm not sure about the name, since Openlock sounds "cheezy". (I know it is spelled cheesy)

And it is using native OS's GUI. I have created that using wxwidgets, the windows are generated using native GUI via a C++ library that can be ported to several OSes (including Windows and MacOSX). In my case that's KDE using Plastik theme, native windows look like that.
User avatar
Ubergeneral Grunt
Site Admin
Site Admin
Posts: 189
Joined: Fri Nov 19, 2010 10:20 am
Favourite Race: Tarth
Location: Perth, Western Australia
Contact:

Re: Open Deadlock clone

Post by Ubergeneral Grunt »

There shouldn't be any problems with calling it Deadlock, the name is not trademarked anymore. There are a few other games that came out since 1996 called Deadlock, but our Deadlock was first and therefore we deserve to be able to use it. ;)

Have you got the grey tile background from the original game? The GUI wouldn't be complete without it. The bitmap is inside Deadlock's executable and can easily be extracted using a tool like ResEdit for Windows (not to be confused with Apple's great application).
Tarth cooks make best strudel, barbecue, bean dip, fish, cat food, smelt, piston rings, tofu and cam shafts...
User avatar
Tggtt
Ancient
Ancient
Posts: 259
Joined: Sun Oct 06, 2013 8:08 pm

Re: Open Deadlock clone

Post by Tggtt »

I can make the panes (background of the window) use the image, but I'm not sure about the toolbar. It seems that the original Deadlock used a custom line of buttons, they aren't a native toolbar, maybe they weren't around by that time. Personally, I think that a native toolbar is better, since it can be dockable (you can detach it from the top and place it somewhere). I hope it is close enough!

As a workaround, the background of the buttons could be set that way, they support two pictures (one for up and other for pressed/active). Since they are expanded (they are side by side with the other icons, there wouldn't be gaps.) it would look like the same thing.

Anyway, it should be improved later. I would like to remind you that, if you design an application correctly, the GUI is easy to change.
User avatar
Tggtt
Ancient
Ancient
Posts: 259
Joined: Sun Oct 06, 2013 8:08 pm

Re: Open Deadlock clone

Post by Tggtt »

Sorry for double posting, but I need to notify you that I have created a project at SourceForge for whatever is needed for creating the Open Deadlock Clone.

Currently I (currently the admin) and RenanSPH (our disassembly specialist) are the only members but we are going to need much more developers. Please help!

Remember to browse it for tools, technical wiki (not general game wiki, it's for software documentation, also including how to decode legacy data) and perhaps the clone itself in the future.

Link:
http://sourceforge.net/projects/opendea ... liusiv.com

[late edit]
I would like to thank Grunt for joining it as well.
Post Reply