Monday, November 23, 2015

AI, Puzzles, Design

I rewrote the AI over the past couple days.  Instead of running blindly into obstacles before trying to go around, it now avoids them from the beginning.  Also, it retracts useless nodes when the system density is low.  It still needs polish, but it's much more effective and looks less stupid than it did before.

The method I used is actually different than what I was planning on using before.  I had an idea for a while that I felt pretty sure about.  But a few nights ago, it clicked in my mind that it would be extremely inefficient.  Fortunately, I quickly thought of a new way that would be much easier to implement and more efficient.  It works pretty well.

After it's polished up a bit, the next step is to build the hunting state and the state machine that controls the transitions between states.  At that point, the AI will be able to function normally and appear intelligent.

However, I'm undecided whether I'll keep focusing on the AI right now or put it off for later.  After I got the new AI working, I started thinking of level ideas.  Oddly enough, none of them involved the AI.  I thought first of some puzzles.  Yeah, I know, how are there puzzles in a strategy game?  Well, this strategy game is different and the mechanics actually mesh pretty well with puzzles.  Here are some screens of a puzzle I made (excuse the placeholder graphics, they're terrible):


At first glance, this looks like a simple maze.  However, there is only one way through.

One of the mechanics of this game is that the farther away you build the node, the bigger it gets.  You'll notice the wide dark circle around the dark green node.  If the new node was built within that circle, the node would be smaller.  Outside of it, it's large, like the white circle.  It doesn't fit.


Once again, it's stretching too far.


This is the only way through.

This would be one of the earlier, easier puzzles.  Later levels would be much more difficult.  I plan to create more puzzles like this to accompany the AI fighting levels.  I know that puzzles and combat are very different and may feel awkward squeezed into the same game.  If people don't like it, then so be it.  But I want to explore these mechanics to their fullest and I think there's a lot of potential here.

I'm thinking my next step in the development will be integrating some simple scripting, at least enough to allow transitioning to new maps.  That way, I can start stringing them together.  I want to start giving the game a skeleton structure.  Once I begin making a real level that requires more development of the AI, then I'll probably come back to it.

The combat will come in later levels.  I want it to be clear that the combat isn't the point of the game.  Instead, it's only another application of the core mechanics.

I have a few more mechanics up my sleeve that expand upon the core idea and make things more interesting.

It's interesting to look back at my early posts on this blog and see how far Sever has come.  A long time ago, I was dreaming about fog of war and AI and had no idea how I would implement them.  In fact, many times I gave up hope that I would ever be able to do it.  And now here they are.  Now my only worry is about the actual game design.  I'm past the technical part.  I know I can do that.  Now on to something I have no experience with at all.

I've never designed a game.  Okay, I've made my own variant of minesweeper, and I think it's pretty fun (I'm probably the only one), but that was a pretty simple game to design, to be honest.  This game will be much bigger (though relatively small compared to mainstream games).

I am trying to design it by Jonathan Blow's philosophy.  I want the mechanics to inspire the levels and not the other way around.  Anything that isn't true to them will be cut from the game.  Of course, Sever would never compare to Braid, but it doesn't need to.  This project is more for my own experience.  And it's been a good experience so far.

Anyway, enough of my ramblings.  Thanks for reading!

clevceo

No comments: