Monday, October 20, 2014

Node Types, AI

There's not much new to show in a screenshot, unless you want to see a bunch of debugging graphics that will normally be hidden.  But I won't bother you with that.  This will be a short post anyway.  Just popping in to share a little progress update.

There are now a set of different types of nodes that you can build, and the way you choose which to build is by the distance you place between it and the node it leads from.  In other words, there isn't some menu that allows you to choose the node type.  You can't press a number key to select which node type you want to build.  If you want to build a certain kind of node, you have to drag a certain distance away from the node you're dragging from.

That might sound unusual, and it's very possible that I'll give this idea up for a different one later on.  However, I'm sticking with it for now.  Here's why:

Previously, you right-clicked to cycle through the different types of nodes.  This isn't terrible relative to the ways you traditionally choose weapons in an FPS.  In fact, I may have mapped number keys to different kinds as well later on.  Many gamers may have felt at home with that method.  However, I had some qualms with it.  First off, having to right-click three times or reach up and press a number key every time you wanted to build a certain node felt tedious and forced.  Also, while right-clicking is easy and the player wouldn't easily forget it, but nobody would ever know about it without first being told.  From day one, I've wanted this game to feel so intuitive that the player could just start playing without any tutorial.  Of course, this may have been wishful thinking and it may be impossible, but I don't think it's such a bad idea to get as close as I can.  All in all, it just didn't feel right.

For a long time, I thought I'd be stuck with that method because there really wasn't anything better that I could think of.  However, one day I thought about the selection by distance method, and it played around in my head for a bit before I really set on it.  At first, I only thought about how much more intuitive it would make things, but I also started to think about how it would affect the rest of the gameplay.  For one, it would limit the way the player builds his/her routes.  The minimum distance wouldn't change anything because there was already a minimum distance for different types of nodes, but the maximum distance was a new limit that would drastically change playing-style.

At first, this scared me, but after a while it grew on me.  One of the main reasons I grew to like it was because it made each node type more unique in its use.  The distance became the cost of building the node.  Honestly, it just felt natural.  It fit.  It also simplifies AI a bit (which I've been thinking about quite alot lately).

Anyway, that's my current choice for node selection.  On to path-finding.

I'm starting on the AI.  I hit a point point where I could go one of three ways: add more features, start on networking, or start on AI.  There are some features I want to add, but I can easily add them after networking and AI.  That way, networking and AI will initially be simpler to code and I can just build on top of them later.  Networking would be really cool to do, but AI's been on my mind and I really don't know anybody that could help me test the networking at the moment.  I can test the AI myself no problem.

At the moment, I'm developing a path-finding system.  I've never actually done path-finding before.  I've read up on it, but I never got around to trying it out.  As I've been reading up on it, however, I've been thinking through how I could use it in Sever.  Normally, path-finding gets an agent from one point on a map to another.  It doesn't build a route system.  Because there isn't really a precedent for this kind of game, I thought it was a lost cause, but now ideas are starting to pour into my head about how I could implement it.  I'm really excited to get it working and have an opponent to play against.

So far, a map of possible paths is created and it takes all geometric obstacles into account.  However, it isn't yet able to do anything with it.  I'm still reading up on all the different algorithms, trying to determine which one is best.

I'm also reading up on genetic algorithms and neural networks, seeing if there's any way to use them in Sever.  Don't worry, I'm not just trying to find excuses to use them, but I think it's a good idea to explore them just in case.  They may just turn out to be the best thing that ever happened to Sever, but I'll never know if I don't look.

I guess this turned out to be a bit longer than planned.  My bad.  Anyway, thanks for reading!

clevceo

No comments: