Powershell Match 3 Game

I was playing around in Powershell over the Christmas weekend, and put together a simple “Match 3” style game utilizing the same RawUI style techniques I used in my Powershell Snake Game.

A version of a "match-3" style game written using RawUI in Powershell.

A version of a “match-3” style game written using RawUI in Powershell.

Why a PowerShell Match 3 game? Why not! 🙂 Actually, I was watching a youtube video series on creating a match 3 game with Unity, and the essentials of the way matches are checked for are similar to what is shown in this series.

Being Unity, however, the game in that series relies on the Unity physics engine and collision detection to move pieces around and determine what pieces are next to each other. Obviously, we don’t have a physics engine in Powershell!

The game features a hilight you can move around with the W, A, S, and D keys, using the arrow keys to indicate you want to swap pieces in that direction. Pieces fade when matched, and the falling of pieces above them is animated. New pieces will appear in the empty spots at the top of a column.

The one thing it doesn’t do right now is verify that there are matches on the board that are available to make. I’m considering adding this, but I’m already pushing the performance limits as it is, and checking the board for possible matches can be pretty intensive 🙂

Download the Powershell Match 3 Script

The script is available via the button above. Try it out, and let me know what you think, or any improvements you come up with!

Two columns of matched pieces (white and magenta) are fading out

Two columns of matched pieces (white and magenta) are fading out

 

 

Bookmark the permalink.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

  • Advertisement