Jump to content
Sign in to follow this  
zelurker

source ?

Recommended Posts

I didn't find this in the faq, so I have to ask it, what about the source in case we want to use this with something else than an old windows engine ?

I can't even run in in wine, I get an error about screen buffer not found, but also it might be cool to merge these changes in projects like vanilla conquer (or do a fork of the project if they don't agree).

Share this post


Link to post

I'm not sure what you mean. This whole patch was developed without access to any source code, and wasn't written in C++ itself.

My "source" is a combination of undocumented hacks, and a whole mess of text files with asm code, and from a lot of those I'm not even sure if they're obsolete or actually the final stuff that ended up inside the game. Many of them are later updates of the same parts, and I know the exe contains undocumented edits where I just pushed existing parts of the exe a few bytes back or forward to put my own code in, and for such edits it never seemed worth it to transcribe the entire code block I moved, since the only real edits that were involved for me were changing the jump distances of things connecting to such moved blocks.

I've been trying to use binary diffs to reconstruct all of it in a more sensible manner, but it's a huge work, and I don't have a lot of time these days. And since this isn't C++ code, it's also not something that can easily be integrated into projects like VanillaConquer. Absolutely none of this has ever been compared to the source code to see where it would even belong as actual C++ patch. And I'm also very sure that a lot of the stuff I hacked in could be done in a much more elegant way in the real source code.

You also have to understand, I'm not a C++ programmer. I'm a C#/Java programmer, and on the C++ front, I mostly just know what it looks like when compiled to bytecode. So I'm familiar with very high-level and very low-level stuff, but the C++ in between those two extremes is something I'm really not familiar with in terms of syntax and overall structure.

Share this post


Link to post

