I'm Makin A Game: Pathing and Retention

Pathing

I've now built up a way to implement simple pathing to anything I choose to spawn from the editor. For now, it's just a series of points that the object will follow in order. They'll either follow it to the end, then start over from the beginning, or follow to the end, and then reverse their course along the points. I plan on expanding on this in the future to allow pauses at specific points, maybe choosing which direction the object should face once paused or a variety of other actions that may take place at those points. In addition, I think I'll add a way to have just general roam areas that the object will wander around in randomly rather than a strict point to point type movement.

Retention

The game now supports the ability to store and recall what was in the previous area. This is obviously very important and basic, but yea. I've got it set up and functioning swimmingly. This stored data could also be used in the future for save files. I think the system is robust enough that if I want, I could go ahead and use it for saving at any point the player wishes. . . I doubt I'd allow that, but the option is there. In any case, all objects will now store and restore correctly. In addition to this, I've implemented a way for those objects to know how long a period of time the player was absent for. What can be done with such information you ask? Well, for starters, I can change their alert status from active to inactive so that if the player was gone for a long enough time, they'll just go back to doing what they were doing prior to chasing the player around. I'm also toying with the idea of having mobs be able to follow the player from one area to the next. It's not hard to do. . . at least, it's not too complicated, but I'm not sure just yet it's something I want. We'll see.

Grouped AI

Another thing I threw in is that enemies will now react to other enemies in their direct vicinity attacking the player. So you can't say hit one, and have only that one know what's up with joe blow right next to him is oblivious. Right now, it's super simple so they'll just also join in on attacking the player but I can flesh it out further once I get down to the nitty gritty.

Loading

It took some doing, but I put in a loading screen. On the PC which is where I'm capturing this stuff, it doesn't seem to take any time at all to load, but on the 360, I'd say in between those two levels, the load is around 4 or 5 seconds. I'm figuring with more art, sounds, and full sized areas, it'll be considerably more. I figured out how to break off a thread so that the loading screen can have stuff going on (animations and whatnot) to show that something is still happening to the player as the bulk of the system is loading up the next area. I also added a fade to black and fade back in between level loads to keep it from being too jarring. Again, this is all place holder and I plan on making something a little more interesting later on, but the foundations are now there so hurray for that.

What Else?

Aside from those, I've made a lot of smaller changes here and there to various systems so that everything works together nicely. A lot of clean up and optimization. I put a little more time into the way the camera handles as well. . . There was a crazy bug with the camera that I tracked down over an hour. The fix took literally 5 seconds. . . But oh man, finding it was sweet.

13 Comments
14 Comments
Posted by Fobwashed

Pathing

I've now built up a way to implement simple pathing to anything I choose to spawn from the editor. For now, it's just a series of points that the object will follow in order. They'll either follow it to the end, then start over from the beginning, or follow to the end, and then reverse their course along the points. I plan on expanding on this in the future to allow pauses at specific points, maybe choosing which direction the object should face once paused or a variety of other actions that may take place at those points. In addition, I think I'll add a way to have just general roam areas that the object will wander around in randomly rather than a strict point to point type movement.

Retention

The game now supports the ability to store and recall what was in the previous area. This is obviously very important and basic, but yea. I've got it set up and functioning swimmingly. This stored data could also be used in the future for save files. I think the system is robust enough that if I want, I could go ahead and use it for saving at any point the player wishes. . . I doubt I'd allow that, but the option is there. In any case, all objects will now store and restore correctly. In addition to this, I've implemented a way for those objects to know how long a period of time the player was absent for. What can be done with such information you ask? Well, for starters, I can change their alert status from active to inactive so that if the player was gone for a long enough time, they'll just go back to doing what they were doing prior to chasing the player around. I'm also toying with the idea of having mobs be able to follow the player from one area to the next. It's not hard to do. . . at least, it's not too complicated, but I'm not sure just yet it's something I want. We'll see.

Grouped AI

Another thing I threw in is that enemies will now react to other enemies in their direct vicinity attacking the player. So you can't say hit one, and have only that one know what's up with joe blow right next to him is oblivious. Right now, it's super simple so they'll just also join in on attacking the player but I can flesh it out further once I get down to the nitty gritty.

Loading

It took some doing, but I put in a loading screen. On the PC which is where I'm capturing this stuff, it doesn't seem to take any time at all to load, but on the 360, I'd say in between those two levels, the load is around 4 or 5 seconds. I'm figuring with more art, sounds, and full sized areas, it'll be considerably more. I figured out how to break off a thread so that the loading screen can have stuff going on (animations and whatnot) to show that something is still happening to the player as the bulk of the system is loading up the next area. I also added a fade to black and fade back in between level loads to keep it from being too jarring. Again, this is all place holder and I plan on making something a little more interesting later on, but the foundations are now there so hurray for that.

What Else?

Aside from those, I've made a lot of smaller changes here and there to various systems so that everything works together nicely. A lot of clean up and optimization. I put a little more time into the way the camera handles as well. . . There was a crazy bug with the camera that I tracked down over an hour. The fix took literally 5 seconds. . . But oh man, finding it was sweet.

Edited by BlinkyTM

That was cool. Needs more blood and gore!

Just kidding. :P

Who is the girl with Abraham Lincoln? I think making the mobs follow the player is a good idea, otherwise they could just run away when facing a "tough" enemy.

Posted by Fobwashed

@BlinkyTM: I was drawin some random NPCs. She's just one I got around to actually coloring so I figured I'd use her to test out some NPC stuff =P

Yea, I'm thinking the following would be a good thing, but I was talking to a friend and he was sayin it doesn't seem like it'd fit and it'd be sorta weird if things came shambling into other screens. I sorta like the idea though. For now, I think I'll do it, but if I put it in and things seem weird, I could always take it out =P I'm sorta building the game around choice so if the player decided they wanted to avoid fighting, that's also something I want to be sure they could do. . . I guess I could also vary it per enemy type so. . .

Edited by BlinkyTM

@Fobwashed said:

@BlinkyTM: I was drawin some random NPCs. She's just one I got around to actually coloring so I figured I'd use her to test out some NPC stuff =P

Yea, I'm thinking the following would be a good thing, but I was talking to a friend and he was sayin it doesn't seem like it'd fit and it'd be sorta weird if things came shambling into other screens. I sorta like the idea though. For now, I think I'll do it, but if I put it in and things seem weird, I could always take it out =P I'm sorta building the game around choice so if the player decided they wanted to avoid fighting, that's also something I want to be sure they could do. . . I guess I could also vary it per enemy type so. . .

Ahh, alright. Didn't know there were choices going on here. Well, looks cool to me (I like the art style). Can't wait to check it out when you release it.

Posted by nintendoeats

How does retention work?

Posted by Fobwashed

@nintendoeats: When a level loads, it pulls out of an XML file created by my editor. It then stores all this information in various List<T>s. During my load, when it changes levels, it'll create a struct I have set up that contains all the object related lists that I want to keep in memory and slaps a name on it and fills it with the existing objects. Everytime it loads, it'll check through the list of previously loaded levels to see if this level has been created before already and if it has, it'll populate the level using already existing and stored objects rather than creating new ones from the XML. In the future if these held in memory lists become too large, I plan on saving the information to storage and then recalling them as necessary though I don't think that'll really be a problem. We'll see -_-;; I think that's what you were asking about.

Edited by Still_I_Cry

I like the art style as well. It looks whimsical and cute :P (sorry if that isn't what you're going for, that is just the way I see it).

@Fobwashed said:

Yea, I'm thinking the following would be a good thing, but I was talking to a friend and he was sayin it doesn't seem like it'd fit and it'd be sorta weird if things came shambling into other screens. I sorta like the idea though. For now, I think I'll do it, but if I put it in and things seem weird, I could always take it out =P I'm sorta building the game around choice so if the player decided they wanted to avoid fighting, that's also something I want to be sure they could do. . . I guess I could also vary it per enemy type so. . .

Is there a way to make it so that the enemy only follows the player for a specific distance?

Also, ragdoll physics :D? they always add an amusement factor into the game if done well.

Is it hard to decide how the physics in the game are going to work?

I would check this game out :D

