Programming Game AI by Example - Completed

Published September 01, 2011
Advertisement
Here I will report my milestones for Programming Game AI by Example.

Milestone 1: Completed Chapter 1 Math and Physics and Chapter 2 State-Driven Agent Design.

Download C# project for West World Complete.

Result image.
0 likes 10 comments

Comments

calculemus1988
[b]Milestone 2: Completed Chapter 3 Steering Behaviors.
[/b]
I send the source code for the project and a video I made where I present what I did. It is a short low-quality video, so that you guys don't waste time on download.

Keys:

S - Two ships seek mouse.
F - Two ships flee away from mouse.
A - Two ships arrive at mouse.
Q - One ship seeks mouse, while the other pursues it.
W - Two ships wander.
P - One ship pursues the other one, the evader.
O - Obstacle avoidance.
L - Wall avoidance.
I - One ship tries to get between two ships that wander.
H - Two ships hide behind obstacles from a third one.
U - Path following.
R - Offset pursuit.
C - Combined behaviors. In this state, press '+' or '-' to toggle visual debug info. Press Insert and Delete to pause/continue simulation.

[url="http://www.mediafire.com/?j7332caya6baf80"]Download Setup and Source C# project for Steering Behaviors.[/url]

[url="http://www.mediafire.com/?3zshm2l503m5323"]Download video presentation[/url]
September 02, 2011 11:05 PM
calculemus1988
[b]Milestone 3: Completed Chapter 4 Soccer Simulation.

[/b][url="http://www.mediafire.com/?22srvx6itow1s1p"]Download installation and source.[/url]

I am very happy with what I have learned. One of the best book experiences ever.

The approach I took was first to read and understand everything without coding. After two readings of chapter 4, I coded everything and after 5 days I ended up with code wondering how am I going to test all that. The solution was to test small meaningful things like does the ball reflect properly from the walls, does everything drawn matches actual data in the program, are the states of the goalkeeper fine, how does one player react to certain stuff and so on. It was a divide and conquer approach and it was not bad, but in future for bigger projects I might be more careful and not code everything like that. Code small stuff and then test, code little and test, and so on.
September 04, 2011 04:41 PM
calculemus1988
[b]Milestone 4: Completed Chapter 5 Graph Search Algorithms[/b]

The brushes are on the left and the algorithms are on the right side. Green is source, Red is target. Black is obstacle, Brown is mud, Blue is water and White is default terrain. Each terrain has it's cost. Click on some algorithm to see results. Move source and target to see how the algorithm updates. Press 'G' to see the navigation graph and 'H' to hide it.

[url="http://www.mediafire.com/?7g4rwchrabpgr7z"]Download installation and source.[/url]

I had coded Dijkstra before, now implementing A* was really cool. I also had previous experience with Breadth-First and Depth-First Search, but still I learned new things. All in all, another good chapter and project done.
September 06, 2011 01:41 AM
calculemus1988
[b]Milestone 5: Completed Chapter 6 Lua Scripting

[/b]I learned how can Lua be used in an application such as a game. This chapter was introductory, but I am looking forward to learn more about Lua for my game project later on as needed.
September 06, 2011 04:11 PM
calculemus1988
[b]Milestone 6: Completed Chapter 7 Raven, An Overview

[/b]
September 07, 2011 01:16 AM
calculemus1988
[b]Milestone 7: Completed Chapter 8 Practical Path Planning.[/b]
September 07, 2011 06:05 PM
calculemus1988
[b]Milestone 8: Completed Chapter 9 Goal Driven Agent Design


[/b]
September 08, 2011 10:00 PM
calculemus1988
[b]Milestone 9: Completed Chapter 10 Fuzzy Logic

[/b]I tested the fuzzy logic code separately from the rest. Here is the FuzzyTest project.

[url="http://www.mediafire.com/?2vv1ioyf3ra9py2"]Download FuzzyTest[/url]

Here are some images showing what I tested:

[url="http://postimage.org/image/n0gj3b44/"]Operators[/url] - As I move the mouse left-right the black dot(value for AND operator) updates.
[url="http://postimage.org/image/n0n58p38/"]Hedges[/url] - As I move the mouse left-right the black dots(very and fairly hedges values) update.
[url="http://postimage.org/image/xdxqc0o4/"]Rocket Launcher Example[/url] - I get the right value for fuzzify/defuzzify procedure for the Rocket Launcher example in the book.
September 09, 2011 10:11 PM
jugon666

Milestone 2: Completed Chapter 3 Steering Behaviors.

I send the source code for the project and a video I made where I present what I did. It is a short low-quality video, so that you guys don't waste time on download.

Keys:

S - Two ships seek mouse.
F - Two ships flee away from mouse.
A - Two ships arrive at mouse.
Q - One ship seeks mouse, while the other pursues it.
W - Two ships wander.
P - One ship pursues the other one, the evader.
O - Obstacle avoidance.
L - Wall avoidance.
I - One ship tries to get between two ships that wander.
H - Two ships hide behind obstacles from a third one.
U - Path following.
R - Offset pursuit.
C - Combined behaviors. In this state, press '+' or '-' to toggle visual debug info. Press Insert and Delete to pause/continue simulation.

Download Setup and Source C# project for Steering Behaviors.

Download video presentation

December 22, 2016 07:27 PM
jugon666

Hi, could you share the code for this steering behaviour project? I am interested in it.

Thank you in advance.

Best,

Jugon

December 22, 2016 07:29 PM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Advertisement