Hello Guest, please login or register.
Did you miss your activation email?
Login with username, password and session length.

Pages: [1]   Go Down

Author Topic: A thought-Those who want 2 Heroes in a level but play as 1 of them.  (Read 2177 times)

0 Members and 1 Guest are viewing this topic.

King Tetiro

Leader of Phoenix Heart
A thought-Those who want 2 Heroes in a level but...
« on: September 10, 2006, 06:49:25 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 3549
You know in some games 2 Heroes are in the Level and one of them is you and the other is the CPU? And how the CPU knows whch objects are enmies or not and fights them? How do they do that! I ain't going to use it but it may help some people someday.
Logged
  • Phoenix Heart
Re: A thought-Those who want 2 Heroes in a level...
« Reply #1 on: September 10, 2006, 07:59:32 pm »
  • *
  • Reputation: +3/-0
  • Offline Offline
  • Gender: Male
  • Posts: 6629
... >.>, this is very basic AI, to basic to really explain. Try reading some finite-state AI tutorials.
Logged

King Tetiro

Leader of Phoenix Heart
Re: A thought-Those who want 2 Heroes in a level...
« Reply #2 on: September 11, 2006, 05:40:36 am »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 3549
Really? It's that's basic? Is there an example?
Logged
  • Phoenix Heart

King Tetiro

Leader of Phoenix Heart
Re: A thought-Those who want 2 Heroes in a level...
« Reply #3 on: September 15, 2006, 08:24:54 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 3549
Any examples? Any? At all? How do you do it?  really want to know!
Logged
  • Phoenix Heart
Re: A thought-Those who want 2 Heroes in a level...
« Reply #4 on: September 15, 2006, 08:35:45 pm »
  • *
  • Reputation: +3/-0
  • Offline Offline
  • Gender: Male
  • Posts: 6629
Just read up on Finite State Machine based AI and Path Finding, you shouldn't have a problem with it its quite simple.
Logged

King Tetiro

Leader of Phoenix Heart
Re: A thought-Those who want 2 Heroes in a level...
« Reply #5 on: September 16, 2006, 05:13:19 am »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 3549
Finite What?!?!?!?! I don't have an idea what you're talkng about.
Logged
  • Phoenix Heart
Re: A thought-Those who want 2 Heroes in a level...
« Reply #6 on: September 16, 2006, 05:58:33 am »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 1635
Well we don't have any idea of what you're talking about. I don't think it is possible to be any more vague.
Logged

King Tetiro

Leader of Phoenix Heart
Re: A thought-Those who want 2 Heroes in a level...
« Reply #7 on: September 16, 2006, 06:49:36 am »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 3549
Right let's make an example.

Laigonaz(YOU)(From Rising Darkness) and Tearclan(CPU)(From Rising Darkness) are trying to get the symb of Life(Needed an objective) but there are enemies on the way. Laigonaz pegs for the symbol but TEARCLAN(CPU) fights the enemies. How would this be done?
Logged
  • Phoenix Heart
Re: A thought-Those who want 2 Heroes in a level...
« Reply #8 on: September 16, 2006, 07:23:20 am »
  • (y)(;>.<;)(y)
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 3293
What I like to do, though it works best for large battles, is to give everyone a flag. Like a bool for true or false meaning "Good" or "Bad".

Then I have all the enemies flagged as bad and all the friendly's AND the player flagged as Good. All non-player charecters (Good and Bad) search for nearby foes with the opposite flag, so good looks for bad and bad looks for good. And they will attack the ones they find.

As for how they fight, it's a matter of how well you can do your AI coding for the Enemies.
Logged
Re: A thought-Those who want 2 Heroes in a level...
« Reply #9 on: September 16, 2006, 01:00:42 pm »
  • 笑い男
  • *
  • Reputation: +9/-0
  • Offline Offline
  • Gender: Male
  • Posts: 2124
Finite What?!?!?!?! I don't have an idea what you're talkng about.
just google "finite state machine bases ai" or something lol
Logged

この世に悪があるとすれば、それは人の心だ
  • .hack//The World

King Tetiro

Leader of Phoenix Heart
Re: A thought-Those who want 2 Heroes in a level...
« Reply #10 on: September 16, 2006, 01:21:56 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 3549
I've tried but I can't find it. What the hell am I meant to do?
Logged
  • Phoenix Heart
