diff options
author | Lassi Pulkkinen <lassi@pulk.fi> | 2024-10-31 03:11:21 +0200 |
---|---|---|
committer | Lassi Pulkkinen <lassi@pulk.fi> | 2024-10-31 03:51:35 +0200 |
commit | ae44478b30d890fe0fb04022f44d474dcdcc3f9d (patch) | |
tree | 5f462459ae4b47d22114eed717d1382d08cf4dfe /README |
Diffstat (limited to 'README')
-rw-r--r-- | README | 83 |
1 files changed, 83 insertions, 0 deletions
@@ -0,0 +1,83 @@ +Minecraft 1.19.3 (exactly) is required. + +The default resource pack must be present at resources/assets. +Use unzip client.jar -d resources/ 'assets/*' to extract from a client jar. + +Set online-mode=false and network-compression-threshold=-1 +in server.properties. + +Hint: handy client and server download links are provided at +<https://minecraft.wiki/w/Java_Edition_1.19.3>. + +Vsync is hardcoded to be disabled. You can change this in window.ha. I used +GALLIUM_HUD to view frame times, so there is no built-in FPS display. + +The chunk tessellation runs on the main thread, and the work distribution is +rather dumb, so a frame rate drop will be visible whenever new chunks are being +loaded. + +Patched versions of the following libraries are included in the source tree: + - hare-json <https://sr.ht/~sircmpwn/hare-json/> + - hare-png <https://git.sr.ht/~sircmpwn/hare-png> + - hare-sdl2 <https://sr.ht/~sircmpwn/hare-sdl2/> + - hare-glm <https://sr.ht/~vladh/hare-glm/> + +A few words on what to expect: + +Most of this code is pretty bad, really. Most of the "architecture"-level stuff +is questionable (I knew this back then, but not really how to fix it). A lot +was written to be cleaned up in the future; such code may or may not have a +TODO attached. + +Weirdly enough, the less deep you are in the call stack, the messier things +seem to get. The destructors for various global state in particular are +half-implemented, and probably broken in numerous ways. Nowadays I'd try to +resist the urge to split application glue logic over so many pseudo-modules. +Ideally it would all be in one file. + +Overall, if you came here expecting examples of good ways to do things in Hare, +you're probably in the wrong place. The utility modules dejson, htab and trace +are kinda okay, though. + +The part that is probably the most complete is model rendering. Pretty much +everything there is supported (unless I forgot something), with the exception +of tintindex (which is why grass etc. is gray), and block transparency +information (which is why there are holes everywhere). Both of these require +hardcoded information about blocks, though I had plans to possibly implement +the latter by inspecting the model and textures instead. + +There's some sketchiness to the asset loading too, though. I went back and +forth on whether to load textures up front, or on demand while loading models. +There are similarish problems with model loading, where you get spurious error +messages about unresolved texture names in template model files that aren't +ever actually used directly. + +I don't like how registries are handled. The split into objreg and idreg was +probably a mistake; I used to have everything handled with IDs. + +Notable world interactions that work are health/death and portals. + +The Android support did work, at least at one point. (Though it's very +half-baked.) I didn't bother making sure that it does anymore, though. + +Also, yes, the naming style used here differs from the usual Hare convention. +This is because I got fed up with name conflicts between types and local +variables. For globals I used SCREAMING_SNAKE_CASE, which, yes, is very +exhausting given the amount of them that there are. Probably not a choice I'll +make again. + +Copyright notice (if anyone really cares): + + Copyright (C) Lassi Pulkkinen + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU General Public License version 3 as + published by the Free Software Foundation. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program. If not, see <https://www.gnu.org/licenses/>. |