How to unlink Desktop and other personal folders from OneDrive

How to unlink your Desktop and other personal folders from OneDrive

Newer versions of OneDrive automatically syncs the Desktop of your computer, along with other essential folders like your Documents and Pictures folders; and there seems to be no longer an option for you to opt out of this, or turn this off. While this may be great for the average user, if you are using your Windows to do Unity development work, it can lead to errors that are difficult to trace.

Hence, if you’re looking to unlink your Deskop and other essential folders from your OneDrive account, look no further than this article.

Continue reading
Damage Floating Text

Creating a Rogue-like (like Vampire Survivors) in Unity — Part 14: Damage Floating Text

This article is a part of the series:
Creating a Rogue-like Shoot 'Em Up (like Vampire Survivors) in Unity

On 28 September, Terence ran the second coding stream on our YouTube channel. During the stream, he implemented a pop-up text that appears whenever an enemy receives damage, as shown below.

How the Damage Floating Text looks like.
How the Damage Floating Text looks like.

This article summarises the implementation of this feature by highlighting the changes to the existing codebase.

To view this content, you must be a member of Terresquall's Patreon at $5 or more
Already our Patron? Login to access this content.
Vampire Survivors Part 13

Creating a Rogue-like (like Vampire Survivors) in Unity — Part 13: Knockback and Damage Feedback

This article is a part of the series:
Creating a Rogue-like Shoot 'Em Up (like Vampire Survivors) in Unity

4 October 2023: This article has been updated with new details.

Yesterday, Terence took over this project from Xavier and ran the first ever coding stream on our YouTube channel. The stream itself had quite a lot of technical issues and hence, a lot of room for improvement, but he managed to implement a couple of features that we wanted to document here.

To view this content, you must be a member of Terresquall's Patreon at $5 or more
Already our Patron? Login to access this content.
How to enable Developer Mode in iOS

How to enable Developer mode on iOS devices

Whether you are an aspiring developer, a game designer, or just someone who just so happens to need this function, getting iOS devices to be able to be compatible with imports for your code or applications can be challenging at times.

However, as of iOS 16 and above, you can now enable the new Developer Mode to help smoothen out the process of whatever special need you have.

Continue reading

Creating a Metroidvania (like Hollow Knight) — Part 3: Melee combat & Enemy AI Base Class

This article is a part of the series:
Creating a Metroidvania (like Hollow Knight) in Unity

Welcome to part 3 of our Metroidvania tutorial series, where we’ll be taking you on a journey through the development process of creating your own Metroidvania game, just like the widely popular Hollow Knight, in Unity!

Continue reading
How to set up a Plastic SCM repository in Unity

How to set-up a Plastic SCM repository in Unity and add team members to your project

When working with projects, it is common practice to use source control repositories to house our code, so that we can synchronize project files across multiple team members, and perform version control. Game development projects are no different.

If you have been using Unity for some time now, you may remember Unity Collaborate — a source control repository service built into the Unity Editor. In November of 2021, they replaced the Unity Collaborate service with Plastic SCM, and Unity users across the world went through a collective struggle trying to re-learn (or learn, if you are a first-time user — Plastic SCM is harder to use than Unity Collaborate) how to use the new service.

If you are one of these people, then this guide is for you.

Continue reading
XAMPP cannot start on macOS - Cannot calculate MAC address

XAMPP can’t start on macOS — cannot calculate MAC address

If you are running XAMPP on macOS, you may run into a variety of problems that may prevent you from starting the program. One of these problems is an error that says “cannot calculate MAC address” when you try to start the program.

Error starting XAMPP stack
The error message is not very helpful.

If your error message says something else, you may want to check out the other articles on XAMPP for macOS:

  1. XAMPP Apache not starting on macOS
  2. XAMPP MySQL not starting on macOS
Continue reading
How to set up a local web domain on WampServer

How to set up a local web domain (i.e. VirtualHost) on WampServer

When working on a website, it is not uncommon for developers to locally host websites on their own computers first, as it is often a good idea to run and test your website before you publish it online, so that you avoid having your live website run into errors and bugs.

If you are a Windows user, one of the several local web hosting softwares you have available to you is WampServer, which normally runs on the localhost URL when it is started up.

Fun fact: Wamp stands for Windows, Apache, MySQL and PHP. It is a play on the term LAMP (where L stands for Linux, and the rest of the letters mean the same as those in Wamp), as almost all web servers in the early days of the web ran on such a set-up. Today, LAMP stacks are still widely used to host many websites.

While running on localhost gives us the benefit of using root-relative URL paths, it still has a distinct drawback — it is a hassle to run multiple websites off the localhost URL, as it will still cause the aforementioned root-relative URL paths to break.

Fortunately for us, it is possible to set up what I call “local domains” on WampServer, so that you can use URLs outside of localhost to access your websites on WampServer.

Continue reading
Enumerations in Java explained (using Pokémon as an example)

Enumerations explained (using Pokémon as an example)

What are enums anyway, and what are they used for? Well, just think of it as yet another tool in your handy Java toolbox of things you can consider using to improve your efficiency and organisation of your program.

In this article, we are going to explore what enums are, and how they can be used in Java, by considering a piece of Java code that uses enums to recreate the type effectiveness system found in Pokémon.

Continue reading
Why is calling setters in Java constructors discouraged?

Why is calling setters from constructors discouraged in Java?

In Java, coders are discouraged from calling setter functions in class constructors. Even though doing so can sometimes reduce the amount of repeated code.

Consider the following class:

Unit.java

public class Unit {
	protected int health;

	public Unit(int hp) {
		// Prevents health for being set to 0 or less.
		if(hp <= 0)
			throw new IllegalArgumentException("Health must be more than 0.");
		health = hp;
	}

	public void setHealth(int hp) {
		// Prevents health for being set to 0 or less.
		// Repeat of the code in the constructor.
		if(hp <= 0)
			throw new IllegalArgumentException("Health must be more than 0.");

		health = hp;
	}

}

Instead of doing the check twice across 2 functions to ensure the incoming hp value is correct, it might occur to some coders that we can call the setter within the constructor instead, to reduce the amount of repeated code:

Unit.java

public class Unit {
	protected int health;

	public Unit(int hp) {
		// Prevents health for being set to 0 or less.
		if(hp <= 0)
			throw new IllegalArgumentException("Health must be more than 0.");
		health = hp;
		setHealth(hp);
	}

	public void setHealth(int hp) {
		// Prevents health for being set to 0 or less.
		// Repeat of the code in the constructor.
		if(hp <= 0)
			throw new IllegalArgumentException("Health must be more than 0.");

		health = hp;
	}
}

This, however, is discouraged, because (according to textbooks) setters like setHealth() can be overriden by child classes, creating unexpected or buggy behaviour in these child classes.

Continue reading