Undo and redo - Jimmy
I've implemented one of Logic World's most highly requested features: the ability to undo and redo your changes to the world!
[previewyoutube=-3Uuu_Ugnrk;full][/previewyoutube]
General building overhaul progress - Jimmy
This week I've finally finished my big refactor of how Logic World stores and modifies its internal world state! This is all the code to do with storing components and wires, and how updates to components and wires are handled. One player tells the server they want to place a component, the server verifies that this modification is allowed, the server sends information about the modification to all connected clients, and they all handle the update appropriately -- that kind of thing.
Before this rewrite, that part of the codebase was one of the oldest, written in late 2018. At the time, I was a generally much less experienced programmer, and I also had a much less complete understanding of how this code needs to work and be worked with. It didn't help that this system is necessarily very complex -- Logic World is a complex game, with complex builds, and it all has to work in real-time multiplayer, plus there's all the complexities introduced by supporting modding. As a result, the original code was a very shaky foundation, and it did *not* age well throughout the years as we extended and modified it. I knew that if I was going to really improve Logic World's building mechanics -- which I am determined to do before we release -- I would need to rewrite this whole module.
And now that's done! The new systems I've designed and implemented are robust, extensible, and easy to modify. They use everything I've learned since starting this project about how to write Good Code. You can see the fruits of my labor in the video above -- something as complex as undo and redo would NEVER have been possible with the old systems, but the undo/redo implementation I wrote this week is under 100 lines of code and *stunningly* simple.
There's still some cleanup and improvements to do, but I'm honestly thrilled with how well everything is working. It's going to be so *easy* to add all these cool new building features I have planned.
---------------------------------------------
We'll keep releasing these weekly updates right up until the game comes out. To make sure you don't miss them, you can
sign up for our newsletter. Be sure also to wishlist Logic World right here on Steam and join the
official Discord.
See you next Wednesday!
View this post on logicworld.net
More Logic World Wednesdays
https://store.steampowered.com/app/1054340/Logic_World/
[ 2021-03-04 19:34:56 CET ] [ Original post ]