Frighteningly large memory numbers ( will pay for code review )

Hi,

I am developing a game for a company in Hong Kong. My working visa pretty much depends on this job, so getting the game done right is pretty darn important to me :slight_smile:

I am experiencing some bad memory leaks and generally pretty high usage (like 583.0146484375) when building the levels and switching between scenes. I am using director class for the scene switching.

The levels are created by looping through an array of numbers and then translating them into display objects. They are then placed in a display group.

I place all my display groups (for the level structure, the HUD and the background) into director’s localGroup, but it doesn’t seem to do much good, hence the memory leaks.

I have a lot of experience programming, but it’s admittedly my first time using Corona SDK. What I am looking for is essentially a code review, and I am willing to pay for it. The code is clean and easy to read.

Please contact me if you are interested in helping me out :slight_smile: [import]uid: 117153 topic_id: 22338 reply_id: 322338[/import]

it would be easier for any one to contact you if you had any contact details on this post. [import]uid: 3826 topic_id: 22338 reply_id: 89022[/import]

Those numbers don’t sound too ridiculous to me, but of course every case is different and the most important question is whether those numbers are constantly going up every time you load a new level.

Ansca offers Corona Code Reviews, and I’d imagine that if I had a mission critical question like yours then I’d feel most comfortable having them do the review.

http://www.anscamobile.com/corona/support/ (See: Premium Support) [import]uid: 14598 topic_id: 22338 reply_id: 89031[/import]

please contact me at everykidsapps {at } gmail , i’m in hong kong maybe can helping you. money is not most important, buy me a coffee at pacific coffee is okay! [import]uid: 22631 topic_id: 22338 reply_id: 89037[/import]

Hi Raymond,

Thanks a lot mate, I’ll send you an email. [import]uid: 117153 topic_id: 22338 reply_id: 89563[/import]

Roughly how many textures are you displaying in a single scene? I was running into huge memory problems because I was loading in around 80+ textures into a scene using the display.newImageRect() function. I was able to bring my texture memory down from 100+MB to 24MB by using texture atlases in conjunction with the spritesheet API. [import]uid: 82003 topic_id: 22338 reply_id: 89564[/import]

@bdjones: I am loading quite a few textures… Like 48x48 tiles sometimes. I tried using tile sheets, as you said, but the memory usage got even worse. Maybe I was doing it wrong, could I convince you to submit some pseudo code of how you used it? [import]uid: 117153 topic_id: 22338 reply_id: 89575[/import]

The texture memory levels are actually very low, like down to 6.5. It’s the system memory that goes up once I load bigger levels. [import]uid: 117153 topic_id: 22338 reply_id: 89764[/import]