P1020265.jpg

First game in Unity: 3) Adding character



Having a first win on the board with the basic gameplay, as described in the previous article in this series, I couldn't help but get a bit ahead of myself and browse the Unity store for assets. Yes yes, the game still had a way to go and aesthetics should really be considered later, but I wanted to at least see what was around and also get some inspiration. In particular, the driving idea of angels and demons meant I would have to make sure I could find assets for, well, angels and demons. Otherwise, the mental vision of what I was doing, at the least, would have to change.


The Unity store is pretty well stocked with all kinds of assets in all kinds of styles, for characters, environment, visual effects, sound effects, you name it. Best of all, especially for beginners like me who are testing the water, there's a load of free content available too, much of it just as top-notch as paid options. However, search as I might, I just couldn't find a decent pair of an angel and a demon with similar styles that I would be happy using. This wasn't intended as a super serious game, so I wasn't after any super realistic models. Simple and cute was fine, but still with a certain something about them. I looked around at all options anyway, and imported various styles to just check them out, as much as to test the import process as anything. Again, as with many other features of Unity, I found this to be both quick and straightforward. With a couple of clicks, an asset can be selected and imported to the project folder, then dropped in the scene and given attributes just as any other object, such as my existing capsule characters. I could apply my exact same code and attributes to these new assets, then remove the capsule characters from the scene and still have the game run exactly the same as before, but looking all the more fancy, even if a bit disjointed due to the mash of styles I was playing with, but still.


Some free character assets that were tested out
Some free character assets that were tested out

One thing I learnt about at this point was the range of states in which character assets could be given to you by their creators. Some were simple mono-bodies that openly displayed their animation options by default. Some had multiple articulated parts that needed separate animation instructions. Others were somewhere in between. I played around with the Unity animation tools a fair bit and how they can be spoken to from code, which I had a beginner's understanding of thanks to the Unity "Create With Code" course. Still, that wasn't quite enough knowledge to master some of the more complex models I was finding, which by default just glided around the world with arms and legs straight down, like a mannequin. I knew that I probably didn't want to use such complex models for the final game, but seeing as this project was all partly for my education, I dug in with some of these animation issues anyway. Those mannequins were coaxed into life eventually with a bit of wrangling.


This is a good point to mention the Unity information resources and community. A keenly worded search engine query will typically yield information from sites like Stack Exchange, miscellaneous forums, official Unity forums, official Unity documentation, and the odd independent tutorial website. As is typical with such techy research, you find a full spectrum of both questions and answers, some more and some less useful than others. But Unity is popular and has been around for quite a while now, so information is certainly out there, with lots of example code too, and reiterating in Unity is quick. I've often found enough to go on with the first few search engine hits to either nail a problem or at least start moving towards success. That said, I was approaching this with some existing programming skills, and with experience trawling technical information for what sometimes feels like the smallest needle in the biggest haystack.


For the complete beginner, there will undoubtedly be a learning curve to break the boundaries of whatever course they start learning from, and running the gauntlet of knowing when to search for existing information and when to ask for help. Personally, I have not yet once had to ask a question on a forum, for Unity or anything else, as there has always been someone who has had a similar issue before and received as good a set of answers as possible from the community. The key to this kind of development is simply calm persistence. Being willing to hold on to a problem until it yields, and also learning at what point to let it go, or, better still, to put it to one side. Time and patience tend to solve many problems, often at surprising "ah ha!" moments. And don't get me wrong, calm persistence is a heavenly ideal. Even after years of techy tasks and programming, I still give in to a good rant at the screen on a regular basis, punctuated with a host of special words.


Final character design
The final characters for the game were slightly embellished spheres. Even though fancier options were available, this simplified style worked better with the game overall.

I stuck with the fancy character assets for a while as I continued to work on other aspects of the game, despite the mismatch of styles I had for the player, the enemy, and the target characters. Ultimately, this led to a realisation that guided the overall look and feel of the game, which was that I was actually happier to have super simple characters instead, barely more complicated than the original capsule placeholders. The standard level size and types of puzzle I was beginning to imagine all resonated with a clean and somewhat flat overall style. Having too much character detail seemed a bit too rich for such a game. So I swapped out those fancy assets for spheres, giving each a couple of eyes made from a couple of squished spheres, ending up a bit like a 3D PacMan. It became natural to stick with that design, and in some ways it even influenced the level design that followed, as how the characters looked affected how I imagined they could behave and what kind of world I could imagine them interacting with.


The moral of this story is that aesthetics can actually be important for development, even if not fully implemented during development, and that sometimes it's good to let things evolve on their own through such experimenting, at least with little home-grown projects like this. If you're at a company and boss-man says we're working on a high-gloss 3D action title about zombie vampires (has that been done yet?), then boss-man gets what boss-man wants. But starting out on your own is a different game of course. I would recommend playing around, seeing what you find, and having fun with the creative process. The final say should go with what works best for a project as a whole, and there's a lot to be said for simplicity when making such decisions.


 

The 3D assets shown halfway through this article can be found at the following links:


https://assetstore.unity.com/packages/3d/characters/meshtint-free-boximon-fiery-mega-toon-series-153958


https://assetstore.unity.com/packages/3d/characters/creatures/casual-tiny-slime-npc-pack-170624


https://assetstore.unity.com/packages/3d/characters/humanoids/fantasy/oriental-fantasy-character-berserker-grade-0-171147


3 views

Recent Posts

See All