This is a great article about the topic! It covers everything.
But can someone explain this to me?
>Light is technically something called electromagnetic radiation and it has a frequency and wavelength. That wavelength can vary, depending on the energy of the wave. High energy waves have a higher frequency and shorter wavelength, and low energy waves have a lower frequency and longer wavelength.
>This means that the same amount of energy at different wavelengths will not be perceived as the same brightness. For example, a light with a wavelength of 555 nm (green) will appear brighter than a light with a wavelength of 450 nm (blue) even if they have the same energy.
The article asserts that the wavelength (thus color) changes with the amount of energy, but then it says that you can have light of different wavelengths (color) with "the same energy."
He confuses two different places there is energy. Light is made (this is a little bit of a cheat) of photons. Each photon has a wavelength λ, and a per photon energy E where E = hc/λ, h is Plank's constant and c is the speed of light constant. So energy and wavelength per photon completely determines each other (and the color of the light of that single photon).
These energies are very small. You can add a lot of photons per second, increasing the brightness of that color, and this now has the energy per second of all those photons. So you can have a lot of red photons which sum to some energy, or a different number of blue photons that sums to (very, very close) the total red energy.
These are the two energies he confuses in those two places.
The amount of energy in a wave depends on both its wavelength and amplitude.
So a "blue wave" has more energy than a "red wave" if both have the same amplitude (blue has a shorter wavelength, and energy is inversely proportional to wavelength). But you can have a "blue wave" with the same energy as a "red wave" if you increase the amplitude of the "red wave" to compensate for its longer wavelength.
So that means blue has more energy because it pulsates faster, and in spite of this we're less sensitive to it than we are to red, which pulsates slower. It's like our light sensitivity forms some sort of bell curve.
The most insane thing about this headline is that implies parents are giving their children devices with unfiltered access to the Internet and then the government needs to play wack-a-mole with every single website they come across to prevent children from accessing it.
I don't know about iOS, but on Android I have access to Family Link which means I can control what apps my kids can run off the app store, and I can control whether they can access explicit websites (according to google) or have free access. I know other parents that are well aware of this tool, but they have to make sure those phones or tablets are signed into with accounts they have ownership of. I think this is the direction that the government should be pushing for and making sure apple google and microsoft are all playing nicely to allow parents to manage devices under the family.
iOS is similar. You can also limit apps/books/movies/etc. by content age rating, block adult sites, etc. without parental approval (which just happens over messages).
There is even an on-device image classifier for images/video to blur pornography from messages and keep them from sending it to others.
That’s the hallmark of socialist countries. It used to be that where in Eastern Germany people would look to government for a solution, those in the West would start a business, or learn a new skill, or read self help books. Nowadays, the self help books are read only for entertainment, and people look to government as the solution to any problem, no matter where they are, or how individualistic and free market they call themselves as a nation.
Parents are absolutely giving children devices with unfiltered internet access. I think people here need to step out of their ivory tower. I would say most people don't even know to think about the things people here think about. "Unknowns unknowns", if you will. We all agree here that this is a bad idea. What percentage of the worlds population do you think reads Hacker News?
If you're going to say that, I think most people wouldn't even access websites to begin with. They spend most of their time on Youtube, Instagram, and TikTok.
I know people who don't know how to use Google because they only use a smartphone to browse scroll Instagram and Facebook. They're never going to access a website.
who wouldn't want the gov banning workers organizing collective action online? can you think of the damage to children if they mistake it for a Minecraft server? do you want to be responsible for that?
That's just par for the course in UK culture.
During American criminal trials, the jury is told not to watch the news.
During British criminal trials, the entire British press is legally forbidden from reporting on the trial.
Generally no, and that's a feature, not a bug. The main problem you run into is dynamically linked dependencies. If a program depends on some particular behavior in a particular version of a library that has been updated, it won't work on a modern system with modern libraries. You can work around it in most cases, but it's not particularly easy or straightforward.
Old programs with statically linked dependencies might work, but you run into issues where the GUI framework is broken or incompatible or your window manager doesn't like it. Lots of little random stuff like that.
Windows is best in class at backwards compatability, though whether that's a good thing is up for debate.
Not disputing the obvious advantages, but since you asked:
Being forced to maintain compatibility for all previously written apis (and quite a large array of private details or undocumented features that applications ended up depending on) means windows is quite restricted in how it can develop.
As a random example, any developers who have written significant cross platform software will be able to attest that the file system on windows is painfully slow compared to other platforms (MS actually had to add a virtual file system to git at one point after they transitioned to it because they have a massive repo that would struggle on any OS, but choked especially badly on Windows). The main cause (at least according to one windows dev blog post I remember reading) is that windows added apis to make it easy to react to filesystem changes. That’s an obviously useful feature, but in retrospect was a major error, so much depends on the filesystem that giving anything the ability to delay fs interaction really hurts everything. But now lots of software is built on that feature, so they’re stuck with it.
On the other hand, I believe the Linux kernel has very strict compatibility requirements, they just don’t extend to the rest of the OS, so it’s not like there’s a strict rule on how it’s all handled.
Linux has the obvious advantage that almost all the software will have source code available, meaning the cost of recompiling most of your apps for each update with adjusted apis is much smaller.
And for old software that you need, there’s always VMs.
Kind of a bad example. Firstly because you are comparing windows with the Linux kernel. The Linux kernel has excellent backwards compatibility. Every feature introduced will be kept if removing it could break a userland application.
Linus is very adamant about "not breaking userspace"
The main problem with backwards compatibility (imho) is glibc. You could always ship your software with all dynamic lobs that you need, but glibc does make it hard because it likes to move awkward and break things.
Glibc is one of the few userspace libraries with backwards compatibility in the form of symbol versioning.
Any program compiled for glibc 2.1 (1999!) and later, using the publically exposed parts of the ABI, will run on modern glibc.
The trouble is usually with other dynamically linked libraries not being available anymore on modern distributions.
Depends; you should be able to still run binaries from the 90s, but if it's dynamically linked and doesn't ship with the libraries finding compatible libraries might be a pain and it won't run out the box. If you have the source code, then it should usually compile with minimal or no changes unless it depends on very old libraries that have seen incompatible changes (which is often the case). One of the nicer things about Windows is that it's a much more comprehensive "batteries included" system.
To put this in some perspective, I used Debian's debootstrap to install Debian Woody (2002 vintage) on a Linux 5 (I think?) kernel. It all worked as expected. I suspect the XWindows protocol is fairly backward, and you could recompile everything with the gcc Woody shipped. I guess that says a thing or two about Debian maintaining backward compatibility with older package formats too.
I don't know what the issue with Linux is, but most projects should compile. I've compiled many old projects. You do need to tweak some flags at times because defaults change.
When you tweak game mechanics several times every day, keeping the tests useful is a large task. Basics can be tested. Map integrity can be tested. Most "normal UX" is hard to test, and even main functional tests tend to drift. (Source: a short involvement in actual gamedev recently.)
One can still write unit tests. I have been told from a couple different game devs that it's more because of release deadlines, and the cost of a bug is usually pretty small.
There are some game systems that lend themselves to unit testing, like say map generation to ensure that the expected landmarks are placed reasonably, or rooms are connected, or whatever. But most game interactions are just not easily "unit testable" since they happen across frames (eg over time). How would you unit test an enemy that spawns, moves towards the player, and attacks?
I'm sure you could conjure up any number of ways to do that, but they won't be trivial, and maintaining those tests while you iterate will only slow you down. And what's the point? Even if the unit-move-and-attack test passes, it's not going to tell you if it looks good, or if it's fun.
Ultimately you just have to play the game, constantly, to make sure the interactions are fun and working as you expect.
It would depend on how things are architected, but you could definitely test the components of your example in isolation (e.g. spawn test, get the movement vector in response to an enemy within a certain proximity, test that the state is set to attacking, whatever that looks like). I don't disagree that it's a hard problem. I run into similar issues with systems that use ML as some part of their core, and I've never come up with a satisfying solution. My strategy these days is to test the things that it makes sense to test, and accept that for some things (especially dynamic behavior of the system) you just have to use it and test it that way.
> How would you unit test an enemy that spawns, moves towards the player, and attacks?
You can easily write a 'simulation' version of your event loop and dependency inject that. Once time can be simulated, any deterministic interaction can be unit tested.
Which is all the same as what unit test was originally defined as.
You're right that "unit test" has taken on another, rather bizarre definition in the intervening years that doesn't reflect any kind of tests anyone actually writes in the real world, save where they are trying to write "unit tests" specifically to please the bizarre definition, but anyone concerned about definitional purity enough to quibble about it will use the original definition anyway...
I've heard the same excuses from ML engineers before introducing tests there, embedded engineers, robotics engineers, systems engineers, everyone has a reason.
The real reason? It's because writing tests is a different skill and they don't actually know how to do it.
Oh that's crap. I've been a software engineer for over 30 years. I love tests - I preach testing at my current place of work. I've also worked in games for about a decade. Testing in games is... not useless, but very much less useful than it is in general software engineering.
I have no experience in the gamedev industry. But based on the number of bugs I see in games, plus the size and quantity of post-release patches, maybe your perspective here is because you're not trying to hit a level of reliability at launch that would justify having more tests?
The problem with tests for games is that a lot of game code is in constant flux. A test suite introduces a not insignificant amount of rigidity to your codebase. Pivot a few concepts and you have dozens of tests to fix - or just invalidate entirely.
Very basic stuff that won't ever change can be tested - like whether the renderer is working properly - but that's never where the difficulty in game dev lies and its the stuff usually handled by a third party - library or engine.
> The problem with tests for games is that a lot of game code is in constant flux. A test suite introduces a not insignificant amount of rigidity to your codebase. Pivot a few concepts and you have dozens of tests to fix - or just invalidate entirely.
Sounds very much like the description of a big ball of mud.
An interesting gamedev video I saw recently basically boiled down to: "Build systems, not games." It was aimed at indie devs to help with the issue of always chasing new projects and making code that's modular enough to be able to reuse it.
But taking a step back, that very much feels like it should apply to entire games, where you should have boundaries between the components and so that the scope of any such pivot is managed well enough not to tank your velocity.
Other than that, it'd be just the regular growing pains of TDD or even just needing to manage good test coverage - saying that tests will eventually need changes isn't the best argument against them in webdev, nor should it be anywhere else.
> Sounds very much like the description of a big ball of mud.
I mean, yeah, kinda.
For any given object in the game world, it's funnest for that object to be able to interact with as many other objects as possible in as many ways as possible. A game object's handles for interaction need to be globally available and can't impose many invariants—especially if you don't want level designers to have to be constantly re-architecting the engine code to punch new holes for themselves in the API. Thus, a lot of the logic in a given level tends to live inside the callback hooks of level objects, and tends to depend on the state of the rest of the level for correctness.
Modularity is a property of high cohesion and low coupling, which are themselves only possible when you can pin down your design and hide information behind abstraction boundaries. But games are a flexible and dynamic enough field that engines have to basically let designers do whatever they want, whenever they want in order for the engine to be able to build arbitrary games. So game design is naturally a highly-coupled, incohesive problem space that is poorly suited to unit testing.
Of course, in their case it can actually be justified, because the game itself is very dependent on the logic working correctly, rather than your typical FPS game slop that just needs to look good.
Yeah I suspect Factorio's "complex game logic + simple(ish) 2d engine + minimal team structure" situation meant that the usual tradeoffs didn't apply. It's really cool that they pulled it off, though—I can't imagine it was easy, even then.
As a counter example I found this video essay about fixing a factorio bug fascinating. My main takeaway, I need better introspection hooks. I am not really programmer and I never really thought automated testing of user interactive parts was possible.
Cheats are why I stopped playing FPS's and only occasionally play Rocket League. I can't tell if I'm bad at the game or if everyone else is cheating. Half of the games on this list are FPS's.
I think the more important question isn't how you implement an anti-cheat, it's why some types of games attract cheaters.
When victory in a game isn't about strategy but just about how quickly you can click o character's head, and just by doing it once you win the game, that makes the whole game a clear target for cheating. Everyone cheats as the sniper, nobody cheats as the medic.
I think you could make an FPS that cheaters hate by designing it so that it requires at least 2 players to defeat a player on the opposite team, e.g. by giving everyone weapons of different type and needing two types to defeat an enemy.
Cheating and worrying about cheating in these matchmaking FPS games is a ridiculous thing to do. If you get matched with cheaters, and the ranking system actually works, they are cheaters whose cheat-augmented skill is equal to yours.
Game designers could have just worked on their ranking systems, and least the cheaters rocket off into their own domain of impossibly-high-elo games. Let there be a cheaters league. It could be fascinating, what’s fully-cheated gameplay look like? Just ban disruptive behavior like ddosing other players.
OTOH, artificially lowering your rank to stomp low-level players is a problem. But cheaters, as well as just legitimately really good players, can do this; the place to solve this is the ranking system.
I feel like it's more about trust. Once you stop trusting that you are NOT playing against cheaters, every match feels like you are just a walking target for someone else's entertainment.
To put it in another way: either I'm bad at a competitive game, or I'm playing against cheaters. Once you start feeling like that, neither scenario seems like an enjoyable time, so why play at all?
I feel like the biggest problem to me is that these types of games are INSANELY popular, but personally I'd rather play something less skill-based and more fun-based. These competitive games just keep appearing in front of me all the time despite that fact I don't enjoy them.
If the matchmaking is working properly, you should be winning around half of your matches once your ranking stabilizes, right? This doesn’t feel very good, but I don’t see any alternative.
I think that Team Fortress is pretty good in this regard... at least for some CTF maps and configurations... (I'm mostly recalling the original quake mod)... there were some maps that you had to have a scout/spy to be able to get past a strategically positioned automatic gun, and even then an HW guy by the flag was a pretty good secondary that was hard to get through.
Of course, I still remember seeing cheaters back then, in that game... usually quickly kicked off the server you were playing on.