About the author:

All posts by Hsin Yi:

Why doesn't vertical-align: middle work?

Why doesn’t vertical-align: middle work? How to vertically-centre elements in HTML and CSS

If you are new to working with CSS, you may find that the language comes with its fair share of quirks that can be frustrating, such as the text-align attribute not always working at horizontally-aligning your content.

In a similar way to text-align, the vertical-align attribute doesn’t always work at aligning your content vertically. Take the following HTML code for example:

Continue reading
Create a Farming RPG in Unity - Part 14

Creating a Farming RPG (like Harvest Moon) in Unity — Part 14: Currency and Shop System

This article is a part of the series:
Creating a Farming RPG (like Harvest Moon) in Unity

Ever wanted to create a game like Harvest Moon in Unity? Check out Part 14 of our guide here, where we go through how to set up the currency and shop system. You can also find Part 13 of our guide here, where we went through how to set up the main menu and generate obstacles.

A link to a package containing the project files up to Part 14 of this tutorial series can also be found at the end of this article, exclusive to Patreon supporters only.

To view this content, you must be a member of Terresqualls Patreon at $5 or more
Already a qualifying Patreon member? Refresh to access this content.
Create a Farming RPG in Unity - Part 13

Creating a Farming RPG (like Harvest Moon) in Unity — Part 13: Title Screen and Obstacle Generation

This article is a part of the series:
Creating a Farming RPG (like Harvest Moon) in Unity

Ever wanted to create a game like Harvest Moon in Unity? Check out Part 13 of our guide here, where we go through how to set up the main menu and generate obstacles. You can also find Part 12 of our guide here, where we went through how to implement the player's sleep feature, as well as saving game data to both JSON and binary files.

A link to a package containing the project files up to Part 13 of this tutorial series can also be found at the end of this article, exclusive to Patreon supporters only.

To view this content, you must be a member of Terresqualls Patreon at $5 or more
Already a qualifying Patreon member? Refresh to access this content.
A primer on vertical-align in CSS

How to vertical-align text elements in CSS — the last guide you’ll ever need

Of all the CSS attributes that are available to web developes, the vertical-align attribute is perhaps the most mystifying. At first glance, the attribute seems like the vertical aligning cousin of the text-align attribute, but when you try and use it to vertically-centre your elements, it doesn’t work!

<div style="height:100px;background-color:#eee;">
	<p style="background:#dcc;">Item to be vertically-centred</p>
</div>

Item to be vertically-centred

Continue reading
Creating a Farming RPG in Unity - Part 12: Sleeping and Saving

Creating a Farming RPG (like Harvest Moon) in Unity — Part 12: Sleeping and Saving

This article is a part of the series:
Creating a Farming RPG (like Harvest Moon) in Unity

Ever wanted to create a game like Harvest Moon in Unity? Check out Part 12 of our guide here, where we go through how to implement the player's sleep feature, as well as saving game data to both JSON and binary files. You can also find Part 11 of our guide here, where we went through how to save our farmland's data.

To view this content, you must be a member of Terresqualls Patreon at $5 or more
Already a qualifying Patreon member? Refresh to access this content.