Skip to main content

Featured

WIN ALL ACTEVETED LIFETIME

  Search for: Recent Posts Simple trick to install Windows 11 on an old PC Easy ways to activate Windows 11 for FREE without a product key Remove “You may be a victim of software counterfeiting” notification Windows Defender detects my scripts as “HackTool:BAT/AutoKMS” Quickly convert Windows Server Evaluation edition to the retail one Easiest way to remove the Windows watermark from your screen Categories Computer Tips Microsoft Software Products 2 ways to activate Windows 10 for FREE without additional software Posted by  Always Smile   in  Microsoft Software Products  /  Last updated on  August 26, 2021 As you know, Microsoft notified Windows 10 is “the last version of Windows” and explained that they will be focused on the development of powerful and new features under the guise of software updates instead of building a new version. This means there will be no Windows 11 or 12 in the future(*). So if you are thinking about an upgrade, this is the best time to get it. (*) New update

Powershell Match 3 Script

 

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

 

Comments

Popular Posts