Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Is it possible to make an ai (vs computer player)

Author
Message
kirtn14
13
Years of Service
User Offline
Joined: 8th Sep 2011
Location:
Posted: 7th Feb 2012 23:24
Can I add ai's to apps on agk or is it too complex and hard to do? If its not could someone please point me in the right direction

kirtnicholls
Canadian Mark
12
Years of Service
User Offline
Joined: 28th Jan 2012
Location:
Posted: 8th Feb 2012 00:26
AI can be a complex issue as well as physics. They can seem out of
reach except for the math genius. But A long time ago when I tackled my first game with no physics engine like Box2D I came accross a great piece of advice.

Believable vs Realistic

Whenever I get stuck on an issue like AI I break it down to those two components.

Believable:

I'll give you a quick example: If you think about pacman where the ghosts chase the player they are not actually tracking the player or anticipating the player action no intelligence is required. They follow a simple set of rules for the paths they take, but the illusion of a basic form of AI is the effect the player sees.

So when a ghost comes to an intersection it has to make a descion on which way to turn
It could chose random if the player is far away or towards the player if they are close.

Realistic:

If you have ever played a game like Call of Duty some very advanced formaulas are used to set the enemy path, reactions, targeting and so on

My point is that sometimes a simple solution will have the same effect. There alot of threads about AI on the net but for most 2D games they are overkill
Hodgey
15
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 8th Feb 2012 11:40 Edited at: 8th Feb 2012 11:41
Quote: "Can I add ai's to apps on agk or is it too complex and hard to do?"

That depends on what the ai is supposed to do. If you're planning on writing ai for pong then that can easily be done in AppGameKit but if you're planning on writing ai for an RTS then that could get very complex.

So what do you have in mind?

kirtn14
13
Years of Service
User Offline
Joined: 8th Sep 2011
Location:
Posted: 8th Feb 2012 12:19
I was thinking about an opponent in a car game

kirtnicholls
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 8th Feb 2012 13:20
That shouldn't be too hard but what I will say is that if you are new to programming it might be better to start with a simpler game. I personally avoid AI as much as possible just because of all the problems that can occur. I started a "simple" path finding algorithm a while ago and I will try to figure out why it is not working one day if I have time...

What I'm saying is start simple. Even experienced programmers avoid complex AI's unless it's completely necessary.

JimHawkins
15
Years of Service
User Offline
Joined: 26th Jul 2009
Location: Hull - UK
Posted: 8th Feb 2012 17:32
Quote: " Even experienced programmers avoid complex AI's unless it's completely necessary."


Experienced programmers avoid programming unless it's completely necessary!

-- Jim
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 8th Feb 2012 17:38
Quote: "Experienced programmers avoid programming unless it's completely necessary!"

Very funny

The Zoq2
15
Years of Service
User Offline
Joined: 4th Nov 2009
Location: Linköping, Sweden
Posted: 8th Feb 2012 18:42
Quote: "I started a "simple" path finding algorithm a while ago and I will try to figure out why it is not working one day if I have time..."


If it's T1, I would love to see how you made it!
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 8th Feb 2012 19:43
An early version is here somewhere, search for AI or free code...

Login to post a reply

Server time is: 2024-11-23 00:50:43
Your offset time is: 2024-11-23 00:50:43