Developing with Unity (Pt. 3)

Today we’re not talking systems, development, and code- we’re talking GUI instead!

One of things I wanted to implement fairly early was some form of UI for the player to interact with. While this helps the player (as is the purpose of a UI existing) it also helps with the development process as I can check whether statistics, UI element interactions, and other awesome stuff is actually working or not. Again, while it could be added later, it’s probably better to add it now and make sure all of it works rather than try and implement something that may or may not work later.

It also accelerates the time scale in which I can actually have a playable game.

Imagine if you didn’t have a UI and you went into combat and your only indicator of your survival was if you got a game over screen or not? That would be terrible! I will not have terrible things within my development! Well, besides the things that I think are good but are actually awful. Of which there will no doubt be a few over the coming months.

As mentioned in my previous Developing with Unity post I am using the Unity GUI tools. I am considering using the OnGUI functions instead, as even though you can’t place these so accurately, they are slightly easier to use. Or, rather, they don’t require as much to actually get them working. As, at the moment, my GUI is stored in a prefab which I add to each new scene as and when I need to. However, that only works to a degree as you need to link any game objects within the scene back up to the GUI. Whereas a script with the OnGUI functions would just draw them and display them regardless of where the character went, fully inclusive of all connected game objects, and a pretty much easier to handle experience overall.

Both systems have drawbacks and benefits.

In my case it would also mean I can scrap three prefabs, probably five-ten scripts, and a bunch of other stuff which would make the development process smoother and less resource intensive. All of this taken into account, I am not going to do anything just yet, as I am currently rewriting and polishing all of the old game systems. Much to do!

Speaking of rewriting and polishing the old game systems I now have some new features. Such as a save system that continually and automatically updates your saved character file to make sure you’ve always got the current health, currency, and all of that other good stuff stored. I am also working on tying this into a checkpoint type system for each area so that on death you will return to the last checkpoint. At the moment it just returns you to the character spawn position which is good enough as I only have one scene.

However, I will go forward and fix that to get it working as intended in the next update of the systems and engine.

I’ve also implemented a fairly crude but working combat system where an enemy can look for, find, and attack you when you get within a specific radius of them. It’s fairly basic at the moment and I need to find a better way to differentiate enemies- but it’s working. Which means you can fight and/or die. Basic combat calculation systems included. Tying into this quite nicely is a new character creation system with all new statistics and the like. So there’s a lot going on right now.

Have a nice week, all!



Developing with Unity (Pt. 2)

Today we’re talking systems, development, and code. Pretty much all we ever talk!

After I got to grips with the various things that Unity could do, got a bit better at C# scripting, and began to understand the logic behind the creation process I started working on the core systems. Admittedly this is quite a difficult task when you’re just working from an idea and you don’t actually have anything tangible. But I’m going with this creation process for the first project as I know that when I come back to the scripts, systems, components, or whatever else that needs to be improved it will be easier to do so.

That and I don’t really want to plan out such a large project with all these bells and whistles that I would likely be able to code but wouldn’t know how to.

I never could take naming my characters seriously.

I never could take naming my characters seriously.

I’m also trying to keep it fairly simple for the time being so that I have something to show for it in a reasonably short space of time. Say a month or so. Not that I would have a fully completed and tested game in a month- but I’d have something playable at the very least. Otherwise I would have this half finished “it will be finished one day” project staring at me.

I can’t really say where I’m going with this or how I want it to play out in the end. I do know that I want basic things like magical attacks, equipment, an inventory, some form of currency (or maybe multiple currencies), and a few other RPG staples. I’ve already started working out a few basic elemental types of damage so you can be more resistant to one than the other or some will hurt more than others. It’s very difficult to fully explain without seeing it but it is there.

The style of the game is something a little Diablo-ish but a little Kingdoms of Amalur: Reckoning-ish, too.

With that I mean that you’ll generally be facing enemies like you do in Diablo and having a number of them on you at a time- but defensive, evasive, and other similar strategies would be useful. Of course at this point in time I’ve not even implemented basic combat so who knows where it will go? Or how it will change?

However, the reason I am looking at this all now even before I have a basic combat system in place is to make sure I lay some good foundations. Even if it’s a few basic things like defining the attack damage type when calculating combat algorithms- it helps. These are things that, when I return to them, or develop them, they will at least exist so there is something for me to work off of. Rather than having to find a way to implement all of that later which may or may not work and cause me any number of headaches, bursts of profanity, and such. As that would just be really unpleasant for all within earshot of my cloud of profanity.

Namely the two cats. One of which is far too young to hear words like that.

I’ve also started developing the basic UI for the game which I am currently using the “new” Unity GUI tools for. Some of which is a little more difficult than I would have given it credit for, but, well, what about this project so far has been really easy? None of it! Which is why it has been so fun!

Have a nice weekend, all!


Developing with Unity (Pt. 1)

I have a beach, a skeleton, and three tents. Well worth the week of coding. Really.

I don’t really know why, nor do I question it, but I am fascinated about game design and development. Which is why when I knew I could mod Legend of Grimrock I immediately dived into that engine to create something. I’ve always wanted to create something that I can share and that people can enjoy.

It’s partly the reason I enjoy doing creative things so much.

So, early in January, I decided to pick up Unity and give it a go. For those who are unaware what Unity is- it’s awesome. It’s a development studio that features a few different coding languages in which, well, if you can code it- you can make it. But best of all (if you’re still unsure whether you want to use it) it comes with a free version.

One great thing about Unity (considering it has a Free and Pro license) is that the free version comes with all of the tools you will need to actually begin developing your first project. Of course, it depends on what you’re aiming for, as higher quality functions are restricted to Pro, but it’s not like the free versions are all horribly grainy nasty textures and poor quality lighting. They’re really nice for free. Plus you can always import your own if you’re looking for something even higher quality. But the free version is pretty much usable from the first moment you open it up. Textures, terrain modelling, lighting, collision detection, character movement, camera control- it’s all there.

The other great thing about Unity is the Asset Store. There you can pick up any number of assets or example projects. Some are available for free (just be sure to check the license fits your needs) while you can also peruse the paid assets for high quality, ready to use, commercial use resources. That said, there are some really great assets available for free (with the only requirement that you credit them) so it’s not a case you have to spend a lot of money to get nice resources.

The addition of the Asset Store is a massive bonus as these assets can be instantly imported into your project (after downloading of course) to add working resources to your project with ease.

You can also find a number of free assets (which I do believe are developed by the Unity team themselves) for free on the Asset store. They’re varied and limited but there are some really nice additions like carts, tents, and other fantasy type models. Not to mention a lot of foliage and modern day assets too. It’s a wonderful thing.

Thus, over the course of two weeks, give or take, I disappeared from most places as I went to learn C# by which I mean I broke a lot of functions and poked them until they worked again. I haven’t got a great deal to show for it but I have something. Plus, I am currently going back over my old code and scripts and removing all of the unnecessary bits and pieces. So hopefully I will actually have an encounter system and you’ll actually be able to fight enemies and use magic and such.

It’s an interesting journey if nothing else.

Maybe one day I’ll have something I can share with you all that is actually playable. Which, if nothing else, would be further than I’ve ever got in any kind of game development prior to this.

Have a nice week, all!