• 0 Posts
  • 83 Comments
Joined 2 years ago
cake
Cake day: June 25th, 2023

help-circle

  • I don’t think OOP’s nature makes them necessary, so much so as it enables them and popular programming principles encourage them. I think they’re a good thing, especially if there’s a way around them in case you can’t get the public interface changed and it doesn’t work for you, especially for performance reasons, but that should be done with care.

    Funny story, when modding Unity games using external modloaders you’re writing C# code that references the game’s assemblies. And with modding you often need to access something that the developers made private/protected/internal. Now, you can use reflection for that, but a different trick you can use is to publicize the game’s assemblies for referencing in your code, and add an attribute to your assembly that tells the runtime to just… Let you ignore the access checks. And then you can just access everything as public.


  • If it was a single question, that does sound lame, my other thought was that those “online polling tools” might not be viable because you can’t put internal company communications into them… But if it’s stuff like food choices or something, then that might also not be a problem.

    That said, my point still stands - what you describe does sound like what I’m saying. If you make a sheet with a dedicated field to put the answer into, it should be possible to reliably automate pulling out answers from all the files with excel-level knowledge, and without any additional sites or servers, just spreadsheet editing software and email.









  • I think you’re wrong about one thing - it’s not about compute cost, but about complexity of accounting for latency. You could check if the player can see the enemy they’re claiming to have shot, but you really need to check if they feasibly could’ve seen the enemy on their computer at the time they sent the packet, and with them also having outdated information about where the enemy was.

    The issue gets more complex the more complex the game logic is. Throw physics simulation into the mix and the server and clients can quickly diverge from small differences.

    Ultimately, compensating for lag is convoluted, can still cause visible desync for clients (see people complaining about seeing their shots connect in CS2 without doing damage), and opens up potential issues with fake lag.

    More casual games will often simply trust the client, since it’s better for somebody to, say, fly around on an object that’s not there for other players, than for a laggy player to be spazzing out and rubberbanding on their screen, unable to control their character.




  • Both java and go seem excessively complex at runtime for fundamental system utilities, featuring garbage collection. Rust, on the other hand, keeps the complexity in the compiler and source, keeping the runtime code simpler. And of course it’s doing that while trying to make it easier to manage memory and harder to make mistakes, without forcing extra runtime logic on you.



  • I think most of the work is in the fact that there often isn’t an “equivalent call”, and it can be quite a lot of code to make it work. One funny thing is the whole esync-fsync-ntsync issue, where synchronization is done differently on Linux and on windows, and translating it was a big performance hit, and difficult to do accurately. If I understood correctly, esync, fsync and ntsync were a series of kernel patches implementing additional synchronization code in the kernel, with ntsync actually replicating the windows style.




  • Framework let you swap everything

    I think there’s still a pretty big asterisk on that, because laptop parts are generally not built to be swappable… So I don’t think you can swap the CPU without the rest of the mainboard, and some parts like the CPU cooler are probably tied to the specific variant of mainboard and need to be swapped together if you want to switch CPUs.

    They do let you swap out parts that are reasonably swappable, so it’s pretty much a guarantee you’ll be able to upgrade storage and memory, and even where you can’t swap to different parts they make sure you can replace broken parts more granularly, so it still seems like a good deal.