Git Product home page Git Product logo

ameisennavigation's Introduction

AmeisenNavigation

Navigation Tcp-Server for my WoW-Bot based on the TrinityCore MMAP's and Recast & Detour

How to

  1. Clone this repository
git clone https://github.com/Jnnshschl/AmeisenNavigation.git
  1. Make sure you got the MMAP's somewhere (you just need the mmaps, no map or vmap shizzle)
  2. Open the .sln file in Visual Studio
  3. Compile & start it...

Now there should be a TCP server running on the port you specified (default: 47110).

To generate a path you need to send a serialized PathRequest to this server:

struct PathRequest
{
    public Vector3 A { get; set; } // Starting position
    public Vector3 B { get; set; } // Target position
    public int MapId { get; set; } // your current MapId (Eastern Kingdoms = 0, Kalimdor = 1, ...)

    public PathRequest(Vector3 a, Vector3 b, int mapId)
    {
        A = a;
        B = b;
        MapId = mapId;
    }
}

public struct Vector3
{
    public float X { get; set; }
    public float Y { get; set; }
    public float Z { get; set; }

    public Vector3(float x, float y, float z)
    {
        X = x;
        Y = y;
        Z = z;
    }
}

Serialize this struct with a serializer, for example Newtonsoft Json:

JsonConvert.SerializeObject(stringToSend);

Send it using the C# TcpClient Class as an ASCII string.

After you sent the request you will get the path as a serialized List of Vector3's.

Deserialize this Json with a deserializer, for example Newtonsoft Json:

JsonConvert.DeserializeObject<List<Vector3>>(receivedString);

How to get these MMAP's

Either generate them yourself using the generator from TrinityCore

https://github.com/TrinityCore/TrinityCore

or use the ones supplied in this repack, go check it out it's great

AC-Web Ultimate Repack 3.3.5a

Additional Information

⚠️If its the first request on the MapId, the server first has to load the mmaps for that continent, which can take some time based on your hardware!

If you want to, you can preload specific mmaps on startup, to do that add the following line into the AmeisenNavigation.Wrapper.h

AmeisenNav(String^ mmap_dir) 
{ 
    ameisen_nav = new AmeisenNavigation(std::string(string_to_char_array(mmap_dir)));
    ameisen_nav->LoadMmapsForContinent(0); // this will preload Eastern Kingdoms
}

Credits

❤️ TrinityCore for their MMAP format - https://github.com/TrinityCore/TrinityCore

❤️ Recast & Detour - https://github.com/recastnavigation/recastnavigation

ameisennavigation's People

Contributors

jnnshschl avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.