Interesting, i was not sure whether it was a binary patch or not, well as you know the source was made public a long time ago already, and published for the remastered version...  might be worth taking a look, I know I just did, and there are some asm files even in it (which didn't make it to vanilla conquer, probably because they wanted to be compatible with non x86 platforms, but which are still in the remastered version), and that's quite impressive to see !

Well for vanilla conquer it's because I have read in their issues (at least I think it was there), that for now the mix files from this project are not supported, it was saying there was something about music not playing if I remember correctly, so I wondered if there was some doc somewhere to fix that at least. I admit I didn't try the mix files directly yet, maybe I should... !

Share this post


Link to post

Oh, I've dug into the source code extensively, and have often used it as reference material in assembly patches I made for Kilkakon's "Dawn of Tomorrow" C&C95 mod. (for which, learning from my earlier mistakes, we made sure to meticulously keep track of all edits :P)

But still, I'm not a C++ programmer. From knowing c# syntax, yes, I can read the code, but that still doesn't mean I can program C++. Not to the extent I can in asm, anyway. In the raw bytes, anything is possible.

As for "a long time ago", well, the source code was published in 2020. My patch was made between 2008-2012. So, just to put that into perspective... since C&C95 was released in 1997, that means that at the moment the source code was released, C&C95 had already existed longer with my patch than without it.

 

I know why Vanilla Conquer does not support my patch; it's mostly because I added a language switching system into it, and to optimise that a bit, I split off the sounds.mix file into two files; sounds.mix for sound effects, and talk_eng.mix for the unit voices. This allowed me to add a talk_fre.mix, talk_ger.mix and talk_jap.mix without needing to include duplicates of the sound effects four times. I also made some edits to make the sidebar expand, and those edits require increasing the game's graphics buffer, otherwise it's not large enough to load the entire expanded sidebar sprite.

Music should not be an issue; I just use the unmodified Covert Ops scores.mix file as far as I know. I added some extra soundtrack-versions of some tracks too, but they're added in an external mixfile, so that should not affect anything

Share this post


Link to post

Yeah well the issue was about music not starting in a multiplayer game, I can't be sure about that, I didn't try multiplayer. I have tried launching my fork of vanilla-conquer from your directory and it seemed to work fine for what I tested so far... but of course, no special language support or anything like that yet.

Yeah not that long ago you are right, I thought there had been a previous release of the source prior 2020. And this release in the remastered version is quite frustrating, you get the source for 2 dlls, but the program which calls them is a black box, so it's very hard or almost impossible to use this to target another platform like linux. Plus I looked a bit at it and couldn't find some of the changes I see in their game so I am quite puzzled !

Anyway, I played a little with the code, just starting to know it, so it's far from the binary patching you made, but still having fun anyway. I made a fork of vanilla-conquer here, and adding stuff slowly : https://github.com/zelurker/Vanilla-Conquer/

For now I just added the funpark mission to the list of new missions as you did, seems like a good idea (it was done also by the remastered version). And I fixed a bug where it doesn't find the theme songs from themes if using some language different from english, because it just can't find the original titles used in the theme files in this case ! (using a french install). I'll probably look into adding these console missions next, and your other language support looks like a neat idea, so maybe later...
I wanted to add the function where you can stack a few units to be built in the remastered version but couldn't find this in their code !!! I might try to do it from scratch later.

For info on my side, fluent in C, less in c++ but I manage, less in asm, and not at all in c# ! (it's probably because I am a linux users and it's rare to use c# in linux). C is very close to a kind of universal asm in fact, that's why it was created at the origin, so you should like it if you really get into it !

Share this post


Link to post

In case you didn't know, openra seems to be written in c#, there : https://github.com/OpenRA/OpenRA

contrary to what the name seems to say, it's not limited to red alert, it recreates cnc, red alert and even dune 2k ! All this without the westwood source, quite impressive !

Now there are also some big differences in the game play, clearly their main target is the multiplayer game even if you can play the single player missions, all missions are available from the start through their interface. Lots of good ideas inside anyway... !

Share this post


Link to post
1 minute ago, zelurker said:

Now there are also some big differences in the game play

Precisely why all other open-source projects steer clear from it. It moves away too much.

Share this post


Link to post
1 hour ago, Plok said:

Precisely why all other open-source projects steer clear from it. It moves away too much.

I agree, but too bad the code is in c#, I could have borrowed some good ideas from them (their display is great, their gui is great (the one in c&c95 looks not too bad but it's actually totally dumb when you program it), and you can stack multiple units to be built).

Share this post


Link to post

Oh well slow bug fixes on my part, fixed the credits number which could get totally crazy in 64 bits because of a %ld with an int.

And fixed the bug where if you capture an ai refinery with a harvester in it and then sell the refinery, the ai will rebuild its refinery asap which is normal, but it will buy another unneeded harvester just before getting the free one which comes with the refinery ! This one was quite tricky, just added a delay based on JustBuilt, which is reset when the free harvester is given. It does wonders !

Also added the support for the [mod] section in conquer.ini and ModName inside to load a mix, and you can do it from the command line (useful in linux) with the -mod switch.

Also f4 unshrouds the map all the time now, you don't need to mess with a Debug_Flag...

I should look in the languages soon...

Share this post


Link to post

Note, since the release of the source code, I have kept a close eye on the source when researching any issues I've found, and have reported them on the VanillaConquer bug tracker. So some stuff is on there. Some of the stuff mentioned there will make its way into a new version of this patch which I'm preparing.

22 hours ago, zelurker said:

In case you didn't know, openra seems to be written in c#, there : https://github.com/OpenRA/OpenRA 

contrary to what the name seems to say, it's not limited to red alert, it recreates cnc, red alert and even dune 2k ! All this without the westwood source, quite impressive !

Now there are also some big differences in the game play, clearly their main target is the multiplayer game even if you can play the single player missions, all missions are available from the start through their interface. Lots of good ideas inside anyway... !

OpenRA never cared about keeping any parity with the original games, though. It's basically just its own game, in a C&C skin. I don't see much of a point in it from a C&C preservation / patching point of view.

Share this post


Link to post
Posted (edited)
4 hours ago, Nyerguds said:

Note, since the release of the source code, I have kept a close eye on the source when researching any issues I've found, and have reported them on the VanillaConquer bug tracker. So some stuff is on there. Some of the stuff mentioned there will make its way into a new version of this patch which I'm preparing.

Good to know. Well on the vanilla github stuff, did you notice they have some pull requests on hold for 3 years or more ? They currently have 41 open PR on hold for apparently an infinite time, some without any comments in them except the 1st post which is from the guy who created the PR.I opened a PR when I started work on this, which was rejected, and never took the pain to make another one after that, it's clearly a waste of time, it's like they decided they didn't want to evolve... ! A pity anyway...

It's even worse for the issues, currently 310 open issues. Notice that a project doesn't have to always fix all the issues, sometimes they can explain why they won't fix something before closing the issue, but here they just leave them here... !

For OpenRA, it's still a recreation of the games from scratch, based on nothing (well at least on the source level, they seem to use some assets from the games, some modified ones sometimes), so it's still some impressive work. It's surprising they didn't try to keep some more compatible mode, with their changes some missions become totally different to play and it's good thing you can skip some missions with their interface ! Anyway, no use to talk about it for now, at least for the source... Maybe there is something to do with these assets one day though.

About assets, there was a translation mistake in the french audio files in tiberian dawn for ever, the woman saying "batiment" when you try to build a unit or anything else when she should say "construction". I fixed it by getting the "construction" word from another recording and put it to replace the faulty one, after all these years this one is finally fixed (it was ridiculous in french !).

Edited by zelurker

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

×