Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 2024-06-28 in all areas

  1. int reverseMostSignificantBit(uint64_t n) { if (n == 0) return -1; // If n is 0, there is no significant bit set. int msb = 63; // Start with the highest bit position (63 for 64-bit numbers) uint64_t mask = 1ULL << 63; // Initialize the mask to check the highest bit while (mask > 0 && !(n & mask)) { msb--; mask >>= 1; // Move the mask to the next lower bit } return msb; } That's a naive way for that function. I must say I'm not yet convinced of your approach but we'll see. Another simpler version depending on the number size, might make a speed difference. int mostSignificantBit(uint64_t n) { if (n == 0) return -1; // If n is 0, there is no significant bit set. int msb = 0; while (n >>= 1) { msb++; } return msb; }
    2 points
  2. Ya supposed to suggest some numbers, broham. Yer a balancer? (Maybe I'm mistaken). I got you a decent ship concept. Now suggest some stats. The whole point of this exercise.
    2 points
  3. We should definitely play some water maps so we are forced to make ships to help inform the ship on ship balance. It probably won't be fun, but it would be good navy is balanced upon a27 release.
    2 points
  4. I achieved this in my non-random buildingAI experiements. Tbh I think a faster fire rate would be fine too as an interim measure. This would be of interest anyway for onagers. I could do a round of updates at some point to address the points made here.
    1 point
  5. 1. Foley/sound effects for ranged ships can be done if someone creates very simple idle animation for each one that we can use for the attack animation. For units, it is required to have an animation to trigger a sound. 2. Ramming ships need a ramming animation. The Xiongnu battering ram serves as a good example of what could be done. 3. I do indeed would like to see Arrow Ships fire volleys of arrows instead of one at a time. I think there may be a patch somewhere for that. And then be awesome for the arrow ship tech to add arrows to this volley instead of reducing attack time. 4. Balance etc. This was a first draft of the ship stats. Put into the community mod for yall to suggest good stat values. I guess a few rounds of idle complaints are necessary before the real work is done. For instance, I would suggest (among other things!!2) tightening up the accuracy of warships so they are stronger against land units and fishing boats. 5. Let's hold off on making the tech tree as bland and generic as the land tech tree please. 6. Things added despite flaws so that ppl may be inspired to fix them.
    1 point
  6. Ok, so I was checking the isqrtEst64 against isqrt(), and they are exactly the same when P = 0. However, because I am using SLD2's "SDL_MostSignificantBitIndex32(n)" to get log2, large integers overflow. u64 sqrt_lo(const u32 n) noexcept { u32 log2floor = SDL_MostSignificantBitIndex32(n); return (n != 0) << (log2floor >> 1); } u32 isqrtEst64(u64 n, u8 P = 0) { u32 est = sqrt_lo((u32)n); u32 b = (u32)n; ... The nice thing is the larger values don't occur in fights, I guess they happen in map generation and pathing, probably a lot of other things. As far as I can tell, the patch is working, but I am sure there are more improvements possible. So @Stan` I would need to come up with a 64 bit equivalent to SDL_MostSignificantBitIndex32(n) in order to see if this sqrt approach could be faster than the current isqrt().
    1 point
  7. Arrow ships are worthless against fishing ships too. Fire ships do literally zero damage against fishing boats. You're better off ignoring enemy war ships and building more fishing boats because it takes multiple minutes for an entire arrow boat to kill one fishing ship despite the arrow ship being more expensive in resources, build time, and ship cost. The tech tree is also unnecessarily extensive and complicated. A lot of this should just be consolidated into like two techs (if naval ever actually becomes a real aspect of the game it can be built out again but right now there are so many techs that each do such limited things that no tech would ever be worth getting). The scout ship seems to have no purpose. Overall, there is no reason to ever build a war ship to fight. Navy needs a bit of work
    1 point
×
×
  • Create New...