Posts Tagged "demo"
Joe Strout — Thu, Jun 16 2022
The import function is not a standard part of the MiniScript language, but it is a feature common to many MiniScript environments, including Mini Micro, Farmtronics, command-line MiniScript, and Soda. In this post, we review how import works, and describe some techniques for advanced users.
Joe Strout — Fri, Jun 10 2022
Version 1.1 of Mini Micro included a couple of very useful additions to the stringUtil module. If you aren't already using the new fill
and match
methods, you probably should be!
Joe Strout — Fri, Sep 06 2019
As more and more people discover MiniScript, the question is occasionally asked: why? Why was MiniScript created, and why should someone use it rather than some other language?
It's a perfectly valid question, so in this post I will try to clarify. My purpose is not to convince anyone of anything, but to explain why, after years of using other scripting languages, I felt compelled to create something new. I'll do this without attacking other languages, since every language has its fans and I don't want to kick anybody's dog; instead I'll focus on what I think is really cool about MiniScript, and how it offers a collection of advantages that, taken together, can't be found anywhere else.
Joe Strout — Sun, Jun 09 2019
MiniScript has been available as a Unity plugin since 2017. But it has been such a success with its users that it deserved wider distribution. MiniScript in Unreal games, MiniScript on the command line, MiniScript in your browser... why not? And while it was great to get a little financial support for working on MiniScript in the early days, in the long run keeping it commercial only slows down its adoption. That's why, as of today, MiniScript is open-source.
Joe Strout — Thu, Sep 01 2016
A frequently asked question in both the Unity forums and on Unity Answers is: How do I make a projectile arc to its target, like an arrow shot from a bow? I've seen (and given) lots of different answers to this question, and honestly, most of them are unjustified hacks.
The right (and easy!) way to do this is: just add a bit of arc to your standard movement. Objects in freefall (ignoring air resistance) follow a parabolic arc, and the equation for a parabola is very simple. So, we can just use that equation to compute how must extra height we should have, and simply add it to our Y position, and the job is done.
Joe Strout — Wed, Aug 19 2015
I'm currently doing a job where I need to take 3D polygon data and display it in Unity. These polygons are planar, but oriented arbitrarily in 3D space. Moreover, they can contain holes (possibly multiple holes). Think of a building wall with window cut-outs, and you'll get the idea.
This turns out to be a surprisingly thorny problem in Unity. There is a simple script on the Unity wiki called Triangulator, but it only works with Vector2D and doesn't support holes. I found a blog post on Advanced Triangulation in Unity, but it was neither sufficiently advanced (only works in the XY plane) nor actually in Unity (it wrote each polygon out to a file, invoked an external command-line tool to do the triangulation, and then read the result back in).
The utility referenced in that blog post is called Triangle, which is widely regarded as a very good triangle library. It's open-source C code, so one could make a Unity plugin out of it. But it's not licensed for commercial use, which is a problem for this project. Also, making a native plugin means setting up a build chain for every platform you want to support. For both reasons, I kept looking — I really wanted something in pure C#.
Joe Strout — Thu, Aug 13 2015
Unity has provided a built-in state machine editor for managing animations since version 4. This is the officially recommended approach to animating a game character. However, it often leads to game logic being divided between code and the animator state machine. I would prefer to have all my game logic in one place, to simplify development and debugging. Moreover, in some cases — especially simple 2D sprite games — the Animator can seem like more trouble than it's worth.
To help clarify the pros and cons, I built a 2D game character using three different approaches:
- A simple home-grown animation system that eschews Unity's built-in animation support completely.
- Use of Unity animations, but without using the Animator state machine; instead each animation is invoked directly from code.
- Full use of the built-in Unity components, with all game logic in the state machine, and only minimal supporting code.
For the rest of the story, see the full article on Gamasutra!
Joe Strout — Fri, Mar 25 2011
We have just posted a new demo video, this one introducing Hush For Now, our Android utility for automatically silencing and unsilencing your phone.
All blog posts