News Forums RAIN Sample Projects, How To, and Code Using Waypoint routes and paths!

This topic contains 27 replies, has 6 voices, and was last updated by  kabali2413 4 months, 2 weeks ago.

Viewing 13 posts - 16 through 28 (of 28 total)
  • Author
    Posts
  • #10853

    redhawk
    Participant

    This might be better. Here’s a quick demo of the end result

    #10855

    CodersExpo
    Participant

    Looking good redhawk! Fun stuff am I right.

    If I may make one small suggestion, when I was working with the RAIN Perception’s line of sight property on the visual sensor, I found it feels better when I combine the audio sensor too. This way if you’re close to the character, but not in his line of sight, he will still come at you because he can hear you. You’re just to close for him not to realize that..you know what I mean.

    I did scale the radius of the audio sensor from completely going around to his back side. This allows you a chance to sneak up on him…you might even try sensing the audio volume or clip being used. So the character really has to move slow and quite up behind him. Just an observation I had and thought I would share.

    Hey where do you get your environment assets? Looks great! Are you doing a proof of concept or is this a project your working on? I would love to play it when your done I think it would also be great to continue seeing videos on your progress through this project and your implementation of RAIN and all the other gaming tools for that matter. Cool

    #10856

    redhawk
    Participant

    I bought Terrain Composer a while back and created this island using that package. I’m mainly testing what all I can do since in the past I had issues using terrains, but all the updates to RAIN have made this easy. Basically I took your BT, made the edits I suggested, created a huge navmesh (way too big), created the waypoint pieces your BT looks for, and that’s it. Therefore I did not modify any of your sensors and did not add an audio sensor. In the end, this is all just testing to see what I can do and can’t do. It helps me having somewhat realistic environments to test stuff so that I can see where the hangups are. I don’t really want to share my island, otherwise people will use it in there game (they should just buy Terrain Composer).

    I’m not 100% sure where I’m going with this project. I’m working through all the technical pieces (this RAIN was a huge piece) which has taken probably a year to learn and understand. I think I have all my technical pieces working (except ladders, jumping over gaps, reacting to getting hit, alerting others). Most likely I will make a small map and throw in some zombies, set up some NGUI, and put up a free to play game.

    #10857

    redhawk
    Participant

    Speaking of which, where is a good place to put up a game to play?

    #10867

    CodersExpo
    Participant
    #11068

    yardGamer
    Participant

    I have a question about the sample for Waypoint Networks on the wiki located here: http://www.rivaltheory.com/wiki/doku.php?id=environment:waypointcollections:network

    As shown, it appears that a new wander target would be chosen every frame since there is no constraint on the Choose Wander Target custom action. When I implement the sample as given this is exactly what happens. Am I missing something or is this a known issue?

    Thanks

    #11103

    CodersExpo
    Participant

    Not sure I understand what issue you might be running in to. Let’s see…a new random location is defined, but only after the AI has moved to the previous ‘Move To Target’ position. Once that node returns success the custom action is called to define a new move location. This ‘Move To Target’ variable is used in conjunction with the ‘Path Target’ variable. The AI will use the path target as the baseline goal and the move variable as an incremental goal. This way he knows where he wants to go, from one node to the next, but the way he gets there is augmented by the random scripted move variable.

    There are other ways to maybe create the random behavior so the AI appears to wander in a more logical fashion I suppose. I was toying around with using the last known location of the target and the targets trajectory (which way he was headed) to create a range that would encourage my AI to start wandering (searching) in the direction and general proximity of where he last detected the target. This seems to give me a more believable behavior. I hope to post something soon…so much to do.

    Please let me know if any of this makes sense or if I am missing your point. I’m trying to learn all this stuff too Thanks

    #11105

    CodersExpo
    Participant

    I think I understand now. Looks like the AI is moving to a random location defined by the custom script. In fact, you can delete the waypoint node and he still moves. He does not appear to use the waypoint network path. I’ll have a look at this and see if I missed something. Thanks

    #11107

    CodersExpo
    Participant

    So I made a mistake and will get the project updated as well as the wiki. The variable value assigned in the Custom Action script is what you want to enter in the Waypoint navigation field ‘Path Target’. Then create a Move Target variable and make sure your move node is using that. My bad.

    #11111

    CodersExpo
    Participant

    I have updated the wiki and the project. I’ll also make sure the video tutorial is correct. Here is the new download package http://rivaltheory.com/?ddownload=10151

    Thank you so much for pointing out the error.!!! please let me know if you find anything else or if you would like to see something else.

    #11250

    yardGamer
    Participant

    @CodersExpo this wasn’t the issue I was talking about, but after further investigation, what I thought was a problem was a misunderstanding. I thought a constaint was needed to prevent the Choose Waypoint custom node from running every frame an creating a different target location, but I see now that the waypointpath node remaining in “Running” state until it reaches the target, prevents the Choose Waypoint node from executing again until the waypointpath node returns “Sucess”.

    My bad. Im glad you found a different error tho.

    On a related note, I find that Unity is quite crashy when I have AI navigating a Waypoint Networks. Many times Unity will show the pinwheel of death( I’m on a Mac). Is this a known issue?

    #11258

    CodersExpo
    Participant

    Wow! I knocked two birds out with one stone Cool. Let me know if you encounter any other issues with these videos.

    I have seen Unity with MonoDevelop IDE open crash/lock up often. Mostly when I try to debug in MonoDevelop. Not sure if there is an incompatibility issue with the upgraded version of MonoDevelop in Unity 4.3. I also have the UnityVS plugin and get crashes and MonoDevelop is not even open. It does not always happen right away but eventually does. So, perhaps a memory leak issue…not sure really.

    I haven’t had any issues with just Unity running with or without RAIN running. If you continue to encounter this, I would suggest reaching out via email to Jester so he can look into it.

    #40511

    kabali2413
    Participant

    hey mannn!!! i cant download the unitypackage as told in “building an fps game with unity”
    i reffered to it and got that when i entered the url, i was redirected automatically to a page
    which read virtual life and couldnt find out how to download ur file. pls tell me and reply me too
    also man pls tell me on my mail kanishk2413mewal@gmail.com

Viewing 13 posts - 16 through 28 (of 28 total)

You must be logged in to reply to this topic.