Took a break from working on interval trees to try and make chunk loading and unloading on the client more efficient. I rewrote a bunch of stuff, and it's more elegant now, maybe, but I'm not sure if I actually made it more efficient. :/
Notices by Angle (angle@anticapitalist.party), page 14
-
Angle (angle@anticapitalist.party)'s status on Friday, 13-Jan-2023 07:28:00 JST Angle -
Angle (angle@anticapitalist.party)'s status on Friday, 13-Jan-2023 07:27:59 JST Angle Well, I did some further optimization and things were running a lot better - so I implemented datagrams for sending data on light sources and sides to the client, and now it lags again. XD
-
Angle (angle@anticapitalist.party)'s status on Friday, 13-Jan-2023 07:27:58 JST Angle Thinking of writing an integrated profiling framework or something for Omnicraft. I made a dead simple one, involving just a pair of 'System.currentTimeMillis()' calls, and it was actually really useful - writing something more thorough might be handy. Anybody have any experience with that kind of thing? :/
-
Angle (angle@anticapitalist.party)'s status on Friday, 13-Jan-2023 07:27:57 JST Angle Well, I ended up using VisualVM - it's actually really handy, once you figure out how to use it. Anyway, I optimized a couple of things, so rendering and loading chunks is much more efficient now. But, now it seems like I need to optimize my array iteration - I have that turning up as a bottleneck in half a dozen places. I already started using ZOrderCurves, I'll need to see if I can figure out how to improve beyond that. :/
-
Angle (angle@anticapitalist.party)'s status on Friday, 13-Jan-2023 07:27:56 JST Angle No work on array iteration yet, but I optimized world gen iteration. I had to increase the cap on how much data it can send from the server to the client to make that work, but now it runs buttery smooth. I'll need to optimize for sending less data though, I doubt it would work over a network at the moment, even if I added netcode. :/
-
Angle (angle@anticapitalist.party)'s status on Friday, 13-Jan-2023 07:27:55 JST Angle So I went and added networking with Netty. Works on my local client at least, but I get weird lag - like, I move faster or slower depending on which direction I go? So going forwards is like moving through Molasses, but going sideways is about normal speed? But only under certain conditions. :/
-
Angle (angle@anticapitalist.party)'s status on Friday, 13-Jan-2023 07:27:54 JST Angle Turns out my Server loop was Busy. Fixed that, it runs properly now. I also added datagram prioritization on the client, compression for networking, and fixed a mistake that was causing my game to to crash when I tried to profile with VisualVM. Making Progress!
-
Angle (angle@anticapitalist.party)'s status on Friday, 13-Jan-2023 07:27:53 JST Angle Okay, no, I didn't actually fix the crash on profiling problem. But I found a work around? So, that's something. XD
-
Angle (angle@anticapitalist.party)'s status on Friday, 13-Jan-2023 07:27:51 JST Angle Anyway, now I'm back to optimization and refactoring. Currently, I'm looking at tacking my Chunk classes and trying to genericize them or whatever? Like, at the moment they're made of three components, Blocks, Sides, and Ambient Lighting Data. All of these are explicitly coded in the chunk, so you can;t add or remove them without trecoding a bunch of stuff. I think i can make some kind of generic framework that will allow easily adding or removing this kind of data from the Chunk class?
-
Angle (angle@anticapitalist.party)'s status on Friday, 13-Jan-2023 07:27:50 JST Angle Not sure how easy or reasonable this will be, but it seems like it should be possible. :/
-
Angle (angle@anticapitalist.party)'s status on Friday, 13-Jan-2023 07:27:49 JST Angle Alright, did that! Had some weird bugs because I broke the function calls for chunks looking up surrounding data from the world, but I figured that out and fixed it. Just doing some cleanup and a few minor optimizations now, and then I need to figure out what next. Probably sending ambient lighting data to the client? Not sure yet. :/
-
Angle (angle@anticapitalist.party)'s status on Friday, 13-Jan-2023 07:27:48 JST Angle Yeah, working on that. Made a bunch of progress. Fixed a dumb mistake that was disabling all lighting generation, and now I have some weird bugs. You know, as one does. XD
-
Angle (angle@anticapitalist.party)'s status on Friday, 13-Jan-2023 07:27:47 JST Angle Alright, fixed my weird bug. Lighting worldgen doesn't work right, so only the very tips of the terrain are lit up, but I'm going to work on that. First though, I'm going to try and implement a module loader and split the game up into modules. I have lots of examples of how to do this, between Forge, Fabric, Minetest, and Terasology, so hopefully I can figure it out. XD
-
Angle (angle@anticapitalist.party)'s status on Friday, 13-Jan-2023 07:27:46 JST Angle Okay, so I decided to ignore all those examples and actually use OSGI. This is some enterprise shit, but it looks like it does precisely what I need? Here's hoping. It's what the IDE I use, Netbeans, is built on, along with Eclipse, and IntelliJ is built on something very similar or possibly the same thing, I hear.
-
Angle (angle@anticapitalist.party)'s status on Friday, 13-Jan-2023 07:27:45 JST Angle Alright, I managed to get to my games title screen via running modules in OSGI. I need to get a better handle on developing with OSGi though, currently I need to load like 12 different modules via command line to get the thing running from scratch, and that's a pain. Gonna take a look at Netbeans, I think, see if I can figure out how it does things. Or maybe some other open source desktop application built with OSGI, there are a few I know of. :/
-
Angle (angle@anticapitalist.party)'s status on Friday, 13-Jan-2023 07:27:44 JST Angle Working on implementing modules for rendering and tracking the game world, now. Going really well. I have my skybox rendering, along with the outline of a single cube - and I resolved tons of super annoying old architecture problems that had been bugging me for ages. Feeling good. XD
-
Angle (angle@anticapitalist.party)'s status on Friday, 13-Jan-2023 07:27:43 JST Angle Okay, rendering an actual chunk, though not with proper lighting yet. Making progress!
-
Angle (angle@anticapitalist.party)'s status on Friday, 13-Jan-2023 07:27:42 JST Angle Okay, rendering a chunk, with directional lighting! Time for some code cleanup and refactoring, I think.
-
Angle (angle@anticapitalist.party)'s status on Friday, 13-Jan-2023 07:27:41 JST Angle Got point lighting working. Didn't figure out that refactoring to my satisfaction, but that I can come back and take another crack at that later I guess. Thinking about doing world generation and chunk loading next? :/
-
Angle (angle@anticapitalist.party)'s status on Friday, 13-Jan-2023 07:27:40 JST Angle Alright, made a bunch of progress on my generation algorithms, and put together a cheap maven repo using gitlab. So, in theory, you can build the thing from downloading just one project now? Pretty sure it works. XD