Game
FortressInvader


7 years ago

STOP CHASING ME!! Or 3 weeks into my first Unity3D project.


The birth of this bad idea

A few weeks back I was playing around with watabou’s awesome fantasy city generator. It gave me the idea of a gta2 style game where you play a wizard and craft weird spells to invade these procedurally generated fortresses.

But really, these fortresses will only play the role of giant sandboxes for the main focus of the game, the compound spell crafting system. Which im not going to go into detail in this log(There’s a bit more detail about it on the main page). I will write more about it when I actually be working on it.

This log is more about my progress and observations after 3 weeks of pouring all my free time into the prototype for this idea.

Over engineering everything

So, I have a fair amount of experience with programming but this is my first project with Unity3D. Therefor, I coded a lot of unnecessary stuff that the Engine already had figured out.

Pathfinding

I wrote my own 2D pathfinding and NavAgent.

5d09674e2f5b2.gif

The game starts by generating a grid

5d0967517f6a5.png

Each node makes a raycast to each of its neighbors. If no building is found the connection between the nodes is set as “walkable”. If a node has at least one walkable connection is it set has “accessible”. All this was largely inspired by this post

I then slapped a A* algorithm on that and created a nav agent component so the enemies could move around.

Its all fun stuff but looking back I could of just cheated Unity’s Nav3D to work with 2D and save myself a lot of time.

State machines

5d09675277c8b.gif

It started with a state machine diagram for the Guard AI

5d096755e37c9.png

I then wanted to create a easy tool to integrate these states and events in Unity. I ended up with a wayyy over engineered dynamic state machine system.

The system has 3 elements:

  • Events

  • States

  • Linkers

Linkers determine which events are connected to which states. They also determine what happens when a event is triggered. A state can have a transition to another state. A state can also be added so multiple states can run in parallel.

5d09675695b8f.png

Even though this is probably overkill for my project, the state machines have worked strangely well. But the complicity will probably come back later to bite me in the ass.

The SuspiciousState followed by the SurprisedState in action.

5d096757467e3.gif

Thats it

Problems and over complicated solutions aside i’m having a lot of fun with this. i’ll soon get to work on the spell system, the main focus of the game and see if my idea could actually work has a game.

Thanks for reading!



0 comments

Loading...

Next up

art comission.

Shadow The Hedgehog X pixel art

One of the most critical update for Sunblaze demo. Now you are able to pet a cat! Finally!

A Shiny Mega Gengar 🌟 For @ManutkArt 's #ThreeColorsChallenge!

Horror WIP A track that will be featured in a future horror game soundtrack! Stay tuned!

Likes appreciated ✌️

#gamedev #composer #horrorgame #indiegame #IndieGameDev #soundtrack

Let me introduce you to the new Mech line: Gendai Spec. Those are Mech that specializes in surprise attacks, covered operations, and stealth. They are equipped with melee weapons but one of Gendai's frames supports sniper rifles.

Who's is this little cutey👸 here? Thanks🙏 for a gorgeous fanart @WheNa! Feel free to share your arts, screenshots, or videos with #playzelter or #zelter hashtags! #pixelart #animating #unity3d #animated #indiegames #unrealengine #animate #conceptart

Art made for my friend @ungerbibs . Much love for this <3

Let's gooo! Sub-15 minutes achieved thanks to a new skip found by @mazou !

My new Endfall demo Any% world record is 14:48! Used safe strats and got too excited here and there, but I'm satisfied. Thanks to @ElPichon for the game, and y'all beat my time! ;D

Sometimes Aeron needs a friend to help him out in tight situations.