Nice work around there, @OmnipotentEntity how is working going with servers? I'm wondering when there will be one stable push with the build where the leak was fixed.
int a = 1; int b = 2; a & b = 0b1 & 0b10 = 0 You might mean (a && b) == 0. In which case, I'm willing to bet that the compiler makes the exact same assembly code. I'll let a profiler guide my optimization in this case. I try to write readable code first, and then only if it becomes a problem spot, I'll start doing bitwise hacks. I thought I had fixed the leak with the last stable. If you're still leaking, I'm going to need to seriously start raging at the compiler. The last 3 memory leaks have been compiler errors...
Optimization is optimization. Even if it seems small, this will be a net improvement, because well -- infinite universe + multiplayer. Good find.
I'm quite sure there is an issue in the code: Code: Int maxInt; if ((a < 0) != (b < 0)) { maxInt = std::numeric_limits<Int>::min(); } // no else? what's the point of doing the above if statement? maxInt = std::numeric_limits<Int>::max();
I just love the fact that they post now daily, it's hard to just believe in progress if we don't hear anything about it.
I really agree with you. There is a difference between knowing they working on and see what they are working on. It is really great. Continue your good work.
I agree with people thanking the devs for updating us. While we assume that work is happening, it really helps to actually see posts showing this. There have been a few projects that I was highly anticipating that suddenly became vaporware without any update to the community. So when I see actual updates from developers (and not PR monkeys) it is really nice. So, thanks Omni (and everyone else) for the updates, and please keep them coming!
With latest stable release you mean the Enraged Koala Update 8 from 26-04-2014 right? I didn't know it was in already
You're spoiling us with the daily updates. I find myself checking the site twice / thrice a day now. (don't stop)
...Chucklefish actually posting daily news scares me am U still in Chucklefish where am I who are you
Sorry, as I mentioned in this reddit post, wordpress did a great job mangling the code as I copy pasted it, and I have no idea why. It ate my template parameters, it ate a few other things, and it ate an else block, or perhaps I revised it out as I was pasting and then fixing it on accident. I've corrected the code when I found out. If you're interested in poking at this, this is my test suite for this function. Code: TEST(MathTest, All) { { uint16_t a = 1; uint16_t b = 1; while (a != 0 || b != 0) { uint64_t a64 = a; uint64_t b64 = b; EXPECT_EQ(min<uint64_t>(a64 * b64, std::numeric_limits<uint16_t>::max()), noOverflowMult(a, b)); if (min<uint64_t>(a64 * b64, std::numeric_limits<uint16_t>::max()) != noOverflowMult(a, b)) coutf("failed on %s, %s\n", a, b); ++b; if (!b) ++a; } } { int16_t a = std::numeric_limits<int16_t>::min(); int16_t b = std::numeric_limits<int16_t>::min(); while (a != std::numeric_limits<int16_t>::max() || b != std::numeric_limits<int16_t>::max()) { int64_t a64 = a; int64_t b64 = b; EXPECT_EQ(clamp<int64_t>(a64 * b64, std::numeric_limits<int16_t>::min(), std::numeric_limits<int16_t>::max()), noOverflowMult(a, b)); if (clamp<int64_t>(a64 * b64, std::numeric_limits<int16_t>::min(), std::numeric_limits<int16_t>::max()) != noOverflowMult(a, b)) coutf("failed on %s, %s\n", a, b); if (b == std::numeric_limits<int16_t>::max()) { if (a == std::numeric_limits<int16_t>::max()) { break; } else { b = std::numeric_limits<int16_t>::min(); ++a; } } else { ++b; } } } } It's using the google test suite. However, it's easy to revise to not rely on that. coutf is pretty much just a stringstream and safe printf that we made out of the tinyformat library. Other than that everything else is more or less completely standard.
I think that CF must be proud of their fans. Do you see how they try to help CF making one of the best games will be on the Earth? (I don't know in other solar systems).