Hi! Welcome to my tutorial series on how to create certain elements for your top down dungeon crawler. In this series I will be discussing how to create simple enemies/obstacles, create a basic player character, how to set up animations and how to make the game feel good a.k.a. polish.
I've been experimenting with these methods during a school project where I functioned as the lead developer/programmer for about 10 weeks.
As you may be able to deduce from the title, that game and these tutorials will be aimed at Unity3D and c#.
I personally believe the best way for a programmer to learn how to code is by looking at how others fix problems and then picking those solutions apart to understand, learn and experiment with new functionalities and possibilities.
As such I want to share my findings with the world! Go ahead and read, copy and analyse my work! I hope you can learn as much from it as I did!
Tutorials:
zaterdag 1 augustus 2015
dinsdag 21 juli 2015
Top Down Dungeon Crawler in Unity3D with C# - Polishing the Game
Last but not least, the polishing of the game.
Giving your game that extra "oomph" can really improve the experience. As games are mainly an interactive medium, interacting should feel good. Giving the player good and satisfying feedback on their actions makes the players enjoy the game more, so they'll play more!
Here are some examples on how to add a little polish to your game:
Giving your game that extra "oomph" can really improve the experience. As games are mainly an interactive medium, interacting should feel good. Giving the player good and satisfying feedback on their actions makes the players enjoy the game more, so they'll play more!
Here are some examples on how to add a little polish to your game:
Top Down Dungeon Crawler in Unity3D with C# - Enemies
Alright, on to the enemies, because what combat would be fun without opponents?
It wouldn't really even be combat... so yeah...
Let's get on with the tutorial.
Enemies can come in all sorts of different shapes and sizes. As such, I personally prefer to all base them of one universal enemy Controller, so all enemies have the same default values that can be called.
Here I've created a basic version of said controller. It contains code for moving, damaging, getting damaged and death. A lot of references will be made to the Player tutorial, so if you haven't read that one and as such don't understand some of the things written here, I do recommend taking a look at it.
Enemies can come in all sorts of different shapes and sizes. As such, I personally prefer to all base them of one universal enemy Controller, so all enemies have the same default values that can be called.
Here I've created a basic version of said controller. It contains code for moving, damaging, getting damaged and death. A lot of references will be made to the Player tutorial, so if you haven't read that one and as such don't understand some of the things written here, I do recommend taking a look at it.
vrijdag 17 juli 2015
Top Down Dungeon Crawler in Unity3D with C# - Mecanim
Working with Mecanim might be one of the most useful skills for a Unity developer. Working with Mecanim allows you to easily and rapidly create a system for your animations, which is also easily accessible through scripts and events.
If you have never worked with Mecanim before, I will give a very brief tutorial on how to set up an Animation Controller, so you will be able to understand this tutorial, but I do strongly recommend checking out the animation tutorials by Unity.
Though, because of some changes in Unity 5.0 these tutorials should also be watched when using a 5.x version of Unity3D.
Also note that Mecanim isn't limited to use for 3D models, it can also be used on sprites. Sometimes this requires a little bit of tweaking, but Unity Technologies is working on improving this feature.
If you have never worked with Mecanim before, I will give a very brief tutorial on how to set up an Animation Controller, so you will be able to understand this tutorial, but I do strongly recommend checking out the animation tutorials by Unity.
Though, because of some changes in Unity 5.0 these tutorials should also be watched when using a 5.x version of Unity3D.
Also note that Mecanim isn't limited to use for 3D models, it can also be used on sprites. Sometimes this requires a little bit of tweaking, but Unity Technologies is working on improving this feature.
woensdag 15 juli 2015
Top Down Dungeon Crawler in Unity3D with C# - Environmental Hazards
You know what would be cool? If we had wall-mounted turrets that fired projectiles at the player!
So let's do that. This tutorial assumes that you've either read the Player tutorial or have chosen to ignore it, as we will be making calls to the Character.cs script made in that tutorial and in particular, the Damage function.
vrijdag 3 juli 2015
Top Down Dungeon Crawler in Unity3D with C# - Player Character
Alright, let's get started on our game! First, we'll probably need a player character. After all, we do want to be able to play the game and being able to play as early as possible allows for rapid testing of the gameplay and tweaking variables so the game feels just right.
Let's start by making a list of what we want the player character to be able to do.
We want the player to be able to move. We want the player to be able to attack. We want the player to be able to get hit. So:
Let's start by making a list of what we want the player character to be able to do.
We want the player to be able to move. We want the player to be able to attack. We want the player to be able to get hit. So:
- Move
- Attack
- Get hit
- Die
vrijdag 30 januari 2015
Firing 2D Projectiles in Unity3D with C#
If you have ever tried to make a 2D projectile in Unity, you may have encountered a problem. You want the projectile to face its target, right? Well, that isn't as simple as it would seem, as there isn't a look-at function for 2D game objects. Not yet at least, I've come across posts claiming the developers at Unity were working to implement that function.
But I don't want to wait, that's why I made one myself.
But I don't want to wait, that's why I made one myself.
donderdag 29 januari 2015
Screen-shake in Unity3D with C#
Ever felt like a game was missing something? Just a little bit more feedback or a cool effect? Or you just wanted to be more like Vlambeer. Screen-shake can be the thing you're looking for.
In my opinion, if screen-shake is used correctly it can instantly make the game feel a lot more polished and "done", even if it's just an early prototype. Same goes for music and sound-effects, but today I'm writing about screen-shake.
woensdag 28 januari 2015
Simple Patrolling 2D AI in Unity3D with C#
Ever wanted to have a simple AI character in a 2D platforming game that you could easily assign patrol routes to? Well that's a pretty specific request, but have I got the thing for you!
What this script does, is move the AI game object from marker to marker, which can be any transform component. I prefer to use empty game objects with icons on them so I can see and select them in the editor, but you can't see them in-game. Of course you can use this marker system to your advantage. For example, if you want the player to be able to see the path the AI takes in a stealth game. Or you can make it so that the markers disappear when the AI reaches them and make the player able to create new markers, voila, strategy game!
You can also imagine using this script in combination with the microphone input in my previous post. A stealth game where you can shout into the microphone to distract the guards, or maybe whisper to prevent them from hearing you pass important information.
What this script does, is move the AI game object from marker to marker, which can be any transform component. I prefer to use empty game objects with icons on them so I can see and select them in the editor, but you can't see them in-game. Of course you can use this marker system to your advantage. For example, if you want the player to be able to see the path the AI takes in a stealth game. Or you can make it so that the markers disappear when the AI reaches them and make the player able to create new markers, voila, strategy game!
You can also imagine using this script in combination with the microphone input in my previous post. A stealth game where you can shout into the microphone to distract the guards, or maybe whisper to prevent them from hearing you pass important information.
maandag 26 januari 2015
Microphone Input in Unity3D with C#
I once thought to myself: "You know what would really be cool? If I could use the player's microphone input in my games!" So I did some research.
I've found, and experimented with this, which is just a simple piece of code which can be slapped onto any Unity3D game, pro or no, and it just works. If it's made in version 3.5 or higher.
But since you're reading this now, and at the time of creation Unity3D version 5 is nearing its release, I'm just gonna assume that you're using a more advanced version than 3.5.
Let me show you:
I've found, and experimented with this, which is just a simple piece of code which can be slapped onto any Unity3D game, pro or no, and it just works. If it's made in version 3.5 or higher.
But since you're reading this now, and at the time of creation Unity3D version 5 is nearing its release, I'm just gonna assume that you're using a more advanced version than 3.5.
Let me show you:
Abonneren op:
Reacties (Atom)