If so, please share, because then I won't have to write my own level editor.
For Tiled, yes. It's fairly easy if you use some kind of xml parsing library, see class
Please note this project is pretty old, i.e. not ideal in terms of my ruby skills :)
Are you Polish by any chance? Me too! Anyway, I never understood how to use XML libraries, from my experience none provided some interface like ini files, with path/to/node. I.e. so for this xml (let's ignore the fact it is malformed for clarity sake):
<model name="XTreemeR" />
following code would show
puts WhateverXML.getvalue("xml/car","make") #path/to/node, attribute
puts WhateverXML.getvalue("xml/car/model","name") #path/to/node, attribute
Anyway, thanks. I'll try to put some optimizations if performance will be an issue.
I happen to be Polish, yes.
Can't relate to your issues with xml, I used trial and error driven development for my purposes.
Yeah, trial&error is good, but very slow.
There's a gem for Ruby called "retmx". Will make your life easier if you are using Tiled maps.
Thanks! Will check it out!
The gem that is still maintained is the 'tmx' gem. It also supports the JSON Tiled format.
I've tried it. But I prefer the other one. Can't remember why, perhaps I see retmx more object oriented.
Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill