I choosed this one because the main exemple developped in this book is very similar to my game. I really recommend this book, I had absolutly zero knowledge in AI before starting to read it ( was 3 weeks ago ) and today I have something that works for my game (even if there is still a lot to do ...)

Concerning the details of the AI, it is composed of several components :- a steering component that is handling the movement of the bot, it basically contains basic behaviors to do things like move to a point, avoid walls, flee from a point .... they all just affect the speed vector of the bot- a pathfinder to be able to find a path to go from point A to B on the map- a memory component that is responsible of keeping track of the other bots that were in the field of view or that were heard recently.- a targeting component responsible of selecting the appropriate enemy target, it uses the memory to know about potential targets- a weapon system component responsible of selecting the appropriate weapon depending on the current target and to aim and shoot at this target- and the brain component, which is using all the other ones. It works with nested goals, it decides of a main goal depending on the context and then tries to solve it. Each goal is composed of several subgoals. Right now I have only 2 main goals for my bots: explore the map and attack target.

For example the explore goal choose a random point on the map and use the pathfinder to get a path to it. Then it adds a "follow path" goal to itself.

The follow path goal will take each point of the path in order and will add a "traverse edge" goal each time it needs to go to the next point.

The traverse edge goal will activate the seek steering behavior to reach the target point and terminates when this point is reached.When there is no point left in the path, the follow path goal terminates, and so the explore goal terminates ... and the brain will decide for a new goal to be added.

Note that at any time, the main goal can be changed depending on the context. For example if the bot is exploring the map and encounters another player in the middle of his explore path goal, this one will be discarded and replaced with "attack target" ( again depending on the context ... later the bot will not try to attack if it has a low health level, or no ammo left for example ).

Everything is very well explained in the book

The next demo I will post will have the debug features activated so you'll be able to see everything concerning the bots. Here is a screenshot showing it :

Ok, both of our bots would get along quite well My AI was inspired by that book as well. Goals, a brain for memory, pathfinding. I have goals such as Hunt, Track, Shoot, Guard, Dodge, Chill, Power, Stray.Only for the lower level physic stuff there is an additional state machine.Yes, it's a very good book.

Lethal Running - a RPG about a deadly game show held in a futuristic dysoptian society.

just a question about that book, I saw it had C++ examples, so im guessing its all in C++, I have hardly touched C++, I just kinda know the really basics that I have picked up from my friend who thought it would be a good idea to go from vb.net straight to C++, he wouldn't listen to me, he spent about 4 - 6 months trying to make a calculator work XD (a command prompt calculator, so no GUI).

@65K : great, your bots seems to be well advanced I had to change things as well for the lower physics as I'm using jbox2d ... but that was not a big deal in the end. I've also put all path finding stuffs in a separate thread .. I think it's better than having it in the main thread like in the book ( even if in the book the author proposes time sliced path finding )

@Phased : I used to do C++ in the past ( quite a long time ago, in a galaxy far far ... ), but I don't think it helped me The important things in the book are design and algorithms. So basically the C++ specifics are not important, you just have to understand the algorithm behind the code, and there are lots of comments so it's really not an issue ( at least it was not for me ).

Thanks for your comments, about the controls it's already done in the actual version, the one posted here is a bit outdated

I'm back from vacation and I finished to refactor the big buggy mess which was handling the game state ( I'm now using state machines and it's way cleaner ). So I will post a new demo this week end ... tomorrow I think

This version includes :- bots ( players controlled by the computer ). The number of bots + their level can be chosen at server creation time- particle systems (blood, explosions, smoke, sparkles ...)- new weapon : rocket launcher- different player skins/color ( assigned randomly by now ... should do a menu to select it ). Only two skins are available in 4 colors each right now ( yes the two skins are very similar )- some work to compensate internet lag- other things I don't remember ..

To do next :- optimize network messages size ... I'm sending too much ( and often non relevant) data right now - ammo handling + weapon pickup- bots aware of their health level to take decisions ( flee from battle, search for medikits ... )- bots aware of their available ammo/weapons to select the appropriate one ( or eventually to search for a better weapon )- menu to select the player skin- menu to select the list of map running on the server- in game menu for the server to be able to add/remove bots on the fly

Servers:I'm running 2 internet games on a server I have at home. If you try the game, please try to connect to them and tell me if the conditions for playing are all right ( as well as your ping by pressing F5 ).

Otherwise you can always run a local server with bots For info the map selector is in the lobby, just above the start button ... it's temporary, I have to do a dedicated screen to be able to select several maps, and display some more info on them (recommended number of players, map name ... ideally a top view of the map) ...

Oh I love this game. It's really polished, you got some nice sound effects and it runs really smooth on my computer.The only thing I did not like about your game was the AI. I think it was quite hard for 'easy' [size=6pt](yes I'm a noob :x)[/size]. Bots did sometimes not turn around when you shot them and that was quite weird. Also, I would like to see a cross hair (or whatever). Makes me feel better to know where I am aiming to

Oh I love this game. It's really polished, you got some nice sound effects and it runs really smooth on my computer.The only thing I did not like about your game was the AI. I think it was quite hard for 'easy' [size=6pt](yes I'm a noob :x)[/size]. Bots did sometimes not turn around when you shot them and that was quite weird. Also, I would like to see a cross hair (or whatever). Makes me feel better to know where I am aiming to

Thanks for your feedback !concerning the AI :- yes that's something I was expecting to hear It's quite hard to calibrate the levels of the bots because I play very often, and so it seems that I got skilled I'll definitely have a look at this and try to make easy and medium levels more accessible. I usually play in hard or insane

- to tell the truth, bots never turn around when they are shot ( if they do it is just luck ). That's in the TODO list for the bots. Later they will react to shoots but also to the sounds produced by the other players ( shooting or even walking for instance ... )

- for the crosshair, I was not inclined to add one because I thought it would be to easy to hit with some weapons then ( machine gun and railgun ... ) ... but you're not the first one to say this so I think I'll reconsider it Maybe a small indicator at the top of the screen showing the impact point could be a solution ... I'll think about that

Thanks again for your feedback ! I used to test the game with some friends who got pretty skilled as well ( they're all better than me ! ) so it's really interesting for me to get some feedback from people new to the game !

Just one question : did you connect an internet server or did you start a local game ?

The only thing I suggest is an aiming cursor. Even if you won't do it for server game implementations, make it an option for local game so beginners can get used to the aiming controls and how they work. (This game controls a lot differently from Crimsonland... but, it is very enjoyable none-the-less.) Keep it up!

I think once there are more limits in the gameplay, the game will be moredynamic and fun.

-weapon, ammo, health picksups-transporters / portals-force field doors that go on and off in a specific sequence(where you can see though, but not shoot though)-jumppads?, where you somehow get accelerated to a new x,y position

-maybe a 3rd dimension in the sense of platforms:what I mean are areas that can be accessed from the floor plane though staircases,tranporters and jumppads.On the platform the player can jump down any time.

Around the platform is an area marked as "too low" in the sense,that you can not shoot (and look) from the floor onto the platform from there as you are too closeto shoot from this angle.From the platform you can shoot down, except onto the marked area.when not beeing directly at the edge.

This gives the game another cover dynamic and movement limit apart from the walls/corners.

Environmental hazards would be nice, not just as a hazard for the player, but usable against opponents too. Sending them flying into spikes, saw blades, flames, acid, live wires, bottomless pits, luring them next to pop-up turrets, that sort of fun stuff

It's a really really nice work! I did not find the "easy" AI hard at all (but maybe I'm too good (or maybe you lowered the level))I like the fact that you put the game in fullscreen mode when it starts. Yet I don't know if people like that generally ?..I'll follow your project progress

@ctomni231:I'm currently trying to implement one ... it's not easy to have something at the same time nice looking, not too big/noticeable on the screen and still usefull ( but not too much, otherwise it would be too easy ). I'll post a screenshot in a few hours

@Damocles:in order :- yes for sure ! health pickup is already done, ammo + weapon pickup will come soon ( I think it's the next thing I'll implement after the crosshair ). I plan to have the same kind of behavior as in Quake 3 : start with default weapon(s) ( they will depend on the map ) and then pick up additional ones. On repawn revert to the default ones ...- that's indeed a good idea, I'll keep it in mind !- good idea as well, but I have lots of things to do as prerequisite ... most of them in the map editor - acceleration pads could be fun, I'll keep them in mind as well- 3rd dimension is something I excluded from the beginning, thinking it would be too ambitious. I had to put boundaries to the project to be able to get to the end, and this was one of the boundaries So I think I'll stay away from it ... maybe in a V2

@ReBirth:- remembering the last weapon will certainly become useless after the weapon/ammo system will be finished as you will loose almost all your weapons on respawn - yes why not for flashlight default on Keep in mind that the bots are aware of the light level ... so you can hide in the dark ... unless you have your flashlight on - for the campaign, maybe I'll do something like a sequence of challenges versus bots on different maps ... for sure I will not do a classic solo game ( with a scenario and so on ... ), it would be too much work for me

@sproingie:- some of these sound quite feasible, I'll keep them in mind This should be used carrefuly I think otherwise the map could become a big mess

@Tim Spekler:- nope I didn't lowered anything - I default to fullscreen on first launch because to me it's the way almost all desktop PC games are doing ... but then I have no idea if people like that

@Jimmt:- I completely agree, I still have some progress to do to draw correctly the player from top view ... maybe I'll render something from a 3d model as a reference because I have difficulties to visualize how a marines looks from top

Thanks again for all your comments and suggestions, it helps a lot to keep me motivated ! cheers.

Keep the full screen default. It is more professional. Almost all AAA games for PC these days go right to full screen. Right now your game looks A^3. It kinda feels like unreal tournament but 2d.

My only gripe which is a personal one would be the camera. I cannot play for longer then 5 minutes before getting sick because the whole screen rotates with the camera. It would not be as bad if the guy was more centered and not like at the edge. I know that you want people to be able to sneak up behind you without knowing but I just can't stand it. I don't think others are like me so no need to really give it much thought but maybe have some options on how the camera works. Other then that, everything looks great. Keep up the work.

java-gaming.org is not responsible for the content posted by its members, including references to external websites,
and other references that may or may not have a relation with our primarily
gaming and game production oriented community.
inquiries and complaints can be sent via email to the info‑account of the
company managing the website of java‑gaming.org