Chinaunix首页 | 论坛 | 博客
  • 博客访问: 5006332
  • 博文数量: 921
  • 博客积分: 16037
  • 博客等级: 上将
  • 技术积分: 8469
  • 用 户 组: 普通用户
  • 注册时间: 2006-04-05 02:08
文章分类

全部博文(921)

文章存档

2020年(1)

2019年(3)

2018年(3)

2017年(6)

2016年(47)

2015年(72)

2014年(25)

2013年(72)

2012年(125)

2011年(182)

2010年(42)

2009年(14)

2008年(85)

2007年(89)

2006年(155)

分类: Python/Ruby

2016-09-04 13:57:12

parse tmx(tile map xml) file

跟twisted没必然关系,只是最近在制作一个小手游来练习twisted框架使用,而这个游戏有用到瓦片地图;client端2dx自带tmx地图的解析和加载,server端需要自己实现。

tmx format:  

tmxlib(PyPI):  (If you’re looking to use maps in a game, chances are tmxlib won’t help you much. Try pytmxloader, PyTMX, or one of the other projects listed on the Tiled wiki.) 

PyTMX:  (installation requires pygame) 

pytmxloader:  (installation requires pygame) 

我选用的是tmxlib,原因是两外两个需要pygame. 虽然tmxlib的文档中有推荐在游戏中使用另两个库,但是我觉得它的意思是client端,而不是server.

节选自

阅读(18029) | 评论(0) | 转发(1) |
给主人留下些什么吧!~~