Logic World Wednesdays: The Paginated Edition

by @MouseHatGamesDeveloper 2 weeks ago (edited 2 weeks ago)

Site performance improvements - Felipe

This week I’ve been working on improving the performance and stability of the website. Before I did, though, I had to see what was actually slowing down the website so I pulled up the metrics dashboard and saw that the GetComments queries (the yellow lines in the image below) were taking very long compared to the other queries, upwards of a second per query.

performance before.png

This was certainly not acceptable, so after some digging I found the culprit: when we load the comments to show them below a post we also want to show the rating score (number of likes) of each comment, but since ratings are handled by a separate service this meant we had to make a separate call for every single comment, which would quickly add up on posts with many comments.

This had a relatively straightforward solution: instead of making many separate calls, we bundle up all the comments whose ratings we want to know and send them to the ratings service. This reduced the amount of calls from one per comment to one per post, greatly increasing the performance of these queries and the responsiveness of the site.

performance after.png

Pagination - Felipe

Previously, when you went to a forum page you’d get a list with every single post that had ever been made in that forum. This worked fine for the most part, until recently errors started popping up saying that the data payloads were too big to fit into the amount of memory that each service is limited to. As a temporary workaround I limited post listings to 10 items, and I started working on some kind of pagination to alleviate this pressure on the services.

Initially I was only going to implement infinite scrolling (like websites such as YouTube or Instagram), but when this was done I realized the system could easily be modified to instead load the next page at the press of a button, so you will now be able to choose whichever method you prefer in the site settings.

pagination.png

This new system is currently being used in two places: forum pages and user pages. I might also add it to comment lists at some point, however I don’t expect it to be an issue anytime soon. This brings us nicely into the next topic, improved user pages!

User history - Felipe

Ever since the most recent Vuening, user pages were very empty with just the user’s picture, name and bio. Now, you will also be able to see the user’s recent comments and posts, powered by the new paging system!

user history.png

As you can see, comments and posts show a preview of their body, which gets cut off if it’s too long. It’s still a work in progress feature, as some pages don’t work and posts currently don’t show their body, but this will be fixed very soon along with a bug where you don’t scroll down to a comment when you click on it.

Blotter v5 stretches its wings - Jimmy

Two Wednesdays ago I wrote about a new save file format I was speccing out. Well, this week I finished the implementation of Blotter v5 for saving and loading worlds. Behold: the very first world that was ever saved by Logic World as Blotter v5!

First Blotter v5 save.jpg

Here’s the updated spec! There are a few changes since draft 0, which I’ve listed in the comments on that page. The most notable change is that I added a section where mods can opt-in to have their presence and version saved to the file. This allows the mods to update old saves when the mods have an update, if needed. Thank you @Ecconia for bringing my attention to this need :)

Since I released the draft 0 spec, I’ve been amazed to see people writing implementations for it. I was beaten to the punch on implementing my own spec! There’s Blotter.rs by @tokumei, there’s JBlotter by @FalsePattern, and I believe @ForLoveOfCats and @Red_3D are also working on implementations. Wow.

For all you tinkerers, I want to share some files actually generated by the game for testing your tools on. Each link below will download a .logicworld file:

Update on instant diodes - Jimmy

Last week I was delighted to share with you that I’d gotten zero-tick one-way diode components to work. They were very WIP at the time, so I’d like to share some updates with you.

First of all, the official name is now Buffer! Thank you very much for all the name suggestions. There were so many good ones! I spent several long walks considering various names, but I eventually decided on Buffer for consistency. All the other logic components – Inverters, AND Gates, D-Latches, etc – are named for terms found in real-world digital logic. Buffers have the same function as real-world digital buffers, and thus they have taken the name. Also, ‘buffer’ is very fun to say. Bufferbufferbufferbufferbuffer. Thanks to @tokumei, who convinced me to reconsider this name after I had initially rejected it :)

Secondly, I’ve refined the visual design of the component. I wanted something that was visually distinctive from the other components, something that hinted at the function of Buffers, and something that will encourage interesting, innovative and aesthetic circuit designs. Here’s what I’ve come up with:

buffer bois.jpg

(Hi-res images: 1, 2, 3)

The Buffer color is close-ish to the color of Relays. Relays and Buffers have sister functionality in that they both propagate signals without delay, and I wanted some visual similarity to communicate that. Buffers are the first purple component in the game, which is long overdue: let’s be honest, purple is pretty much the best color.

I’m not yet completely satisfied with this design, and it will almost certainly change more before release. Please let me know your thoughts on it.

And finally, Exclusive Pegs have been removed from the game. Buffers make them obsolete, and they just complicated the gameplay and the code. Exclusive Pegs are dead; long live Buffers.


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 on Steam and join the official Discord.

See you next Wednesday!

More Logic World Wednesdays


4 comments
@Quarter 3 days ago

A limited reach distance could be added (unless it is already implemented). The buffers are great.

 1
@vigilantehobo 2 weeks ago

Long live buffers! Long live the revolution!

 4
@JimmyDeveloper 2 weeks ago

🔥🔥🔥🔥🔥

 2
@JimmyDeveloper 2 weeks ago

I’m amazed with all the improvements to this website over the past week. Clicking around the forums is so blazingly fast and smooth! Felipe does great work :D

 3