creating a farming rpg harvest moon part 8

Creating a Farming RPG (like Harvest Moon) in Unity — Part 8: Regrowing and Wilting Crops

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 8 of our guide here, where we go through how to make crops that can be harvested multiple times, along with a system that allows for them to die. You can also find Part 7 of our guide here, where we went through how to grow and harvest crops.

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

Continue reading
Fixing a jittery camera in Unity
Screenshot from Cobalt Blue, a game currently in development.

Fix jittery camera movement in Unity with Rigidbody Interpolate

If you’ve got a player character in your game that derives its movement from a Rigidbody or Rigidbody2D component in Unity, and you write a script to make your camera follow it, you will likely see jittering in your camera movement.

Here’s an example:

Camera jitter in Unity
It’s not very noticeable if you don’t move at high speeds.
Continue reading
Animator does not contain a definition for SetBool

Unity C# error: Animator does not contain a definition for ‘SetBool’

Recently, I came across an error that was quite the head-scratcher while grading some Unity scripts. Here’s what the error says:

Animator does not contain a defintion for 'SetBool'
The myAnim variable was set with myAnim = GetComponent<Animator>() earlier on.

But SetBool() is a valid method in the Animator component from Unity, so what exactly is going on here?

Continue reading
Importing CSV files into a MySQL table

Importing a CSV file into an SQL table

CSV stands for Comma-Separated Values, and CSV files are text files that look something like this:

example.csv

Username,Email,Address,Contact
johndoe,john@example.com,"71 Pickering Street, Singapore, Singapore",+65-91234567
janedoe,jane@website.com,"24 Raffles Lane, Singapore, Singapore",+65-81234567
marysmith,mary@smith.com,"83 Riveting Road, Singapore, Singapore",+65-97654321
bobsmith,bob@smith.com,"84 Riveting Road, Singapore, Singapore",+65-87654321

Essentially, the CSV file format is meant to represent tabular data. The above CSV file represents the following table:

UsernameEmailAddressContact
johndoejohn@example.com71 Pickering Street, Singapore, Singapore+65-91234567
janedoejane@website.com24 Raffles Lane, Singapore, Singapore+65-81234567
marysmith mary@smith.com 83 Riveting Road, Singapore, Singapore +65-97654321
bobsmith bob@smith.com 84 Riveting Road, Singapore, Singapore +65-87654321

Due to their tabular nature, data in a CSV file can very easily be imported into and stored in an SQL table. The commands to do that, however, are not very well-documented online.

If a CSV file does not open as a text file on your computer, that’s because your computer is opening the file with a spreadsheet program such as Microsoft Excel. In such a case, to see the file as text, you will want to open these files on a text editing software such as Notepad.

Continue reading

Content begins after the advertisement:


Python in XAMPP

Running Python in XAMPP

Are you looking to run Python as a server-side scripting language on your XAMPP installation? Here’s a guide on how to set it up.

Continue reading
Creating a Farming RPG (like Harvest Moon) in Unity — Part 7: Growing and Harvesting Crops

Creating a Farming RPG (like Harvest Moon) in Unity — Part 7: Growing and Harvesting Crops

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 7 of our guide here, where we go through how to grow and harvest crops. You can also find Part 6 of our guide here, where we went through how to create an in-game time management system.

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

Continue reading
Remove the admin bar from the WordPress admin backend

Hiding the WordPress admin bar programmatically on the backend

Whenever you are logged in to WordPress, there is a black admin bar that shows up above every page. On front-end pages, you can call show_admin_bar(false) in one of your plugin or theme functions to remove it. Individual users can also hide the admin bar on their account’s profile page.

All of this, however, doesn’t work if you are on a backend page. No matter what you do, the admin bar will always show up in those circumstances, unless you remove the admin bar programmatically — this article is here to show you how, as well as why you would want to do such a thing.

Continue reading

Content begins after the advertisement:


Creating a Farming RPG (like Harvest Moon) in Unity — Part 6: Managing In-Game Time

Creating a Farming RPG (like Harvest Moon) in Unity — Part 6: Managing In-Game Time

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 6 of our guide here, where we go through how to set up a day-night cycle and manage in-game time. You can also find Part 5 of our guide here, where we went through how to create an item equipping system.

Continue reading
Creating a Farming RPG in Unity - Part 5: Equipping Items

Creating a Farming RPG (like Harvest Moon) in Unity — Part 5: Equipping Items

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 5 of our guide here, where we go through how to equip and unequip items. You can also find Part 4 of our guide here, where we went through how to create an item management system.

Continue reading