Skip to content

Zen Game in which you can manually defrag a virtual Hard Disk, Made with Unity.

Notifications You must be signed in to change notification settings

LostTrainDude/zfrag

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

zFRAG

zFRAG is a little Zen Game in which you can manually defrag a virtual Hard Disk. You can also turn on the AutoDefrag and sit back and watch.

Developed in Unity, the game is available on itch.io

Things to know

I strongly suggest you to download the project as a whole and run it in Unity yourself. Although I did my best to make the logic self-explanatory, there are things that are only understandable by looking at how they are implemented in the Editor.

Examples being: initial values for some variables, Button Events and Graphics, AudioClips.

Resolution

The game's reference resolution is 640x400. I made use of the 2D Pixel Perfect package.

Font

I only used TextMeshPro components. The Atlas for the specific font I used (PxPlus_IBM_VGA9) has been set up in such a way to include all of the "special" characters (i.e. Block Elements to represent sectors) I needed.

Audio

To handle AudioClips volume I use Audio Mixers. If you want to know more about Audio Mixers I suggest you to give a look at these tips.

Button Graphics

As you can tell, I tried my best to emulate a DOS-like interface. Each Button in the game has a MoveTextOnClick script that shifts the Button's Text component to the right upon click, so to follow the Pressed Sprite and the default one.

Game States

The main game logic makes use of a Finite State Machine with 5 states: START, DEFAULT, AUTODEFRAG, FREEPAINTING, COMPLETE. When Players either hit ESC to display the Exit Menu, or are in the Options Menu, time doesn't advance.

START

START state

Only available upon starting the game. This switches to DEFAULT once players close the Start Menu.

Time doesn't advance.

DEFAULT

DEFAULT state

The default state in which players can operate, after closing the Start Menu and when AutoDefrag and Free Painting modes are switched off.

Here players can drag and drop sectors in order to form a continuous line from the first cluster of the grid. After placing a sector, the game will update the grid and the Progress Bar to check if there are new sectors to be considered defragmented. If there are, the game "paints them" yellow and makes them unmovable.

Time advances.

AUTODEFRAG

AUTODEFRAG state

The grid is updated in the same way as in the DEFAULT state, but here the game does so automatically at a given speed (modifiable in the Options Menu).

Here players can't interact with the grid.

Time advances.

FREEPAINTING

FREEPAINTING state

Here players can freely drag and drop sectors wherever they want without having the game preventing them to do so, as this time it won't check for defragmented sectors.

COMPLETE

COMPLETE state

Defragmented sectors are all in a row. Players can't move sectors again unless they Reset or switch to FREEPAINTING.

Time doesn't advance.

Credits

Hard Disk Sound Effects

The hard disk sound effects have been edited from a small recording I took of the wonderful audio of the TwitchDefrags stream.

The "clack" sound

The sound you hear when dragging and dropping sectors on the grid was made using Bfxr by Stephen Lavelle.

Font

The font - PxPlus_IBM_VGA9 - is part of the Ultimate Oldschool PC Font Pack © 2016 VileR, and is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.

UI Drag and Drop

I modified, according to my own purposes, the code provided by this tutorial by Omnirift.

Special Thanks

Thanks a lot to the Multimedia HyperGuide community who have been the first people to know of this little project of mine and provided feedback, support and suggestions along the way.

About

Zen Game in which you can manually defrag a virtual Hard Disk, Made with Unity.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages