(no title)
senand | 9 months ago
--- snip ---
There’s a lot of weird stuff in the C++ version that only really makes sense when you remember that this was made in flash first, and directly ported, warts and all. For example, maybe my worst programming habit is declaring temporary variables like i, j and k as members of each class, so that I didn’t have to declare them inside functions (which is annoying to do in flash for boring reasons). This led to some nasty and difficult to track down bugs, to say the least. In entity collision in particular, several functions will share the same i variable. Infinite loops are possible.
--- snip ---
This sounds so bad, and confirms my prejudice that gaming code is terrible.
nashashmi|9 months ago
naikrovek|9 months ago
game developers must consider things that people like enterprise developers never concern themselves with, like latency and performance.
these days, at least where I work, everything is dominated by network latency. no matter what you do in your application logic, network latency will always dominate response time. with games, there is no latency unless you are writing a multiplayer server, and there are many ways to solve that, some better than others.
playing a single player factorio game, having huge factories on five planets, robots flying around doing things for you, dozens of ships flying between planets destroying asteroids and picking up the rocks they leave behind, hundreds of thousands of inserters picking up items and putting them onto or removing them from conveyor belts, and updating the status of everything in real time at 60 frames a second kinda hints at what computers can do today if you keep performance a primary concern. corporate developers never have to think about anything even approaching this.
i'm convinced that 2-4 experienced game developers could replace at least 20 traditional business software developers at any business in the US, and probably 50 enterprise software developers anywhere. They aren't 5x-10x as expensive, either. Experienced game developers simply operate on another level than most of us.
hombre_fatal|9 months ago
Games are one of the hardest things you can build since they have end to end complexity unlike most projects that can be cleanly decomposed into subsystems.
lproven|9 months ago
See the _Taos_ operating system. Based around something that conventional programming knowledge said was impossible. Created by games developers because they could.
https://sites.google.com/site/dicknewsite/home/computing/byt...
TL;DR
All Taos code (except for some core device drivers for booting) is compiled for a nonexistent "Virtual Processor" (VP) and the VP bytecode is compiled to native code on the fly as it's loaded into RAM; the compiler is so efficient that the time delay of reading from hard disk is enough to generate native binaries with no significant delay.
Result: not only is the entire OS above the bootloader not just portable but will execute unmodified on any supported CPU from x86 to Arm to MIPS to PowerPC, but it was possible to have heterogenous SMP.
The Acorn RISC PC was an Arm desktop with an x86 second processor in a slot. Taos could execute on both at once.
Taos evolved into Intent and Elate, and nearly became the next-gen Amiga OS, before Tao Group collapsed. Some of the team used to hang out on HN.
The closest thing in the Unix world is Inferno, which is effectively UNIX 3.0 and is almost unknown today. Inferno embeds a bytecode runtime in the kernel, shared by the whole OS, and rewrites what was effectively Plan 9 2.0 in its own new descendant of C. So all binaries above the bootloader and kernel are cross-platform binaries that can execute directly on any CPU.
registeredcorn|9 months ago
Code can be terrible, but fun: interesting bugs created and found in novel ideas.
Code can be wonderful, but boring: a calculator application which is well written, but drab in implementation.
Code can be terrible, and boring: some poorly thought-out B2B product that has hundreds of edge cases, each of which have numerous, similar but distinct bugs.
Code can be wonderful, and interesting: Doom, etc.
unilynx|9 months ago
Suddenly having to prefix `this.` in JavaScript to every member bothers me a lot less