4 ms·
"I use JSON for just about every data file format in my games." Not to be mean, but this has the trifecta of amateur programming: - JSON - Games - One solutio
by TZubiri 1y ago
"I use JSON for just about every data file format in my games."
Not to be mean, but this has the trifecta of amateur programming:
- JSON
- Games
- One solution for everything.
Pro tip, you can store variables as they are in memory to disk. Got 1 million 2D points representing units? Each point is a couple of floats? You can store each float as-is, write the amount of floats as an int (4bytes), the first float is the X coord, the second the Y coord, (4 bytes each), then repeat 1M times, boom you just solved that in 8MB, and in a couple of miliseconds of compute. Bonus point, no escaping, no import json, just a programmer programming.
- dxdm 1y ago> Not to be mean, but this has the trifecta of amateur programming But you are being mean. Also, the guy who wrote the article is no amateur, but a seasoned veteran who's likely been storing floats in files for decades. Check him out, you might be surprised. https://www.grumpygamer.com/about/ https://www.grumpygamer.com/about/
- TZubiri 1y agoI recant. Programmers who had to do low level programming due to early hardware restrictions are hereby granted immunity from high-level elitism and gatekeeping, they can vibe code and npm install is-even if they so wish to.