|
-
Who needs pants?
[SMALL TEST] Ai possible move directions.
Hey guys/gals,
Just started working in flash again. And on a project i started so long ago which i am going to finish if it kills me. And you know how it is when you haven't worked on something for a while you tend to want to start again and redo all your code. So thats what i started to do this weekend But instead of coding back up to the stages i was up to and ending up with the same result i thought i might throw a couple of test's together and get them working and then piece it together when they are all working perfectly 
Well my first test is trying to get the character ai to detect the next possible moves properly and error free.
So here is the first of many test's here.
Test 1
What happens is when you click one of the arrows the character should move in that direction 1 tile and then display the next possible moves. What i want you guys to do for me is test it a little and let me know if arrows appear where their not supposed to. And anything that doesn’t appear to work properly.
That’s it for know i think.
Thanks in Advance
-
ism
moved his little purple arse around everywhere and found not problems.
Graphics Attract, Motion Engages, Gameplay Addicts
XP Pro | P4 2.8Ghz | 2Gb | 80Gb,40Gb | 128Mb DDR ATI Radeon 9800 Pro
-
Who needs pants?
-
Senior Member
worked nicely, looks promising!
"If I have seen further it is by standing on the shoulders of giants." Isaac Newton
------------------------------------------------------------------------------
-
Who needs pants?
Thanks TheLostGuru, the project is massive and have been working on the idea on and off for quite sometime now. Just figured i would re write what i have and post my progress to keep me motivated. And finish this game!
-
SaphuA
-
Who needs pants?
Thanks for the advice Suphua,
Yeah i actually have made a fully working iso engine with all the graphics done and the depth swapping. Its actually an old engine i used to use and just redone it. Looks similar to the flash mmorpg dofus not sure if you have seen it. The reason i am using arrows at the moment is just to illurstrate the ai detecting which ways are possible moves. In the next step i am going to remove them an let the ai make decisions on its own. Its was just put in place for me to see if the ai wouldnt do anything funny before i write the decision making script. Becase this will be a heavily ai based game i want to make sure its working perfecto.
Thanks for the replies
-
SaphuA
Aaahh 
Well, I don't know how compplicated your maps are going to be. But if you're planning to add AI into an ISO engine, wouldn't it be better to just a pathfinding system? It would do the whole wall-checking and movement stuff all at the same time. And even if your maps aren't that complicated you might still want to add an easy version of a pathfinding system, you could update it every tile. Or you could make the 'robot' patrol between certain points or anything.
Just idea's 
~sph
-
Who needs pants?
True i should and now i think about it i will thanks for the ideas Saphua ill post a path finding demo in the next couple of days for you guys to test 
Ow yeah and the maps arnt to complex so it should be pretty standard stuff. Now which cd did i put my old path finding stuff on...
-
Who needs pants?
Ok guys another couple of quick test's for ya. Im pretty sure they work fine but just to be sure ill post them for some tests.
The first test is pretty much the same thing as before accept the character cant walk in the opposite direction only if its the only possible direction.
Test 1
And the second one is the same thing accept the user doesnt click the arrows a new direction is randomly chosen at each new tile and work under the same rules of not beening able to go in the opposite direction accept if its the only option.
Test 2
Thanks in Advance
-
Senior Member
They both work perfectly for me. Nice job.
-
SaphuA
Yup the second test makes it a lot closer to looking like an actual CPU character 
A thing you could do to improve it, is to disallow him to make u-shaped movements (unless there's no other way offcourse). A sample of an u-shaped movement would be: up, right, down. This will make it look more realistic imho. So once he has moved up, and right, it should first check if he can walk up or right again before he check's if he can walk down, and all are not possible it'll move back left.
Last edited by SaphuA; 08-17-2005 at 06:44 AM.
-
Senior Member
If you wish to make it move more realistic then I have used this system:
*when you find new direction, also find random number of steps
*char will continue on same direction until he hits the wall in that direction or number of steps runs out
More steps you give, more char will move in straight lines. If you make steps=1 then you get same thing you have now.
-
Who needs pants?
Tonypa: Thanks tony i think i will do it that way. Because its starting to make me dizzy watching this dude walk in cricles 
Suphua: Yeah it would proabably be best if i make it not do uturns. Im trying to make its movement as realistic as possible. I have also made a heap of other actions besides walking that the character will do that i am throwing together at the moment.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|