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.