Mire Engine


Replying to PathFinding

  • Create account

    • Nickname:
  • Enter your Post

    •              
           
       
      FFUpload  Huppy Pick colour  HTML Editor  Help
      .
    •      
       
      File Attachments    Clickable Smilies    Show All
      .
  • Clickable Smilies

    • :huh:^_^:o:;):P:D:lol::B)::rolleyes:-_-<_<:)
      :wub::angry::(:unsure::wacko::blink::ph34r::alienff::cry::sick::shifty::woot:
      <3:XD:*_*:];P:XP:(:=)X):D:>.<>_<
      =_=:|:?3_3:p:;_;^U^*^^*:=/::*::b::f:
      :it::en:          
  • File Attachments

    • ForumFree Hosting   jpg gif png zip ...

      Descr.:
      Image Hosting: host it!

  •   

Last 10 Posts [ In reverse order ]

  1. Posted 10/9/2018, 16:16
    A new Algorithm of pathfinding are in programming.
    In this case, the algorithm it's similare work of editor logic.

    For example a grid movement algorithm

    math-20180907.png.0da6a742359022264b7bed1d3e6d41b8

    a = Number of block
    n = Index
    X = Size of block

    in parallel cycle in separate thread.

    a very small test of working

    CODICE
    if (StartPoint.X > EndPoint.X)
               {
                   Vector2 newPos = new Vector2(StartPoint.X, StartPoint.Y);

                   var c = m.GlobalMap.Where(x => (x.vector2.X == StartPoint.X - 32) && (x.vector2.Y == StartPoint.Y)).FirstOrDefault();

                   if (c.type == Map.TypeAction.Walkable)
                   {
                       StartPoint = c.vector2;
                   }
                   else
                   {
                       c = m.GlobalMap.Where(x => (x.vector2.X == StartPoint.X) && (x.vector2.Y == StartPoint.Y - 32)).FirstOrDefault();
                       if (c.type == Map.TypeAction.Walkable)
                       {
                           StartPoint = c.vector2;
                       }
                   }
               }


    Actually code are in development but there is a good percentage of success :)
    I hope to be able to finish this plug-in as soon.
    Stay connected for more news.

Review the complete topic (launches new window)