Re: A thought-Those who want 2 Heroes in a level...
« Reply #11 on: September 16, 2006, 01:36:02 pm »
  • *
  • Reputation: +3/-0
  • Offline Offline
  • Gender: Male
  • Posts: 6629
Just use google, there are tons of articles on Pathfinding and Finite State Machine's.

http://en.wikipedia.org/wiki/Finite_state_machine
http://ai-depot.com/FiniteStateMachines/
http://www.generation5.org/content/2003/FSM_Tutorial.asp

http://www.policyalmanac.org/games/aStarTutorial.htm
http://ai-depot.com/Tutorial/PathFinding.html
http://www.tonypa.pri.ee/tbw/tut22.html

I'm not going to tell you how to do it as you will never learn anything that way, but surficed to say making a AI enemy / allie is not that difficult when you learn the basic techniques
« Last Edit: September 16, 2006, 01:37:57 pm by Helios »
Logged

Antidote

>.>
Re: A thought-Those who want 2 Heroes in a level...
« Reply #12 on: September 16, 2006, 02:15:05 pm »
  • In all seriousness who's serious?
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 1485
ai depot is a good site to go to i used it for a project i WAS working on until i lost all of my source to a virius and i didn't back it up serves me right i guess XD >_<
« Last Edit: September 16, 2006, 06:40:01 pm by antidote »
Logged
  • Axiomatic Data Laboratories

King Tetiro

Leader of Phoenix Heart
Re: A thought-Those who want 2 Heroes in a level...
« Reply #13 on: September 16, 2006, 06:39:37 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 3549
This is all nice all, but I want to know how you do it in GM!
Logged
  • Phoenix Heart
Re: A thought-Those who want 2 Heroes in a level...
« Reply #14 on: September 16, 2006, 07:01:34 pm »
  • (y)(;>.<;)(y)
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 3293
GM you have to take the Theory behind it and apply it to the Game using your knowledge of GM. Basically you have to understand what you are doing before you do it.
Logged

aab

^ Evolved from a Hobbit
Re: A thought-Those who want 2 Heroes in a level...
« Reply #15 on: September 16, 2006, 09:58:21 pm »
  • *
  • Reputation: +0/-0
  • Offline Offline
  • Gender: Male
  • Posts: 992
What you need is logic; Just sit, get a piece of paper if you have to, and write out all the things that are involved, (maybe in a circle or something).
Look, think about everything that could happen and what you would do at those times.
Think about if's and changing variables.

If that isn't enough (which it should be):
Consider your AI as being a thing with various 'states', and whenever in one 'state', the ai does certain things, and is succeptible to having the state changed by certain things happenening - These things ar
e different for each 'state', and so the AI moves from state to state throughout its existance, doing the things it does at those times.

Think about a beamos for example:

States: Rotating about, shooting the player.
In rotating about, it Rotates about, and IF it sees the player, it changes state into 'shooting the player'.
In 'shooting the player', it does nothing for a bit of a second, fires a beam, and then returns to the state 'rotating about'.

Think about this kind of plan for a things like enemies and CPU players, and how to implement this using code.
Logged




I ♥ Sol
.... I ♥ Sol ? wtf how long has that been there? >_> *rrrrrrrrar*
  • MySpace

gm112

Re: A thought-Those who want 2 Heroes in a level...
« Reply #16 on: September 17, 2006, 07:49:34 am »
If you want to learn AI, you should stop going crazy.. calm down.  Basically, AI is just a bunch of checks and  do's.  Example:

Quote
Int Ally = 0; //Taken from the idea of TheDarkJay.
Int Enemy = 1;

If (Object == 0);
{
    Don't Attack;
}
else{
     Attack;
}
Don't complain that this code won't work because this is pseudo code. You work it out yourself on what to do.  Since you're using GM, obviously it'll be a cakewalk to do AI. Also read other peoples post, TheDarkJay's, AAB(one of the best programmers on zfgc), and helios(again, one of the best programmers on zfgc).
Logged
Pages: [1]   Go Up

 


Contact Us | Legal | Advertise Here
2013 © ZFGC, All Rights Reserved



Page created in 0.047 seconds with 71 queries.

anything