Pagina's

Sunday, 31 March 2019

Birthday bit

So, the family are gone and my wife just wanted to watch her lady show on TV (First Dates Hotel), so I went upstairs for some birthday bit of work on the game. I get Twitter messages every day that half my following like a message by a guy named Dilmer Valecillos which I follow. Dilmer makes his games and often inspirational tweets on the process of making games. Often, the main idea is that I should be consistent and try to work on my project every day if I can.

I kind of agree, because it's best to keep growing by a lot of small bits rather than big chunks every now and then. So birthday or no birthday, I'll have fun making my game for a bit, even if it's only half an hour.



What I made was not so special. A little connection between my Game Handler script and the NPC's so that an NPC could give a signal to the UI so that it could show a healthbar. This will be useful for combat. The Forest Guy knows he does not like the player at all, but is yet too feeble minded to do anything else but patrol the side of the woods and notice the player is he's around. Next step here will be to have him be not-so-nice and show his intentions in the UI.

Friday, 29 March 2019

Back to where I were

Alright, good stuff. I'm back to where I were when I started with the NavMesh, but now with NavMesh agents implemented for both the Maze Guy and the Forest Guy. They can both walk their patrol routes without dropping half way into the ground and getting stuck. Ánd, they can navigate the terrain when I put obstacles in their way. A copuple of days ago, they could too, but then they just pushed the walls over or kept humping into them with a small angle until they slide past. This looks better.


I needed to rebuild the stack of shapes (two capsules, a sphere and an enlongated cube) and tinker a bit with the height of the NavMesh Agent. This, and I had the Parent gameobject a physical one. While MazeGuy and ForestGuy were empty game objects with a bunch of children, the new ones (with a space in their name) are actually capsules that aren't rendered. 

I might tinker with the walking stuff again, especially the sideways rotation. I'm not yet sure how this simple object rotation works with movement by the NavMesh. It looks like to goes great, but maybe that might not work later, so I'll keep a careful watch over it.

Tomorrow I'll not be working. Maybe a little bit in the morning, but we're going to a wedding and we'll be back late at night. Sunday'll be my birthday, so we'll have visitors. After that, I'll see if I could make a paralel AI system with an Animator with a FSM (I think of it as the Flying Spaghetti Monster, but it's Finite State Machine here). If that works alright and is really better,  I'll replace what I have now.

Next I'll be building on it. What will the guy do when he sees you, does it make sense to freeze all activity when the guy is miles away? Do I find more interesting stuff in my book? Or do I have new toys to play with for my birthday? See you in a couple of days!

Thursday, 28 March 2019

AI frustration

Today, I've been reading about AI and navigation in specific.  NavMeshes in Unity.

What I saw the last couple of days was that patrolling NPC's don't really care about obstacles. I had the Forest Guy walk between two waypoints and that went like a charm as long as it was all a straight line.  Now, being a Skyrim veteran, I know not even Lydia walks in straight lines all the time,  so let's see.

I'm supposed to either work everything out myself, or use these NavMeshes. I "bake" a NavMesh and have agents like Forest Guy navigate that.

And then, whatever I do, they drop waist down in the ground and get stuck.  Weird and frustrating , because I have no idea what causes that. Now I have very few time this weekend.  A friend's wedding and my birthday,  so  now I go to bed a sad man...

Anyone any ideas?

Tuesday, 26 March 2019

Back to game mechanics

There's not so much I can tell right now, especially since I've been ill the last couple of days, but I did find some time to work on the game again. This Blender business has not been a gold mine for me yet, so I decided to drop that for a while and have a look at the game mechanics again. Which is nicer anyway...

We have this maze guy I've been rambling on about lately. Appears he has a nasty brother: Forest Guy. Forest Guy hangs around near the forest and is a hothead. Read: an enemy. We're going to have actual enemies in the game, would you believe it!

So what does our nasty lumberjack do? (Hey, note to self, I need to have him wielding an axe). If I understand the AI research stuff correctly, it's all about the finate state machine. He's idle for a time and sees if any patrolling route is in place. If there is, he'll go for a walk.

While he's doing that, or while he's idling around, the (essentially invisible) player object walks by and the guy is triggered.  If, of course,  the player is near enough, in the moving line of sight and the view is not obstructed by a wall or something. Then *something* will change.

Well, that's all for now. I'm going to bed now. Hope I feel better tomorrow.

Monday, 25 March 2019

Old man, idle

I'm ill, so I'll keep it short for today, because I've been Blendering around the last couple of days to replace the creepy maze guy. Well, I have one now and with some Mixamo animations, he does look kind of creepy, but better. I found out the maze guy is very old. He looks like Gollem in that pose, but this is called progress. I got myself a new placeholder.


What I'm going to do with this man is have him stand around like this and notice that when the player comes near, he starts whining for the player to accept his quest and fetch his whatever-it-may-be. I'll  go back to Blender later to make the animations myself so I can have more flexibility, but this is a nice start.

Saturday, 23 March 2019

Graphics...

I told you, I'm a programmer, not an art guy, but indiegame development makes people at least jacks of all trades. Or try to be one because making a game means... making a game.

Most of the posts I wrote up to now were about programming and I think that is what i'm doing best, but secretly I think I like making graphics too. Especially pixelart animations for the 2D game, but I'll need some 3D and vector stuff in the big game, so I ran a little Inkscape course on Udemy and downloaded Blender to make a character for my game.

It's not finished by any long stretch, but it is starting to look humanoid:


No head, nor feet, quite literally, but starting to get better. I might have to start all over again later, but at least I learn to work with programs and now I know what "extrude" means, so win-win.

Thursday, 21 March 2019

Some tiny remarks.

Now that I'm watching Netherlands against Belarus, I have some small things about my projects. I'm doing two projects right now and both have a little version control implemented, which is nice. Furthermore, there's a couple of things that I want to do.

In the big 3D project, I'm planning to replace the Creepy Guy dynamics to have the NPC turn. I seem to like to work with colliders for everything I do, but that may not be the right decision. What I'm going to do is have the NPC object figure it out on his own. This could make it all more flexible when I want to implement real NPC behaviour like fighting, fleeing and patrolling. I found a very interesting article on Game AI that will guide me a bit, I think.

Another thing I want to do to the Creepy Guy is replace him by actual graphics-a-like Blender models that I'm going to make myself. I never did that, but did watch some tutorials and it seems possible to do and interesting to try with bones for animations and stuff. Capsules are nice, but they will not capture us, so we need humanoids.

The small 2D project has other challenges. I am starting to have a working movement system and the player has a couple of animations, including an animation for picking up stuff, like a sword.


This looks amazing, as you see, but I need some code to run when the animation was finished and I want the code to come from the object that is being picked up. How am I going to do that? Delegates, Interfaces or some other way. I'll have to figure that out.

Lastly, I saw a video about Godot. I might try that on my slow laptop later.

Monday, 18 March 2019

Fixing the view

Somehow, in the last weeks, I found out that my player character suddenly looked somewhere else entirely. It did not happen when I were running around in the field with all the room in the world, but it did happen when there was more subtlty needed, like in the maze. Since I was trying to get the quest system to work, I hid a sword in the maze and went looking for it. That was nearly impossible. Imagine walking around a small hallway where all the walls and the ceiling have the same colour and suddenly you stand the other way around. I had to fix that, but that'd be a pain for years to come.

I refuse to use the Standard Assets first player controller because I don't really understand what is happening there and I want to be able to add features later. I need to understand what is really happening, so that I can do that correctly and efficiently. That's why I watched the First Person Controller tutorial by Acacia on Youtube in the beginning to get a good grip and be able to add things later.

I learned a lot, especially about controlling speed and the overall concept that we have two objects to control: the camera and the player himself. This tutorial is really helpful, also fixing a problem for when the ground is sloping downwards, teaching me about raycasts and physics laws that this historian does not even dream about. But somehow it was not working like I wanted it to, so I looked for another tutorial to guide me.


This one was by Holistic3d, a very welcome female voice in this male world of tutorials and a nice and well-explained one. Not sure what made the difference, but it fixes my problems. Now I only had to make sure that I could not look over my head and see the world behind me upside-down. That was easily done by clamping the rotation of the camera. Nice. Now I can carry on with the quests and fix the fact that somehow the inventory does not show up anymore. Enough to do.

Anyway, I also got a github thing to work. Appeared easier than expected. Makes me wanna take a little more risks, because I can always turn back, which is nice for the creativity. 

All in all, a lot of work done and a lot of work to be done in this game.

Thursday, 14 March 2019

Side-project: funny 2D RPG

I haven't mentioned this one yet, but I've been working on a new side-project on my slow laptop in the bus. It's about the same stick figure that had to dodge shoppers at Oxford Street, but a bit more interesting and hopefully fun. As I get screenshots of people getting hundreds of points in Oxford Street, I found out it might be too easy, so let's take it up a notch.

I don't have a name yet and in fact, the game is called New Unity Project on my laptop, but it's a kind of 2D RPG that will hopefully interesting enough to have people play it, but light enough not to take it too seriously, because I want to pour some of what people love and hate about me in it: my humour.

The story needs to get fleshed out, but you are a stick figure. In fact, you are the exact same stick figure that made Oxford Street such a great success. Only, you get to meet more than copies of yourself with a hat. There's skeletons (white skinny dudes with strange dashes for ribs), a business consultant trying to ruin your day by turning everything Six-Sigma and there's courtesanes that you can use to lure the skeletons to have a good time.

(And imagine this is 32x32 pixels)


Apart from making the pixel graphics which I like pouring my crazy creativity in, I like the chance to add small additions and make the game funny. My big project is supposed to be a more serious game, this one should just be fun to make and later to play. And it'll have a lot of features that were never in Oxford Street, like a second spacial dimension, combat and references to tripple-A games.

Tuesday, 12 March 2019

Invisible stuff

When I show my game to my chief game tester, my wife, she seems to expect new mechanics and graphics any time or lose interest, which is fine. I is difficult though, because sometimes the biggest leaps do not have anything to do with what the player will experience in the end, or at most very distantly. It's about making sure things can happen before they do.

Yesterday was such a day. It was half past twelve at night and my wife got upstairs from watching The Sinner to notify me that we really do need to go to bed, as I have a job and the alarm will start whining at 6:15. That is life for a game developer that does not (yet) have what it takes to be able to fund it all without a day time job. But what I wanted to say is that damn have I been productive for my standards and damn don't I have anything concrete to show for it.

I was working on a journal class for my player. For now, it should be able to hold a set of quests that the player is associated with and a set of NPC's that that player has interacted with and that think something of the player. There'll be more things in the journal, but I'm not sure what exactly, but probably some sort of log of where the player went, who he met and what he did. I do have in mind that I'm not going to get it as cumbersome as in Morrowind. I know people seem to love it, but I don't and hey, it's my game.

Furthermore, there's not a basis quest system which knows where it is added to the journal and if interaction with an object is needed for that. Then it knows that there is a task to perform, consisting of going to a location and/or getting things (maybe I'll have some kill-the-guy-things as soon if I get to work on combat). Once the quest is completed, there are rewards and specific people think better of you. And if you fail, people think worse.

