You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Instantly share code, notes, and snippets.
🔬
Experimenting
Magnogen
Magnogen
🔬
Experimenting
Hey! I'm Mag. I like code, games, music - creative thingies. Feel free to peruse my repos if you wish!
Notes on Modern UI Development: Iterating over the other 80%
Introduction
I have been working on a modern typing training application for the last couple of days. One of the main motivations was to build an app with a modern UI and minimal distractions, enabling to fully focus on the training aspect. You can read more about the original idea and thought process here.
One of the main features is being able to train your typing speed when working with code, which means the typing experience should come close to how you would type when working with an IDE. A feature that you would normally get inside such an environment is the auto closing of parentheses, brackets and braces. Which means you would for example type ( and the IDE would automatically add the closing ) for you.
The first iteration of Typing Cyclist was just a raw implementation which treated text and code examples the same. You would have to type
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
An organized structure to your data pack's folders and file names always helps you understand your code better and leads to less bugs.
Place files that have something in common in the same folder, and name them based on what their purpose is.
Consistency in naming stuff like tags, files, and scores can help keep you sane. Always have a clear structure in place, such as prefixing tag and objective names with your namespace (namespace.name) and giving tags different categories (namespace.entity.name, namespace.block.name).
If you are unsure of how a good structure could look, you could take a look at some vanilla assets, such as the lang file or the built-in data pack, as well as get ideas from looking at data packs that other people have made.
Algorithm to move from one point on a 2D matrix to another in the shortest most logical route
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Image to Particles] Quick tool that generates a function that displays particles for an input image using local coordinates. Drop images in the `images` folder in the same directory as the script. You'll also need to `pip install opencv-python`. Edit generation options at the bottom of the file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Say you wanted to emit an explosion particle whenever your block is destroyed. Emitting particles requires access to the ParticleManager, which only exists on the MinecraftClient instance. Let's try doing that: