Nexus 6P model

For my game I need a phone so that I can create a text messaging scene, so I just replicated my phone quickly. I used 3 reference images and basic UV imaging using… and it looks pretty good! Check it out:

Let me know if you would like the model, I would be glad to share it!

Quick update for Maya To SVG

This update adds some instructions and bug fixes to make it easier to use. It also looks a bit better! More to come..


If you want to get the update, all you have to do is download the corresponding installer for your OS here:

2016 round up

2016 has been a wild year, so I wanted to share what I accomplished so far; in chronological order..

Maya To SVG

  • Export Maya curves to SVG for Laser cutting / etc..

Adminless Fonts

  • Give regular users the ability to install fonts in Windows

A* Pathfinding

  • Simple test for my friend, shows off pathfinding with HTML5 Canvas

TSA 2017 Game Concept / Design

  • Initial work and concept for TSA 2016 Game Design

More to come until new years…

Arcade machine physics

This is a quick post to show how I am doing my arcade machine for the TSA game. I needed a way to make the arcade machine controls move along with the player keyboard controls. I can do this two ways:

  • Use code to change the the model
  • Rig the model and use Unity animator

I chose option #2 because it would be way smoother and allow for more animations in the future, such as pushing the coin button.

Here is what making the animation in Unity looks like. I set up a state called “Left”, and just make a transition from Idle to Left, and from Left back to Idle, this will make a smooth transition so when you hold A, it will go left, and when you let go of A, it will go back to Idle.


Let me know if you have any questions about how I used Animator, or even if you have a better way of animating the arcade machine, it would be a big help!

TSA 2016 game idea

I’ve been using the HTC Vive for some time now and I really have been brainstorming some game ideas. I also need to make a game for TSA (Technology Student Association) and actually win. I decided to make a game that works with and without the vive. Meet… Arcade Game!!…

The point of the game is to go and play random arcade clones but in VR, we want to replicate fun games that were challenging and fun to play back in the day. Some of our ideas include Cornell Jumper (a SMB clone but with our teacher in it), and as difficult as Cat Mario, and some others.. I have began by modeling an arcade machine. Check it out:


I modeled it after some concept art I made in a sketchbook..


The game is currently being made in Unity 3D, version 5 Beta, which also includes a git style collaborating feature that I am using to create the game with my friend. I have experience using RenderTextures in Unity to capture another camera’s view into a 2D plane, so I plan to incorporate this feature in my game. Stay tuned for more updates on this game in the TSA category!

Export Maya curves to Illustrator

Do you have a laser cutter?

Are you good at 3D Modeling in Autodesk Maya?

If you answered yes, then Maya To SVG is the perfect tool for you!!

Maya To SVG

Maya To SVG is a simple script I made for Autodesk Maya that will let you export any curves into cuttable SVG format for a laser printer. Is is in major version 1 right now so it is not the prettiest, but it has an installer and is pretty much usable 100%. It looks something like this:


To use it just select a curve and then put in your width, height of the board you will cut, choose your units, choose if you are going to fit to page or otherwise put a scale ratio, and press export. Whichever directory you choose will then contain an SVG file which you can open in Illustrator, or straight in your laser cutter software and cut it out on any material!


To make life simple, I created an installer for Maya To SVG which will put it straight onto your Maya shelf. All you have to do is download the corresponding installer for your OS here:, No admin required! Then just run the exe or .app based on your OS and it should look like this:


All you have to do is click install, and when its done it will say 100%! If you experience any problems, please leave a comment or DM me on twitter and I will help you ASAP 🙂

A* Pathfinding in HTML Canvas

My friend has been working on a new game called, and he reached out to me for the (best) solution for his AI. I instantly thought of the A* algorithm, a simple-to-adapt algorithm that will find the fastest path to a target while avoiding obstacles.

I made a simple HTML canvas app to show it off, check it out:

See the Pen PbKdzw by Stas Darevskiy (@stasadance) on CodePen.


This version of the A* requires the game world to be square, but can easily be fixed by modifying the for loops in:

function findPath(world, pathStart, pathEnd)
  // shortcuts for speed
    var abs = Math.abs;
    var max = Math.max;
    var pow = Math.pow;
    var sqrt = Math.sqrt;

    // the world data are integers:
    // anything higher than this number is considered blocked
    // this is handy is you use numbered sprites, more than one
    // of which is walkable road, grass, mud, etc
    var maxWalkableTileNum = 0;

    // keep track of the world dimensions
    // Note that this A-star implementation expects the world array to be square: 
    // it must have equal height and width. If your game world is rectangular, 
    // just fill the array with dummy values to pad the empty space.
    var worldWidth = world[0].length;
    var worldHeight = world.length;
    var worldSize = worldWidth * worldHeight;

    // which heuristic should we use?
    // default: no diagonals (Manhattan)
    var distanceFunction = ManhattanDistance;
    var findNeighbours = function(){}; // empty

