Giter Club home page Giter Club logo

cocos2dx-astarusingtilemap's Introduction

Cocos2dx-TileMapPlusAStar

cocos2dx 3.0 beta2 tileMap And A Star

read tileMap info by "tmx" file and create map data. User A-star to create path which used by sprite to walk to a certain position

demo shows

1、Sprite find path automatically.

2、touch an available place and sprite walk to target position.

3、move the map and auto fix position

传入地图创建MapInfo

tmx文件读取完相关信息后即释放

tmx文件暂时是写死读取的格式,

layer用background字段,object用object字段,object里面的精灵用objectid标记类型,类型的枚举见MapGeneral.h

通过传入开始和结束ID获得路径

1、第一次开始寻路算法,生成路径后将路径与相反路径保存下来,以后直接调用;

2、暂时只设计了MapInfoType::Block是不可走

cocos2dx-astarusingtilemap's People

Contributors

mengmiaopasi avatar chenquanjun avatar

Stargazers

Manistein avatar  avatar

Watchers

 avatar James Cloos avatar  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.