Progammer who wishes to learn more
- Technozeus
-
Technozeus
- Member since: Aug. 31, 2008
- Offline.
-
- Forum Stats
- Member
- Level 02
- Blank Slate
I just like to first say that i submitted my first flash game about 1-2 days ago. I made that game using macromedia flash 2004 and I learned a lot from making it and now i wish to make a more advanced game using things like tiles and also have more adanced artificial intelligence.
So the question is, do any of you guys know any good sites on tile based games or also how to make advanced AI? Like I know basic trigonometry already and I know that that helps too with developing these types of games. I am also looking for web sites with sprites and other types of images.
Thanx in advance.
- Destined1
-
Destined1
- Member since: Sep. 20, 2008
- Offline.
-
- Forum Stats
- Member
- Level 02
- Blank Slate
check my game out
http://tomramsell.com/SFC.swf
maybe we could get it going together.
peace
- DarkMana
-
DarkMana
- Member since: Apr. 4, 2005
- Offline.
-
- Forum Stats
- Member
- Level 23
- Blank Slate
Everything you'll need to know about tiles.
Asus P5Q PRO, Intel E8400 @ 3.60 GHz, 4GB DDR2-1000, ATI HD4850
- Technozeus
-
Technozeus
- Member since: Aug. 31, 2008
- Offline.
-
- Forum Stats
- Member
- Level 02
- Blank Slate
I also want to know how to make smart AI and that tutorial doesn't really have it. Like I want the AI to be made in such a way where they would go directly to you and then attack you. I would also like to know how you can make your character rotate to where ever your curser is.
- zuperxtreme
-
zuperxtreme
- Member since: Jan. 2, 2005
- Offline.
-
- Forum Stats
- Member
- Level 08
- Blank Slate
that's not exactly real AI, but whatever.
If you want him to go straight for you you just need to check the enemies coordinates and your players.
If the enemies are higher, then subtract. If they are lower, add. etc.
If it's going to be a tile-based game, that solution wont work. Look up A*( "A star") path finding. Or maybe breath first.
To look towards the mouse, assign the player something like:
myRotation = Math.round(Math.atan2(xx,yy))
Where xx is the difference between _xmouse and your players _x
same for y, but..with y.
- Musician
-
Musician
- Member since: May. 19, 2005
- Offline.
-
- Forum Stats
- Member
- Level 04
- Blank Slate
At 9/21/08 12:10 PM, Technozeus wrote: I also want to know how to make smart AI and that tutorial doesn't really have it. Like I want the AI to be made in such a way where they would go directly to you and then attack you. I would also like to know how you can make your character rotate to where ever your curser is.
I believe that is covered in the pathfinding chapters of tonypas tutorials. Just a note though, tonypas tutorials do assume you have a firm understanding of actionscript. So if you don't you may have to start a little smaller than tile based.
I have no country to fight for; my country is the earth; I am a citizen of the world
-- Eugene Debs
- Technozeus
-
Technozeus
- Member since: Aug. 31, 2008
- Offline.
-
- Forum Stats
- Member
- Level 02
- Blank Slate
At 9/21/08 12:19 PM, zuperxtreme wrote: To look towards the mouse, assign the player something like:
myRotation = Math.round(Math.atan2(xx,yy))
Where xx is the difference between _xmouse and your players _x
same for y, but..with y.
Alright, well i can understand the formula to getting the angle to where the character will turn, but can you please tell me how I can actually tell the game to rotate the character to a certain angle? Thanx.
- zuperxtreme
-
zuperxtreme
- Member since: Jan. 2, 2005
- Offline.
-
- Forum Stats
- Member
- Level 08
- Blank Slate
That would be the _rotation property.
So, something like(on a frame):
myPlayer.onEnterFrame = function(){
this._rotation = Math.round(Math.atan2(_xmouse - this._x,_ymouse-this._y))
}
- Technozeus
-
Technozeus
- Member since: Aug. 31, 2008
- Offline.
-
- Forum Stats
- Member
- Level 02
- Blank Slate
At 9/21/08 01:54 PM, zuperxtreme wrote: That would be the _rotation property.
So, something like(on a frame):
myPlayer.onEnterFrame = function(){
this._rotation = Math.round(Math.atan2(_xmouse - this._x,_ymouse-this._y))
}
Alright, well thanx a lot. I am gonna read up more on this stuff but you and the other people who replied to this thread have been a big help.
- El-Presidente
-
El-Presidente
- Member since: Jun. 2, 2005
- Offline.
-
- Forum Stats
- Member
- Level 27
- Blank Slate
You really have to learn to read up on these things and use the Google search bar. You could have easily searched something like Flash AS2 Simple AI or something, which would have been much smarter. Also, to the guy who did the _rotation formula, you forgot a *180 in there.
MY E-PENIS IS BIGGER THAN YOURS
8=================================>
...and this is my fag...

