![]() Its incredibly harder if not outright impossible to do it in the opposite order. Get its inner workings pretty first, then make the appearances pretty. I've seen many projects fail even while following best practices all over the place. I would much, much rather focus on simplicity and let beauty emerge naturally. It also doesn't have to be ugly beauty should be in how it works not how it looks anyways. Soon everything is its own 20 lines class file and you're buried in well documented technical debt and drowning in files locked inside your own pretty cage. Why is length automatically associated to spaghetti? I've seen way too much spaghetti clean code to agree. Mike Acton talked about it a lot as well: Having all that nice cleanliness in a debug build you won't use isn't a great way to end up developing after 5 years of piling stuff up :)īesides, you can design your systems so that they're both fast and simple data-driven design is one such approach. These get stripped in release (hopefully) but the catch is that you end up stepping in optimized code cause 5FPS can't get you where you want to test. Indirections and conditionals and noise everywhere. Heck these are the sort "clean code" practices which make your debug build run at 5 FPS (I've seen worse :). Īll the traits you list are superficial compared to getting the thing working and performing well in the first place :) John Carmack himself wrote about it a few years ago. It looks like its built on top of irrlicht which probably brings in its own framework view of the world to begin with.Ģ00+ lines functions happen MUCH MORE than you think in AAA code why split a function if there's going to be a single static caller. So far, MineTest, at least in part, took the "big hairy ball of C++" approach. * comments that guide the reader and explain what does what The file that seems to run everything, game.cpp, is almost 5000 lines long.įor an example of really clean game code, check out Quake or Doom 3. The comment above just says "Mesh making stuff": ![]() ![]() There's a struct that looks important, but it's called "MeshMakeData", and I don't know what it represents. There's commented out code and preprocessor "#if 0" ignored code. I think I found the files where the meshing happens, mapblock_mesh.h/cpp. I was curious which approach MineTest chose, and I still don't know. Mikola Lysenko wrote a great exposition of the problem and several solutions way back in 2012: ) (Voxel meshing is about turning blocks into triangles efficiently, and it's surprisingly tricky. I just tried reading the code to learn how MineTest does voxel meshing, and it didn't go so well. Props for doing a massive amount of work and creating something open and extensible.
0 Comments
Leave a Reply. |