Posted by BlinkyTM

@Still_I_Cry said:

I like the art style as well. It looks whimsical and cute :P (sorry if that isn't what you're going for, that is just the way I see it).

@Fobwashed said:

Yea, I'm thinking the following would be a good thing, but I was talking to a friend and he was sayin it doesn't seem like it'd fit and it'd be sorta weird if things came shambling into other screens. I sorta like the idea though. For now, I think I'll do it, but if I put it in and things seem weird, I could always take it out =P I'm sorta building the game around choice so if the player decided they wanted to avoid fighting, that's also something I want to be sure they could do. . . I guess I could also vary it per enemy type so. . .

Is there a way to make it so that the enemy only follows the player for a specific distance?

Also, ragdoll physics :D? they always add an amusement factor into the game if done well.

Is it hard to decide how the physics in the game are going to work?

I would check this game out :D

Ragdoll physics would be awesome. Just make them ragdoll and leave their ragdolled corpses in the environment so we can marvel at their contortions :D

Posted by Fobwashed

@Still_I_Cry: There's a way to do anything and everything =P For having them only follow for a specific distance, I could either just calculate how far they've traveled since being alerted, then have them stop once a threshold has been passed, or check the distance between the object and the player and if that distance is greater than a specific amount, have them stop. As for ragdoll physics, I can't really do that since it seems like that depends on the limbs and whatnot being separate pieces that can be manipulated by the physics engine. I'm drawing all my art as frames as opposed to individual pieces that are being put together and animated sooo. . . No dice.

@BlinkyTM: While I can't have the corpses ragdoll, I was considering making them somewhat interactable. . . as for animating them while they're dead, that may require more art assets than I'm willing to devote to something like that. It'd be more of a polish, if I have time type deal than something I'd want to put in at this point -_-;;

Posted by nintendoeats

@Fobwashed: Yes, it is. I'm doing work in gamemaker right now, and I suspect that it has built-in functions to do this. However, It's nice to know how these types of things work in proper software environments.

Posted by Fobwashed

@nintendoeats: You've piqued my interest. What're you workin on and is there anywhere I can check out your progress? You had a pretty cool series of audio logs concerning game development a while back so I'm curious to know what yer up to =) Also, what do you think of gamemaker? I remember taking a look at it waaaay back when but never really tried using it.

Edited by Still_I_Cry

@Fobwashed said:

@Still_I_Cry: There's a way to do anything and everything =P For having them only follow for a specific distance, I could either just calculate how far they've traveled since being alerted, then have them stop once a threshold has been passed, or check the distance between the object and the player and if that distance is greater than a specific amount, have them stop. As for ragdoll physics, I can't really do that since it seems like that depends on the limbs and whatnot being separate pieces that can be manipulated by the physics engine. I'm drawing all my art as frames as opposed to individual pieces that are being put together and animated sooo. . . No dice.

Oh, that is cool.

Also, is there anyway you could make them do something other than just fall flat?

If not then that's cool too. I would still check the game out :D

Also, what is the premise of the story?

What are the characters like/going to be like?

Edited by nintendoeats

@Fobwashed: I'm not showing it off quite yet, but I'm very excited about where it's going. It only supports the 360 controller atm, but if you have one I'll be sure to send you something when the game is in a show-able state. To pique your interest, it's kind of like a combination of Batman AA, Just Cause 2, Bladerunner, Crouching Tiger Hidden Dragon and Metal Gear Solid. I'm developing a multiplayer version first, and then will modify that for the single player (which is where the most exciting stuff lives as far as I'm concerned).

Gamemaker is very cool. It's about as high level as you can get while still being a legitimate programming environment. It seems like it can get as complicated as you need it to be, but if you are doing something simple you can just dump in code blocks and forget about it. Also, everything lives in an object. This is really easy to work with.

In the end, it makes me glad that I never got any further in C++. This does everything that I need without making me want to die. On that subject, what language are you working in?

EDIT: Ah, PC and 360. I assume it's C# then.

Posted by X19

Wow this has improved since I last saw it. I'm scared of the AI they're becoming more intelligent :o
 
Music is cool it has made me want to write a new piece.