Page 2 of 6 FirstFirst 1234 ... LastLast
Results 11 to 20 of 57

Thread: AI for hovercraft

  1. #11

    Re: AI for hovercraft

    HI all,

    @ Petr the Demo works very well, idea of waypoints sounds good for me i will check it.

    @ Michael i agree with you we can study an algorithm that assign to the AI different actions at the situation

    if there is a team for study communications i subscribe into it ;D
    LapTop Pc: 2GHz Intel Core 2 Duo T7200 • 2GB 533MHz DDR2 RAM • 160GB hard disk • 512MB ATi Mobility Radeon X1600 graphics • Win Vista SP1<br />Desktop Pc: 1.6GHz Intel Core 2&nbsp; • 2GB DDR2 RAM •&nbsp; 1024MB Nvidia GeForce 8800 GT • WinXp&nbsp; SP3

  2. #12
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732

    Re: AI for hovercraft

    guys, I think you should work on your communication skills too!
    ;D, ok shall we call it hovercraft, no aliases allowed ?

    @Lionheart, nice models, but we need ... hover craft. I am sorry if I did not put it correctly, I know my demo could make impression we are doing car race game.

    Hovercraft is mean of transport levitating in the air thanks to various mechanisms - magnetic field / strooong jets directed down / other. So it usually does not have any wheels.

    Example of hovercraft from Star Wars: Landspeeder


    Petr
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

  3. #13
    Senior Member Lionheart008's Avatar
    Join Date
    Sep 2008
    Location
    Germany, Bad Sooden-Allendorf
    Age
    51
    Posts
    934
    Rep Power
    109

    Re: AI for hovercraft

    good morning, dear guys

    dear petr, michael, simone...
    - yes, of course, that was my mistake... but I have worked with this idea only for a dummy example to see more, but that doesn't matter... I was too tired to see the problem... discussions and good communication are very welcome... also for me

    - yes

    If you have time for next ships I will be only happy
    I design some hovercraft objects need only time...

    QT again (sorry):
    => What size does this hovercraft object files have? It's ok if they are needs per object about 580-600 kbyte??? Michael told me some days ago, cannot find the post...

    - the construction of models isn't the problem, only the 'details' and polygon amount increase, so I must find my best golden way in the middle of the road

    Hovercraft is mean of transport levitating in the air thanks to various mechanisms - magnetic field / strooong jets directed down / other. So it usually does not have any wheels.
    oh yes, I have seen some hovercrafts in real life e.g. at bodensee, east sea, england, spain (barcelona)... and more... I like this noisy racing ships...

    nice day, more will come, I am sure...

    ps: take the little 'three cars' and take them into the garage for poor times without fuel and oil

    lionheart
    you can't always get what you want, but if you try sometimes you might find, you get what you need

  4. #14
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732

    Re: AI for hovercraft

    Hi Lionhead,

    I will spawn new thread to not go offtopic, ok ?


    Petr
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

  5. #15
    thinBasic author ErosOlmi's Avatar
    Join Date
    Sep 2004
    Location
    Milan - Italy
    Age
    57
    Posts
    8,777
    Rep Power
    10

    Re: AI for hovercraft

    Petr,

    nice nice job. Looking the 3 triangles is like sitting in front of fire: you get hypnotized !

    I played a little with parameters and seems there are some point where hovercraft goes into a loop.
    For example in %eHovercraftPrecise the following parameters create a loop after the first round
    [code=thinbasic]
    .minSpeed = 5
    .maxSpeed = 100
    .steerFactor = 3
    [/code]

    Again, very clever code, a pleasure to experiment t with.

    Eros
    www.thinbasic.com | www.thinbasic.com/community/ | help.thinbasic.com
    Windows 10 Pro for Workstations 64bit - 32 GB - Intel(R) Xeon(R) W-10855M CPU @ 2.80GHz - NVIDIA Quadro RTX 3000

  6. #16
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732

    Re: AI for hovercraft

    Hi Eros,

    you are right, but it is more thing of parameter tuning than bug, let me explain :P

    min/max speed are clear. The angle is ability to turn fast ( higher number, higher ability ).
    But if you let the tolerance ( radius around point which is considered enough to go through instead of exactly passing point ) on such a low number, the hovercraft could not finish the race, because it was not possible to get near enough ( at distance 1m ).

    Just try your setting, with tolerance raised to 2.

    But you are right, hovercrafts should not be stuck for so long ( infinitely ) on one place.
    Solutions are two - design tracks in way it will not make such a problems , or just detect how long does it take to hovercraft to reach waypoint. In case it is too long, it will temporarily raise tolerance for example.

    I will work on it.


    Thanks,
    Petr
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

  7. #17

    Re: AI for hovercraft

    Hi Petr,

    here is an idea about how the AI and also the player vessel can auto react on a track, maybe even without any waypoints used.

    For this we need the ability to cast rays from the vessel in a direction and get back the distance to a model. Here are some pictures that show you which rays (the red things) I mean. The front ray could detect if the vessel runs into something and so change its heading. The side rays would check if something comes from the side like the track walls or opponents. The bottom rays would be used to check for the banking and the slope of a track. Also the front side rays could detect which direction a track is turning to.

    What do you think?

    Michael
    Attached Images Attached Images

  8. #18
    Super Moderator Petr Schreiber's Avatar
    Join Date
    Aug 2005
    Location
    Brno - Czech Republic
    Posts
    7,128
    Rep Power
    732

    Re: AI for hovercraft

    Hi,

    9 rays for model, that sounds good.
    It will be interesting to come up with AI based on sensors.

    But it would still need to know some target point I think - imagine the hovercraft will be turned 180° in crash, then it can go back the road by accident .

    I will try to code out fast ray-triangle code, I have something in the works, just need more time.

    As entity system allows to track global point position of point located on arbitrary rotated model, I was thinking of some testing volumes as well ( is point in box ... ). But the ray way is more flexible and needs no postprocessing of models ( like defining bounding volumes for track ). Will see how fast can I make it


    Petr
    Learn 3D graphics with ThinBASIC, learn TBGL!
    Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB

  9. #19
    thinBasic MVPs kryton9's Avatar
    Join Date
    Nov 2006
    Location
    Naples, Florida & Duluth, Georgia
    Age
    67
    Posts
    3,869
    Rep Power
    404

    Re: AI for hovercraft

    The limited times I have had the pleasure of using collision detection in DarkBasicPro, the ray cast solutions seemed to work the best.
    Acer Notebook: Win 10 Home 64 Bit, Core i7-4702MQ @ 2.2Ghz, 12 GB RAM, nVidia GTX 760M and Intel HD 4600
    Raspberry Pi 3: Raspbian OS use for Home Samba Server and Test HTTP Server

  10. #20

    Re: AI for hovercraft

    Quote Originally Posted by Petr Schreiber

    But it would still need to know some target point I think - imagine the hovercraft will be turned 180° in crash, then it can go back the road by accident .

    I will try to code out fast ray-triangle code, I have something in the works, just need more time.
    Maybe once it turns upsite down, you can set a state where the body will be handled differently. Also remember, that we have mostly quads, so I hope the ray casting works with quads too.

Page 2 of 6 FirstFirst 1234 ... LastLast

Similar Threads

  1. M15 Hovercraft with jet engine
    By Michael Hartlef in forum Resources
    Replies: 3
    Last Post: 19-04-2008, 01:11

Members who have read this thread: 1

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •