Massive Humans vs Humans Game/Lets Player Tracker

Who do you think will win?

  • AstralPhaser

    Votes: 5 7.5%
  • Il Principe

    Votes: 2 3.0%
  • Koshling

    Votes: 14 20.9%
  • Hydromancerx

    Votes: 17 25.4%
  • Vokarya

    Votes: 4 6.0%
  • Acularius

    Votes: 3 4.5%
  • Thunderbrd

    Votes: 8 11.9%
  • ls612

    Votes: 5 7.5%
  • JosEPh_II

    Votes: 8 11.9%
  • Praetyre

    Votes: 1 1.5%
  • Epi3b1rD

    Votes: 0 0.0%

  • Total voters
    67
I couldn't play yet, but I believe in 3 hours I'll have the turn done.

Meanwhile I can at least continue with the code stuff.

@T-Brd

If someone were fully qualified to make this upgrade, I'd be pleased if they joined the team and did so.

I wish I could be that person, it would be incredible to help such a great mod like C2C, but I don't know if I can do something like that. I don't have the setup to compile the DLL and test the game, nor I know how exactly to test this, but I could try.

Changing the size of the list is trivial, it's just a matter of changing FLTA_ID_SHIFT to a number higher then 13. The only thing that could stop working properly inside of FFreeListTrashArray would be the use of m_iCurrentID.

But talking about m_iCurrentID, the only purpose it serves is to track Freed Slots by their use. I'll try to explain with an example because my english isn't good enough to explain it in a phrase:

If we have iNumSlots = 16, Slots 1,2,3 and 4 have been filled in order by the add function without any removal until now (so all the rest haven't been touched yet). So m_iLastIndex = 3 (last index used, which refers to Slot 4, as the index starts in 0). The add function resets iLastUsed of the node it picks. iLastUsed starts as INVALID_INDEX for every node and then it's always updated by the add function to copy the m_iCurrentID of the moment.

Now, m_iCurrentID is updated whenever an available slot, which has been picked to be filled, has iLastUsed == m_iCurrentID, and the new value of m_iCurrentID becomes twice its previous value (equivalent to m_iCurrentID <<= 1).

Whenever the add function is called, it first checks for freed nodes, then if there are any, it cycles through them until it finds the first node which has iLastUsed != m_iCurrentID, and sends this node to be filled by the rest of the function. Only if it doesn't find one in that criteria, that it then sends the top of the stack, which will have iLastUsed == m_iCurrentID, and because of that it'll update the value of m_iCurrentID.

Now to end this explanation, this m_iCurrentID is used so each time we must choose a Freed Slot to be filled, we choose one which has been used less times then the others (excluding nodes which have never been used yet). So using the example, imagine we use the removeAt function to exclude nodes 2 and 3 in this order, and then we add a new node again (which will be added to Slot 3 because it's the top one in the Freed Nodes Stack), and finally we remove node 3 again. This means when we try to add a node again, it'll have Slot 3 in the top of the Freed Nodes stack, but as it has been used twice, the function will then choose Slot 2 to be filled instead, because it has only be used once.


I hope I could be clear in this explanation, because I'd like to know: Why is this an advantage? What advantages are brought by being sure not to reuse a Slot before reusing other Slots, which have been used less times? I understand using Freed Slots prior to never-used Slots (so to avoid reaching the List Cap), but why Freed Slots with less uses are better then those with more uses?


Because if we can just remove this mechanic, not only would we improve the performance of the function (a good example would be not to lose a long time to search for the correct available Slot to put a new unit after a massive battle which had lots of dead units) but also would remove the only thing in this file that conflicts with making the MAX_BUCKETS higher then 2^13, because m_iCurrentID is a counter using the other unused 19 bits of MAX_BUCKETS (and by increasing MAX_BUCKETS we would be reducing the range of action of m_iCurrentID, which can break the List mechanic)
 
I'll reply later tonight when I have more time bro. If all that's intimidating you is getting setup to work with the DLL then I THINK I can help you with that but it'll take some time. But believe me, we definitely need more minds on cases like these than just my own. Much of what you explained I've already sorted out but you do understand it to a better depth. And if you grasp that, then I'm sure many other issues that give me problems could be something we could use your help with. I'm no master programmer here... just a guy who's been learning as I go. When I started with my first modification (Divine Prophets) I was mostly walked through the whole process, aided by reading a tutorial on how to program that I could only grasp up to a certain point. It's been a long journey to get to where I am and I still feel there's more I don't know than what I do.
 
I'm having some troubles playing the game, I don't know why yet. Later today I'll be home and will read your reply and try to understand what's happening here. At least I can load the savegame and play, but I saved the game and loaded later to continue playing my turn, and it crashed on the Initializing.
 
I'm having some troubles playing the game, I don't know why yet. Later today I'll be home and will read your reply and try to understand what's happening here. At least I can load the savegame and play, but I saved the game and loaded later to continue playing my turn, and it crashed on the Initializing.
PBEM is funny when it comes to saving and continuing later. Try just taking the turn all the way through from the original.
 
I believe we might have come back to a similar error that happened in Koshling's turn. I've tried loading Hydro's turn after I completed mine and generated the savegame to send him, but it crashes in the Initializing process, the same thing which was happening when I tried to load a save I generated to play my turn in two sessions instead of just one. I updated the SVN to see if I could be missing the newest DLL, but that wasn't the case. To be sure I copied the DLL from the svn folder to the mod folder again, because maybe I had forgotten to do that with the latest version, but the error persists. Maybe someone hasn't updated to the latest DLL and played prior to my turn?

@T-Brd
Thanks for the compliments man! It means a lot to me. My programming knowledge comes mostly from college, which I'm still coursing. So it's a lot more theoretical then practical, which may explain why I feel I can do so little, but it seems I'm already good enough to give substantial help, which is great! I feel great to work in a game, it was always something I really liked. It started back in the 90s when I first used the Map Editor of Age of Empires (I wasn't even 10 y.o. yet), but only in 2004-2005 that I started getting some programming into my map edits in Warcraft III.

So if you can help me setup the environment to test the DLL I'll be glad to start testing stuff. And I would be honored to participate in such a great Mod's dev team.
 
I believe we might have come back to a similar error that happened in Koshling's turn. I've tried loading Hydro's turn after I completed mine and generated the savegame to send him, but it crashes in the Initializing process, the same thing which was happening when I tried to load a save I generated to play my turn in two sessions instead of just one. I updated the SVN to see if I could be missing the newest DLL, but that wasn't the case. To be sure I copied the DLL from the svn folder to the mod folder again, because maybe I had forgotten to do that with the latest version, but the error persists. Maybe someone hasn't updated to the latest DLL and played prior to my turn?
Theoretically, this must mean someone didn't update the dll before they took their turn. So would those that have taken their turns recently please confirm they updated the dll right before they took their turns?

So if you can help me setup the environment to test the DLL I'll be glad to start testing stuff. And I would be honored to participate in such a great Mod's dev team.
First of all, you cannot be using a steam version. I'm hoping you are working with disks for your BtS base. Second, I assume you have Visual Studio. What year?
 
Confirmed, all of my files are identical to the current files in the "C2C MP" SVN. I thought that they were, but tried Updating the folder anyway, and nothing was updated. Yes, I had done that before taking my turn of this one, so both of my recent saves are good.
 
Confirmed, all of my files are identical to the current files in the "C2C MP" SVN. I thought that they were, but tried Updating the folder anyway, and nothing was updated. Yes, I had done that before taking my turn of this one, so both of my recent saves are good.
Ok. I'm sure Koshling updated his dll before playing the turn as well. So... hmm... I'll have to try to load it and see what I get here.

There is another theoretical possibility that could be causing a crash - and then it could be something completely new. I'm wondering if I've incidentally made it possible to setup two units with the same index going into play at the same time. And if that happens, how would the system react? Would it crash immediately or at some other odd stage? Will have to take a look but the VOLUME counting of unit IDs in play should be remaining accurate if all have updated properly. And that's the most common reason for failure so far.
 
What advantages are brought by being sure not to reuse a Slot before reusing other Slots, which have been used less times? I understand using Freed Slots prior to never-used Slots (so to avoid reaching the List Cap), but why Freed Slots with less uses are better then those with more uses?
See, those kind of questions plague me about this system as well. There is so much taking place here that doesn't immediately make sense and I get the feeling it comes down to deeper computer science issues rather than logical benefits to the game itself.
 
Are you sure? Isn't it enough if I commit the savegame after my turn? I'll give my password if you need it, but if you could do it without needing to play my turn I would be really glad. So many sensitive stuff I wouldn't like to share with a player that's better then me in almost every graph :p
 
Are you sure? Isn't it enough if I commit the savegame after my turn? I'll give my password if you need it, but if you could do it without needing to play my turn I would be really glad. So many sensitive stuff I wouldn't like to share with a player that's better then me in almost every graph :p
Pfuf.

It's nothing I haven't seen before ;) (That's what they say right?)

I would like to evaluate the crash on the next player's load, yes, but if it's what you suspect, I'm probly gonna need to see what ya got. Or you could try to fix it yourself ;)
 
It's 2 AM here now and I'm going to sleep pretty soon, so if you want I can give you either my password or the crashing turn commit or both still today. I believe you'll be faster then me.

But how do you debug CIV?
 
It's 2 AM here now and I'm going to sleep pretty soon, so if you want I can give you either my password or the crashing turn commit or both still today. I believe you'll be faster then me.
I'd prefer to see the updated save I suppose.
But how do you debug CIV?
With Visual Studio. So back to that... what version (year) of VS do you possess, or do you have it at all? 2008 or 2010 is what I would advise but I think Alberts opened up another more recent one.
 
I have commited the save. I didn't play my turn, I simply passed it as soon as I could, so this is not my turn done. I hadn't had the time to do my turn after that crash that happened while I was doing it.

I have Visual Studio 2008, and my CIV isn't from steam
 
I have commited the save. I didn't play my turn, I simply passed it as soon as I could, so this is not my turn done. I hadn't had the time to do my turn after that crash that happened while I was doing it.
Well, the point is to have you take the full turn and commit it so that if we can fix it at that crash point you won't have to do it again.. So by all means take your turn in full when you can tomorrow. I can't look at this tonight anyhow.

I have Visual Studio 2008, and my CIV isn't from steam
Perfect! Now, there's an extra file you need in your VS toolkit but I can't recall what that is. There are references on how to get setup to mod the dll/SDK here on the forum and they can guide you to getting that file in the first post. I'm pretty sure it's stickied in an appropriate location. See if you can find what I'm talking about there. Afterwards, the rest is a matter of just fixing up the local references.
 
Since we are kinda discussing odd things happening in the game, I thought I'd put this here. I have a single player game going using this version of C2C. I'm thinking this may have been fixed already in the main, but I would have no idea where to look. Anyway...
Civ4ScreenShot0833.JPG
 
Since we are kinda discussing odd things happening in the game, I thought I'd put this here. I have a single player game going using this version of C2C. I'm thinking this may have been fixed already in the main, but I would have no idea where to look. Anyway...
View attachment 457433

Is the problem because the Amazon :queen: is a blonde? :mischief:

:drool::cowboy:

:groucho:

JosEPh
 
Perfect! Now, there's an extra file you need in your VS toolkit but I can't recall what that is. There are references on how to get setup to mod the dll/SDK here on the forum and they can guide you to getting that file in the first post. I'm pretty sure it's stickied in an appropriate location. See if you can find what I'm talking about there. Afterwards, the rest is a matter of just fixing up the local references.

Now that you're saying this, I believe I have tried to setup the environment here to compile Legends of Revolution's DLL in this pc, I remember following some steps in this forum to edit LoR's DLL. I had totally forgotten this. I'll take a look at it but first I'll do my turn.

@MagnusIlluminus
Probably a XML reference missing. But what really got my attention are the numbers. In my single player attempts to learn C2C, I only got into the Classical Era at most. There you're in the medieval era, and you produce 10K of Science. And Chivalry will take 3 turns to get. This is unbelievable. I can't even think how much can be produced in the first era after the Modern one.

We will never finish this game :crazyeye:, unless it's done in a pretty early technological era
 
Top Bottom