Chinaunix首页 | 论坛 | 博客
  • 博客访问: 6042685
  • 博文数量: 2759
  • 博客积分: 1021
  • 博客等级: 中士
  • 技术积分: 4091
  • 用 户 组: 普通用户
  • 注册时间: 2012-03-11 14:14
文章分类

全部博文(2759)

文章存档

2019年(1)

2017年(84)

2016年(196)

2015年(204)

2014年(636)

2013年(1176)

2012年(463)

分类: Python/Ruby

2016-09-29 03:26:53

原文地址:python 解析txm 瓦片文件库 作者:yueming

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.

节选自

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