Modify the heuristic to match your application, in which your game may need the algorithm to speed up or make a more accurate path. You can change var distanceFunction = ManhattanDistance; to DiagonalDistance or EuclideanDistance, and var findNeighbours = function() {}; to var findNeighbours = DiagonalNeighbours; or var findNeighbours = DiagonalNeighboursFree; (allows the path to go in between obstacles diagonally).


Find the source code for my rendition of the A* algorithm on my GitHub here: A* in HTML Canvas, or on the CodePen for it here: A* Pathfinding in HTML Canvas. Thanks to Christer (McFunkypants) Kaitila and Emanuele Feronato for help in the maze generation and overall A* basics.

Add fonts as a regular user in Windows

Recently one of my teachers asked me to create a program that will let standard users on his computers install fonts for their artistic needs. Sounds simple enough.. right? The OS at hand was Windows 7 Enterprise. I had an idea in mind to edit the registry or add a Windows policy that will let me do such a thing, so I created a batch script. The first thing I needed to do was get admin rights. Hmm….

Admin Access In DOS

Thanks to Eneerge @, I was able to implement a simple vbs script that will execute my whole batch script as an administrator. It looks something like this..

:RequestAdminElevation FilePath %* || goto:eof
setlocal ENABLEDELAYEDEXPANSION & set "_FilePath=%~1"
if NOT EXIST "!_FilePath!" (echo/Read RequestAdminElevation usage information)
set "_FN=_%~ns1" & echo/%TEMP%| findstr /C:"(" >nul && (echo/ERROR: %%TEMP%% path can not contain parenthesis &pause &endlocal &fc;: 2>nul & goto:eof)
set _FN=%_FN:(=%
set _vbspath="%temp:~%\%_FN:)=%.vbs" & set "_batpath=%temp:~%\%_FN:)=%.bat"
fltmc >nul 2>&1 || goto :_getElevation
(if exist %_vbspath% ( del %_vbspath% )) & (if exist %_batpath% ( del %_batpath% ))
endlocal & CD /D "%~dp1" & ver >nul & goto:eof
echo/Requesting elevation...
echo/Set UAC = CreateObject^("Shell.Application"^) > %_vbspath% || (echo/&echo/Unable to create %_vbspath% & endlocal &md; 2>nul &goto:eof)
echo/UAC.ShellExecute "%_batpath%", "", "", "runas", 1 >> %_vbspath% & echo/wscript.Quit(1)>> %_vbspath%
echo/@%* > "%_batpath%" || (echo/&echo/Unable to create %_batpath% & endlocal &md; 2>nul &goto:eof)
[email protected] %%errorlevel%%==9009 (echo/^&echo/Admin user could not read the batch file. If running from a mapped drive or UNC path, check if Admin user can read it.)^&echo/^& @if %%errorlevel%% NEQ 0 pause >> "%_batpath%"
%_vbspath% && (echo/&echo/Failed to run VBscript %_vbspath% &endlocal &md; 2>nul & goto:eof)
echo/&echo/Elevation was requested on a new CMD window &endlocal &fc;: 2>nul & goto:eof

This huge script is put at the bottom or invoked using call and then putting call :RequestAdminElevation "%~dpfs0" %* || goto:eof anywhere before your admin-requiring code begins.

Giving Users group full control

To allow regular users (conveniently named Users in Windows) to add fonts, the Users group in Windows just has to own the fonts folder in everyway possible. I accomplished this with a set of commands that require admin:

attrib -r -s C:\Windows\Fonts 
takeown /f C:\Windows\Fonts /r /d n
cacls C:\Windows\Fonts /e /t /g Users:C
cacls C:\Windows\System32\FNTCACHE.DAT /e /t /g Users:C

But this alone was not enough. There was one more step. The registry itself “owns” the Fonts folder in Windows, so you have to give the Users group permissions there too. Batch alone cannot do this.


With the help of a tool called SetACL, I was able to add this line SetACL.exe -on "hklm\Software\Microsoft\Windows NT\CurrentVersion\Fonts" -ot reg -actn ace -ace "n:Users;p:full" to give the Users group full permissions over the registry key that handles Fonts. A reboot later.. and anyone could easily add their own awesome fonts!


You can see my full tool here on GitHub: Adminless-Fonts, or download yourself the latest release of it here: Latest Release

Hello World

Hello World!

Hello World!

Hello World!

Hello World
Hello World!