That there “fun factor”.

Started on getting all my entities defined within a file, now it’s just a matter of adding in more properties so that trees and doors and such can go in too. I ended up using configparser to do the job as I had with some other files and it turned out to be pretty straightforward. Included in this file are the following properties:

relevant combat data
speed
“AI state”
faction
x/y coordinates of the tilesheet where the guy is located

Besides this, I’ve added in a level transporter/stairs so that as a player, the gameplay right now consists of going to the stairs, entering the cave, and then finding your way through to the other side without losing all of your health.

One nuance I’m discovering is that it feels really fake with how the pathfinding works–specifically, that every single creature in the area will chase you only from a certain scent value, currently set at 10 squares away (give or take depending on obstructions). What would make more sense is if, say a hunter could track and follow you farther than a little mushroom could, or what have you. I’ve got a few ideas rolling around in my head to give that effect, currently the most likely is to directly add in a “search depth” parameter to the entities, and floodfill out a wider range and check that way.

But a wider flood range means that the game will probably take a performance hit from doing a large recursive floodfill, and there’s got to be a way to trick the player into only thinking that one thing is tracking you more aggressively than another…

Another trick to pathing I’ve heard about (that I think Quake 3 bots use, actually..) is that the game tracks where the player moves (say, storing the coordinates in a list/array), and then the AI would find that path and follow it using that list. Perhaps alternative path strategies could work.

I could also use A*, but at this point I want to see if I can do this in a sneaky way without resorting to it. >_>;

another mental note for later: speed currently only works by slowing down the entities relative to the player, not giving the monsters additional turns. That needs tweaking.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: