Devlog #6 - Enemy Scripting, Inventories and More


So last year I made a plan to complete this game demo by May of this year.  This is very helpful for me as a solo developer to stay on task and meet achievable goals. I mapped out an outline of what was needed to complete the demo, but as I marked something off the list I added two more things. It was getting overwhelming and many times I wanted to throw in the towel, but I knew if I gave up now I'd never finish this game so I told myself to keep going and not give up. Though it's later than my original goal I'm proud that I have worked through the majority of the tasks and am getting close to completion.

- Enemy Scripting/ Animations/integration

After illustrating some enemies I decided to begin scripting their behaviors. I'm using unity's built in visual scripting formally known as Bolt for a lot of the scripting in Milo. I'm not great at programming and only know enough C# to get by. I wanted to define a few types of enemy behaviors:

• Simple enemies that chase the player

• Enemies that chase then attack

• Ranged

• Flying enemies. 

I have only scripted two types and so far they have worked well as a basis for most of the enemies. I basically took inspiration from a few lessons I followed online and made some tweaks to fit my needs. They are essentially made up of simple states for idling, chasing and attacking as well as states for taking damage and dying. I also adapted and modified the health script from my player character which made it really easy to startup and test. This is what I love about visual scripting. As a beginner game developer I find it very helpful to separate different behaviors in States. I tried to understand how this works in C# but I constantly got my brain wires crossed trying to keep track of all the scripts talking to each other. 

I spent a lot of time fine tuning things like the knockback, damage effects and reactions. more time than I should. My goal is to really give the player a satisfying experience when they encounter enemies in Milo so I want to make combat feel fluid. There are a few things I have in mind to add to combat which I hope to get to before the demo is finished. 


- Breakables

Next I worked on adding some breakables to the game. crates, barrels and pots for starters. When you're a playing a game with a weapon you got to have things to SMASH! I made some of these as platforms the player can walk on and interact with. Later on I may add more intention with them for puzzle solving or reaching higher platforms but for now they are just fun to break . Once again I setup these breakable objects as a prefab template in order to easily adapt new breakables in the game, like crystals or grass.


- Inventory UI

From there I began working on an Inventory window. I knew I wanted something that would display upgrades and progress of quest Items. I started with the assets I had to activate the inventory with a button press which would pause the game and open a simple UI window. Then for the style I began researching some of the inventory screens I liked, and adapt my own style to them. However I started to realize an issue I needed to solve sooner rather than later. The question is how many upgrades are going to be added to the game? How many items and item types will be picked up and what will they be used for? It's no secret that I draw a lot of inspiration from the Zelda franchise, particularly from the 80s era. I want to follow that formula of acquiring special items/equipment which you can use to access more areas to progress in the game, with my own twist of course. However at this stage I have not yet nailed down what those items will be or if I'll even be able to incorporate this feature, given my personal limitations as a solo developer. So for now I settled on this look. So I decided on this look and implemented the art into the game, setting some sound effects and added animations to the selector. I have added some tweaks here and there as I work on other parts of the game which I think improves the overall UI experience. I do find it difficult to make sense of all the moving parts and coordinate what happens during gameplay with what appears in the UI. I could certainly spend more time studying how the Unity's canvas and event system works. I also ran into another problem. The inventory window I imagined would have slow moving particles moving in the background. After much trial and error I discovered that you can't show particles on a canvas in Unity, at least not without a workaround. From the research I found that you need to add another camera that renders only the particles or some such. It was confusing so I put that idea on the shelf for now.


- Popup UI

Speaking of User interface. I wanted to work in some interactable popups during gameplay. So First I worked on the popup graphic. I wanted to set it up in a modular way with just one object in the canvas being activated, so that when the player opens a chest the data is sent to that game object's scripts and replaces the object sprite and text. Next I wanted to give a brief pause to the player input so that he stands in celebration having obtained a new item. I did this with a simple state added to the player graph. This again is why I appreciate visual scripting because I can easily switch the player into another state briefly and quickly see it put together. 

For the sake of keeping this post  from running on I'm going to end it here. I have a lot more to cover so look forward to my next devlog where I'll be mostly covering my level building process. 

Get Milo: Tale of the Elder Seed

Leave a comment

Log in with itch.io to leave a comment.