Hi
I just completed my first game with Corona and it was a fun experience. However it is seriously lacking the ability to manipulate texture memory. It is the reason Lime and tile based games have slow performance.
I couldn’t see it on the roadmap so I would like to suggest it. The functionality is straightforward. I imagine an interface like this:
-
newTexture(width, height) - this creates a blank image in texture memory, and returns a texture id
-
texture:newImage(“image.png”, x_pos, y_pos) - this loads an image file in to the texture memory at the coordinates provided
Why this is so important
Consider a platform made of 20 identical blocks. Each block is a separate image, stored in a display group. That’s 20 images. I know from experience that for a typical platformer type of game, around 70 tiles will slow down performance significantly (with parallax scrolling, animated sprites and game text as well).
With the interface suggested above you can instead copy those 20 blocks to texture memory temporarily, and have a single image. This is 20x as fast as the GPU & Corona work with one set of coordinates instead of 20. Then you can remove it after you have used it. With a dynamic loading system the programmer can design a tile engine that works super fast.
For my just released game, I was able to boost my performance from <30fps to 60fps by using rectangular strips of tiles to decrease object count. It meant there were less objects on screen. Ideally, these strips could have been automatically generate during the loading phase of the game, but Corona does not have this interface.
My next game is more complicated and the rectangular strips solution won’t work.
I can honestly say that not having this feature will force me to use an alternative SDK for my next game (believe me I don’t want to!). Corona is great for some styles of games (“Cut the Rope”) but I urge you not to neglect action games which are also really popular on the iphone too. I really enjoy using Corona so I hope that this feature can be included in the roadmap…
Otherwise, great work so far Corona team! [import]uid: 107380 topic_id: 22247 reply_id: 322247[/import]