Code critique

As a first step toward gaming fame and fortune I decided to have a go at writing a tile mapper. I know I’m probably re-inventing the wheel here but it was something I planned to use and I thought it would be a good way of learning Lua and Corona and its coordinate system.

As it turned out I got a little bit more involved in it than I intended and before I proceed any further I thought it might be a good time to get some feedback on what I’ve written so far. I don’t think I’m fully grasping the concepts of Lua programming so I’d be grateful for advice on ways to improve that, whilst also keeping portability in mind.

The tile mapper itself isn’t particlarly robust, flexible or re-usable currently and there are bugs and issues, scaling in particular is rather broken. I need to decide if it’s worth investing more time in making it more robust ( does Corona really need another tile mapper :), or put more focus into other aspects of game creation.

All comments welcome.

There are a few tile mapper available including a couple that are open source (and to which you can add functionality if you want to).

I would use this one:

https://github.com/ponywolf/ponytiled

Thanks agramonte. I was aware of that one and others. Being new to Lua and Corona I thought the best way was to dive in and learn how to do things myself. Switching to a tried and tested mapper is always an option for the future.

Mapper aside, is there any advice you can give on the code that would serve me well in the future?

No takers? I’ll carry on in the same vein then and shout if I need any help.

Its like a lot of code spread across so many files. Code reviews are a lot of work and ppl dont prolly have the time to go through so much as it costs them their free time and they get nothing in return

I wouldn’t expect anyone to go into too much detail, just have a look over the code to see if there’s anything that stands out that could or should be done differently. If I find something that works I’ll more than likely run with it and miss the fact that it may not be the best approach.

There are a few tile mapper available including a couple that are open source (and to which you can add functionality if you want to).

I would use this one:

https://github.com/ponywolf/ponytiled

Thanks agramonte. I was aware of that one and others. Being new to Lua and Corona I thought the best way was to dive in and learn how to do things myself. Switching to a tried and tested mapper is always an option for the future.

Mapper aside, is there any advice you can give on the code that would serve me well in the future?

No takers? I’ll carry on in the same vein then and shout if I need any help.

Its like a lot of code spread across so many files. Code reviews are a lot of work and ppl dont prolly have the time to go through so much as it costs them their free time and they get nothing in return

I wouldn’t expect anyone to go into too much detail, just have a look over the code to see if there’s anything that stands out that could or should be done differently. If I find something that works I’ll more than likely run with it and miss the fact that it may not be the best approach.