spacedudescii Posted May 14, 2012 Share Posted May 14, 2012 Hey, I think Tiberian Dawn is a fun game, but all the multiplayer maps are really, really tiny - even 6p maps. This issue is really killing the game for me and my buddies. So are there anyway to play bigger maps? Big maps like there is in Tiberian Sun. Cheers Link to comment Share on other sites More sharing options...
Tore Posted May 14, 2012 Share Posted May 14, 2012 This is impossible I'm afraid. Link to comment Share on other sites More sharing options...
spacedudescii Posted May 14, 2012 Author Share Posted May 14, 2012 thank you Link to comment Share on other sites More sharing options...
Nyerguds Posted May 14, 2012 Share Posted May 14, 2012 The implementation of bigger maps has a ton of fringe problems: -all current savegames become unusable -all existing missions and maps become unusable... including the original campaigns. -we'd need a map editor that can actually make and edit those bigger maps So, while not exactly impossible to do (for me, with some serious research and hacking), it's just too much of a mess imo. Link to comment Share on other sites More sharing options...
Myg Posted May 14, 2012 Share Posted May 14, 2012 Well, im sure me or pichorra could make a basic map editor (eventually) for that purpose! Its just a matter of getting people together and making it happen. Link to comment Share on other sites More sharing options...
spacedudescii Posted May 14, 2012 Author Share Posted May 14, 2012 The implementation of bigger maps has a ton of fringe problems: -all current savegames become unusable -all existing missions and maps become unusable... including the original campaigns. -we'd need a map editor that can actually make and edit those bigger maps So, while not exactly impossible to do (for me, with some serious research and hacking), it's just too much of a mess imo. This is only single-player issues, right? So you could make a special release for MP only. New maps would have to be made, or upscaled, anyways. More work, yes. Link to comment Share on other sites More sharing options...
spacedudescii Posted May 14, 2012 Author Share Posted May 14, 2012 Well, im sure me or pichorra could make a basic map editor (eventually) for that purpose! Its just a matter of getting people together and making it happen. If there was motivation for such a project it would be awesome. I'm not completely convinced that it would be worth the trouble, though? I guess people could just play TS or RA, instead. So it becomes a question of Tiberian Dawn stands out enough on it's own as a CnC game. I'd like to see it happen, myself. But I'm not of the skills to help with such a undetaking, so it's easy to say. I'd donate for it, sure. Link to comment Share on other sites More sharing options...
Nyerguds Posted May 15, 2012 Share Posted May 15, 2012 This is only single-player issues, right? So you could make a special release for MP only. New maps would have to be made, or upscaled, anyways. More work, yes. The C&C1 singleplay and multiplay are both built on the same map loading system. You can't just go changing an underlying component to be different for the 2 modes. Most likely, I'd have to build a converter into the game itself to load maps and ini coordinates differently if some "MegaMap=" value in the ini is not set to True. I think that's the way RA1 does it. Link to comment Share on other sites More sharing options...
Ferret Posted May 15, 2012 Share Posted May 15, 2012 This is only single-player issues, right? So you could make a special release for MP only. New maps would have to be made, or upscaled, anyways. More work, yes. The C&C1 singleplay and multiplay are both built on the same map loading system. You can't just go changing an underlying component to be different for the 2 modes. Most likely, I'd have to build a converter into the game itself to load maps and ini coordinates differently if some "MegaMap=" value in the ini is not set to True. I think that's the way RA1 does it. We could possibly just make this feature a multiplayer only, feature. Link to comment Share on other sites More sharing options...
Revolutionary Posted May 15, 2012 Share Posted May 15, 2012 So do you mean Nyerguds that: The game could check for a string in the ini, for example that "MegaMap=" string, and rather then it could load a new map loading routine specifically for maps were MegaMap=Yes If no then thats my suggestion to the discussion. Link to comment Share on other sites More sharing options...
pichorra Posted May 15, 2012 Share Posted May 15, 2012 Well... I will post the little information that I know. -The game probably stores the .bin in a 'short array[4096];', meaning that every 2 bytes is a cell. -The game read the amount of the bin correnponding to the INI, using the width, height, X, Y (Height - X; width - Y, I think). If you make it read more than 64*64, the game crashes, probably due memory buffer overflow. (crash somewhere in the TiberiumClass) -I've expanded the map view ingame using cheatEngine and editing the X and Y variables. I did not took a look of what kind of vartype it is (char, short, int). -If you put an unit somewhere in the map, Decrease X, then raise it up wihout restarting the map, The unit will be deleted. (Use CheatEngine for that). We could possibly just make this feature a multiplayer only, feature. Well... I'm afraid we can't make it multiplayer-only. Unless Nyerguds copy the entire code somewhere in the exe (is there space?) and make a switcher for it. Link to comment Share on other sites More sharing options...
Nyerguds Posted May 16, 2012 Share Posted May 16, 2012 So do you mean Nyerguds that: The game could check for a string in the ini, for example that "MegaMap=" string, and rather then it could load a new map loading routine specifically for maps were MegaMap=Yes If no then thats my suggestion to the discussion. No, if I enlarge the map size internally, it'll be larger for ALL maps the game loads. I'd need to add special routines to load ORIGINAL maps into the bigger buffer correctly, by cutting them off every 64 cells, and force the system to go to a new 'line' after that. So basically, the ABSENCE of that 'MegaMap=yes' line would trigger a 'compatibility mode' for correctly loading old maps. Still, I know far too little about the map loading system to do this at the moment. Link to comment Share on other sites More sharing options...
Ferret Posted May 21, 2012 Share Posted May 21, 2012 So do you mean Nyerguds that: The game could check for a string in the ini, for example that "MegaMap=" string, and rather then it could load a new map loading routine specifically for maps were MegaMap=Yes If no then thats my suggestion to the discussion. No, if I enlarge the map size internally, it'll be larger for ALL maps the game loads. I'd need to add special routines to load ORIGINAL maps into the bigger buffer correctly, by cutting them off every 64 cells, and force the system to go to a new 'line' after that. So basically, the ABSENCE of that 'MegaMap=yes' line would trigger a 'compatibility mode' for correctly loading old maps. Still, I know far too little about the map loading system to do this at the moment. Simply remove the singleplayer maps from the game if that is so? Link to comment Share on other sites More sharing options...
Killa57 Posted May 24, 2012 Share Posted May 24, 2012 This sounds like fun Link to comment Share on other sites More sharing options...
Nyerguds Posted May 28, 2012 Share Posted May 28, 2012 Simply remove the singleplayer maps from the game if that is so? Did you even read what I wrote? It's not about single player or multiplayer; if I enlarge the internal map dimensions without writing a compatibility loading system, it'd simply invalidate ALL existing maps. If you mean "make a MP-only C&C with bigger map capability"... screw that. Supporting 2 different exes that need the same patching is a mess. I wrote the language system exactly to get rid of that kind of situation; if I ever do this, be damn sure I'll write that compatibility system to avoid the same thing here. Link to comment Share on other sites More sharing options...
EagleEye Posted May 30, 2012 Share Posted May 30, 2012 Argh, I want to say "just make a variable that defaults to 64 that controls the width and height of the internal map, and set it to the square root of half the size of the .bin file", but I know you'd already be doing that if it were as easy in ASM as: int internalsize = Math.Sqrt(mapfile.Length/2); byte[] map = new byte[internalsize*internalsize]; //etc... Use internalsize in place of hardcoded 64 It's times like this I wish I could understand x86 ASM better. Link to comment Share on other sites More sharing options...
Nyerguds Posted May 30, 2012 Share Posted May 30, 2012 The main problem is that that buffer isn't defined on map load, it's all set up on game start. So whatever I do WILL affect all maps. As for that square root of half the size of the .bin file... I don't know if I even got any way to calculate square roots. asm doesn't exactly come with a math library. As with vectors (automatically expanding arrays, see List/Arraylist in C#/Java), I can use it if the game uses it anywhere, and if I find out where the game uses it. Otherwise, no luck. And I'd still have to find all relevant occurrences of that '64' value. Which, being a <128 value, will typically be stored in 1 byte, making it annoying to replace by a reference since references are always 4 bytes. Link to comment Share on other sites More sharing options...
pichorra Posted May 30, 2012 Share Posted May 30, 2012 int internalsize = Math.Sqrt(mapfile.Length/2); byte[] map = new byte[internalsize*internalsize]; isn't internalsize * internalsize = mapfile.Lenght/2? So why the square root? Link to comment Share on other sites More sharing options...
Nyerguds Posted June 1, 2012 Share Posted June 1, 2012 Because the size is the amount of cells. Square root is to get the side length of a square you only know the surface area of. Link to comment Share on other sites More sharing options...
EagleEye Posted June 1, 2012 Share Posted June 1, 2012 The square root problem could be worked around by making a function like this: int SquareRoot(int input) { switch(input) { // case 4096: // return 64; case 16384: return 128; case 65535: return 256; default: return 64; } } (Or you could look up an x86 assembler with a Math library. I've used one when I was trying to make a CnC disassembly.) About the "initialized at start" thing: if you change MapBuffer[4096] to MapBuffer[65535], does the game change at all? Though changing every mention of 64 in the context of MapLength to a reference to a variable, both in finding and repointing, sounds like it'd be a huge PITA. A disassembly would make it a lot easier, but someone would need to make a disassembly first (Though if there was ever a PC game with a community that could make a disassembly of it, I'd say it's Command and Conquer. 1.06, Ares, Arda, OpenDune. Not to mention the various Assembly-hackers here and at PPM/RenX.). Edit: n^2 = sum of first n odd numbers. e.g., 16 = 4^2 = 1+3+5+7 (first 4 odd numbers) In the early 60s as engineering students with only mechanical adding machines, this is what we used to find square roots. Subtract successive odd numbers from the number, keeping track of the number of numbers subtracted. When the original number decreases to zero the number of odd numbers subtracted equals the square root. And it works. I have no clue how easy it'd be to implement in ASM, but all a square root needs is addition, subtraction, and a while loop (I have no clue how a while loop works in ASM). Also, I learned 65535 isn't a square root (I'm a moron sometimes). using System; namespace SquareRoot { class Program { static void Main(string[] args) { Console.WriteLine("4096: " + SquareRoot(4096)); //64 Console.WriteLine("16384: " + SquareRoot(16384)); //128 Console.WriteLine("65536: " + SquareRoot(65536)); //256 Console.WriteLine("262144: " + SquareRoot(262144)); //512 Console.WriteLine("1048576: " + SquareRoot(1048576)); //1024 Console.WriteLine("65535: " + SquareRoot(65535)); //0 Console.WriteLine("65535: " + Math.Sqrt(65535)); //255.998046867549 Console.ReadLine(); } static int SquareRoot(int input) { int tosubtract = 1; int subtracted = 0; while (input > 0) { input -= tosubtract; subtracted++; tosubtract += 2; } if (input < 0) { //throw (new Exception("Internal Error: Not a Square Root")); return 0; } return subtracted; } } } Link to comment Share on other sites More sharing options...
Nyerguds Posted June 3, 2012 Share Posted June 3, 2012 About the "initialized at start" thing: if you change MapBuffer[4096] to MapBuffer[65535], does the game change at all? That should be MapBuffer[65536]. Anyway, as I said, I haven't looked into that stuff yet, but I wouldn't trust it to save and load that correctly. If it's really hardcoded to 64x64 everywhere, it's probably no problem, but if it uses the buffer size to see how much to read from savegames, then, for current savegames, it'll read way too much as being 'map information' and probably crash when it runs out of file to read. Also, knowing WW's lack of boundary checks, you could end up with maps that are technically 64x1024. Though changing every mention of 64 in the context of MapLength to a reference to a variable, both in finding and repointing, sounds like it'd be a huge PITA. Eh. I'm used to that. I've done the same thing for all occurrences of the internal number of units, weapons, themes, etc. This won't be so different. Just a more annoying value to look for. A disassembly would make it a lot easier, but someone would need to make a disassembly first (Though if there was ever a PC game with a community that could make a disassembly of it, I'd say it's Command and Conquer. 1.06, Ares, Arda, OpenDune. Not to mention the various Assembly-hackers here and at PPM/RenX.). Umm, what do you think I've been DOING the past few years? This whole topic is about a possible enhancement in C&C95 v1.06, which, incidentally, is my project. It's just, I'm not into just randomly researching every single unknown bit of the exe. Guys like Hyper think that's a fun way to pass the time, but tbh, I find it boring, so I leave it to Hyper. I might check his IDA database to see of there's anything on map init/loading/handling in there, but the latest one he sent me is for a later IDA version than I got, so, meh. You have to understand though, this is really just a hobby for me. I put some work into it whenever something piques my interest. And to be honest, this whole map expansion thing is pretty low on my interests list. I mean, I don't even have a big map to test anything on. The Sole Survivor maps are big C&C1-type maps, but they're weird; their .bin files aren't all the same size. I have no idea how they work. Link to comment Share on other sites More sharing options...
EagleEye Posted June 3, 2012 Share Posted June 3, 2012 Umm, what do you think I've been DOING the past few years? This whole topic is about a possible enhancement in C&C95 v1.06, which, incidentally, is my project. It's just, I'm not into just randomly researching every single unknown bit of the exe. Guys like Hyper think that's a fun way to pass the time, but tbh, I find it boring, so I leave it to Hyper. I might check his IDA database to see of there's anything on map init/loading/handling in there, but the latest one he sent me is for a later IDA version than I got, so, meh. By "disassembly", I meant "reassemblable disassembly". Something that you can turn into an .exe with an assembler. I'm saying that with people like you and Hyper around, Command and Conquer is much more likely to get a reassemblable disassembly than, say, Lego Island or Ultima 9. Though that's still not likely, since you guys have been working around not having a way to reassemble for years now. You have to understand though' date=' this is really just a hobby for me. I put some work into it whenever something piques my interest. And to be honest, this whole map expansion thing is pretty low on my interests list.[/quote'] I know, Nyer. I'm spitballing ideas. When I say "if you change MapBuffer[4096] to MapBuffer[65535], does the game change at all?", I'm noting that idea mainly in case you ever become interested. Anyway, if Hyper really does enjoy documenting things at random, then that would be good news for me. School is supposed to start tomorrow, but my highschool fucked up and I'm probably going to have one last Summer, so I might as well spend the rest of the month working on a disassembler. I hate how Summer keeps getting shorter each year. Link to comment Share on other sites More sharing options...
Killa57 Posted June 4, 2012 Share Posted June 4, 2012 Umm, what do you think I've been DOING the past few years? This whole topic is about a possible enhancement in C&C95 v1.06, which, incidentally, is my project. It's just, I'm not into just randomly researching every single unknown bit of the exe. Guys like Hyper think that's a fun way to pass the time, but tbh, I find it boring, so I leave it to Hyper. I might check his IDA database to see of there's anything on map init/loading/handling in there, but the latest one he sent me is for a later IDA version than I got, so, meh. Is there a public place i can get his IDA database id like to see which bytes or memory addresses are config to what in the game. I can read C# and understand what the code is doing somethimes, but cant write it worth a lick. I would like to look at the IDA and the documentation hyper has for C&C to give me a better understanding at disassembly and how the game works on the inside. Link to comment Share on other sites More sharing options...
EagleEye Posted June 4, 2012 Share Posted June 4, 2012 There's no public place that I'm aware of, but Hyper will surely send you his database and any documentation he has, though I'm not sure he has any proper documentation. I know for a fact Nyer doesn't, but I've never really talked with Hyper that much. Link to comment Share on other sites More sharing options...
Myg Posted June 4, 2012 Share Posted June 4, 2012 Hey Nyer! Don't forget me! If you ever need to know how the .bin file works for SS I would be glad to explain sometime! :-) Cause, like you with C&C95 ; its been a hobby/challenge of mine for the past few years. Not that I see how this fits into the topic at hand, though... Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now