for games and stuff...
This is a simple python script I use to batch process pngs using the command line version of Pngquant. I realize that nowadays there are a ton of utilities and guis doing the exact same thing, but I like it as a command line tool in case I need to batch process thousands of images –– guis tend to freeze.
Time to add the plane and make it follow the path the player draws. For this, I added one method to the Path class and added a PathSprite class which takes care of interpolating the path and adjusting to any changed done to the path.
Now I’ll go over the logic to collect points for a path, to be used in a path game like Flight Control. At the end of this tutorial you should be able to have something like the image above: namely, the ability to draw an endless dashed line.
with gl api
So before I start on the flight control logic, I need to make sure I can draw dashed lines in Unity. Of course you can use a prefab for the dashes, but this means creating thousands of game objects (alternatively you could draw the dash lines with a texture, but it’s not very different from using quads as I’ll show here.)
with the gl api
Before I move on to the next tutorial on Unity I need to cover a few things. Mainly, how to draw lines using Unity. I’ve decided to port the flight control tutorial I worked on a couple years ago to C# and Unity. And although it is not absolutely necessary to use the drawing API for that particular tutorial, it wouldn’t be as much fun without it.