Next I'll be doing with the journal is have a UI like with the inventory and focus on actually creating quest objects to test if what I did is actually working. If it does, this project is officially a game. Not a very complete game, but a game nonetheless. And I'm actually pretty proud of what I learned in just over 2 months. Is that arrogant?

Saturday, 9 March 2019

Turning the creepy guy

Sometimes they say AI gets to look creepy if it looks very human-like, but just does not have it to be human. Well, I made a creepy AI today and it does not look human at all. It's a capsule with a cube for arms and a sphere for a head (with a red nose to show direction more easily)


I call him Maze Guy, because he's a guy standing by a maze. What I wanted to achieve was that the guy waits for the player to enter a trigger collider named Passive Range (which starts near the wall with the obsolute door) and from then on, the face will keep pointing to the player object (more specific: the first person camera on the head of the player object, because eyes are up here). When the player gets inside a smaller trigger collider, some interaction like fighting and quest giving will be possible. When the player leaves the area, the maze guy will look to the wall again.

At first, the maze guy was just a capsule with a nose, following the player and turning immediately to face him when he enters the Passive Range. Even though this is just a placeholder for actual graphics later, it did not capture any humanness, so I added a head to move independently. That gave me The Exorcist with a head turning 360 degrees with the body standing still.

This was not actually the kind of creepy I was looking for, so I tried to have the body rotation clamp to the head rotation to have the neck like ours be able to turn a bit, but no more than 30-40 degrees. That worked alright, except when it was switching from 359 to 0 degrees, when the body flashes in big leaps, as in the gif. I fixed that by not changing the angles directly, but by having Unity move them. Now it's up to me to tweak the speed which is just a bit too slow now. 

I also made a little exclamation mark animation, which will indicate that maze guy will have a maze-related quest to perform, the first here. There will probably be something to get inside the maze and to deliver to our creepy friend. It's starting to look like a game.

Tuesday, 5 March 2019

Inventory is difficult but rewarding

Sometimes they say you only know what you have once you lose it. That is not true. I strongly object you know it when you try to show it on the UI. That's how the saying should go. It's been a couple of days now that I'm working on the inventory for my game. Because I'm still a noob, I'm letting myself be guided by an excellent tutorial that I found. Thank you, Craig! This tutorial helped me a lot and taught me the basics of keeping UI and the items separated and somehow I learned enough to get my own spin to it, which is most rewarding of it all.

What I have now looks kind of like the screenshot I shared the other day, but with some differences:


The first difference - and the main one - is that the UI actually reacts to the inventory that is there in the game itself. I have a sword and some coloured balls to pick up in this development scene and the UI reacts nicely to picking them up, so that it nice.

Second is the picture and info to the right. Obviously, that could use some font sizing, but it looks alright and I'm pretty pleased with my home-made sword sprite-placeholder. What it does now is that it finds the first item when building up the list on the right and using the same mechanic to show info of the object, but in another configuration (if that's correct English).

Later, I'll have it react to clicking on the list to the left. The pictures on the top will filter certain kinds of objects (e.g. Weapons or Food which mostly have very different uses, while apples might be inefficient projectiles too). The kind of thing that is selected will also influence the button the bottom right. Swords can be wielded, keys can't. Apples can be eaten, shields can't.

Next, I'll have the UI react to the clicking and refresh the panel to the right. Furthermore, I'll try and implement dropping objects like in Skyrim. I'll probably save the actual usage of objects for later.



Saturday, 2 March 2019

What have you got?

A quick update from the car (wife's driving). The last couple of days were quite busy, but yesterday night I found some time to start work on the inventory panel.  It looks quite nice. I am having trouble positioning the stuff in Unity, that's why I needed to tweak some things in the inspector to show the screenshot.


It is kind of based on the screen in Elder Scrolls IV Oblivion. Most of the images are probably placeholders and nothing is interactive yet, but I'm glad it populates alright. More work to do.