Mini Micro was updated to version 1.2.4 today. Let's take a quick look at what's new!
New Features
Added new bounce-related math functions in /sys/lib/mathUtil.
The math utilities module found at /sys/lib/mathUtil
has some new functions to help you deal with bouncing and reflections. Any time you need something to ricochet off of something else, these functions will be super handy. The new functions are:
- reflect
- bounceVelocity
- bounceOffSegment
- bounceOffStaticPoly
- bounceOffMovingPoly
Look at at the function header comments in mathUtil.ms (lines 184 - 333) for more details about these functions.
Added a new /sys/demo/breakout demo game.
The new demo is fun to play, and also demonstrates the new math functions! Unlike most "breakout" games, this one allows you to move the paddle a bit vertically as well as horizontally. This allows you to really whack the ball for super speed, or catch it gently to slow it down — if you have the skill!
Added a letterboxColor option in bootOpts.grfon.
This allows you to change the color of the extra space surrounding the Mini Micro screen when the host window is not a 4:3 aspect ratio.
Indentation for continued lines.
In the code editor, when a code line is continued onto the next line number, it is now indented a couple extra spaces to make it clear that it's a continued line. (This is one I've wanted myself for a long time!)
Mount files and folders with drag & drop.
You can now mount a folder or disk file (including an image disk) by dragging and dropping it onto the MiniScript window (Mac and Windows only — sorry, Linux folks, we haven't found a solution for that yet but we'll keep looking).
Disk slots now make sounds when unmounting and mounting disks.
This is especially helpful when mounting disks with drag & drop, as it lets you know that the action was successful.
Image disks are now a thing.
It's possible now to cram a Minidisk file, and all its contents, into a specially formatted PNG image.
We'll have more to say about this soon!
Why The Failure?
A new wtf
command (short for "why the failure," of course) checks global variables for potential problems (like overriding text or input), and offers to correct them. Type wtf
when the console itself seems broken, and basic commands are no longer working.
Improvements & Bug Fixes
Fixed a memory leak when repeatedly loading images and sounds.
Turns out that, because of the way Unity manages (or doesn't manage) resource memory under the hood, we've been leaking images and sounds. Not a big problem in most apps, because usually you load or create an image (or sound) once and then use it for many times. But if you were creating and throwing out images or sounds in a loop, this could chew up memory pretty fast. Now it doesn't.
Fixed a side-effect of calling TextDisplay.print
.
A new user tried calling, literally, TextDisplay.print "hello"
. This doesn't work, because TextDisplay is the class, not any particular text display; so where would the printing go? But it also had a very weird side effect: it removed the color
property from the TextDisplay
class. And that would cause all sorts of weird issues; any subsequent attempt to get or set the text color would fail.
So, now that doesn't happen. There's still no effect of calling print
on the TextDisplay
class (rather than an instance), but at least it doesn't mess things up.
Fixed frame rate bug in Windows builds.
Mini Micro is meant to run at 60 Hz — if you yield
, or do a very small wait
, in a loop, then that loop should run 60 times per second. This has long been true on desktop, but due to a Unity bug, it hasn't true in web builds in recent versions. As a result, a game that you carefully tuned on the desktop could end up running much too fast for some users (depending on their browser and monitor refresh rate). We finally found a solid fix for this, so now web builds should run just like the desktop version.
Improved image scaling.
Drawing an image 3X or 5X normal size used to result in uneven scaling, with some pixels appearing bigger or smaller than others. The scaling code has been improved, so now it's nice and even.
Changed web build options for better sizing on itch.io.
The index.html file that's part of a web build has a "matchWebGLToCanvasSize: false" line that has always been commented out. We discovered that this was the cause of the Mini Micro canvas appearing often too big on itch.io (and similar container environments) until you scale the browser view up and back down. So, now this line is uncommented, and hopefully we'll all discover that our games reliably appear the intended size.
Get Yours Today!
As always, Mini Micro is free and ad-free. This is a recommended update for all users, so why wait? Head on over to https://miniscript.org/MiniMicro#download and download yours right now!
Top comments (0)