Our newest release ClickFish is now live on Google Play!
Description: ClickFish, how fast are you?
In this touch-based game, see how many fish you can catch in a row and build up insanely large combo-points. Kids can enjoy fishing too with cute colorful graphics and fun music. Select your favorite color of fish and get started!
Endless mode coming soon! (Sort of stress free bubble-wrap style fish clicking)
Try it FREE at:
https://play.google.com/store/apps/details?id=com.thumbhurt.clickfish
Comments
#MakeABetterGame! "Never give up, Never NEVER give up!" - Winston Churchill
Website: http://www.castlegateinteractive.com
https://play.google.com/store/apps/developer?id=Castlegate+Interactive
#MakeABetterGame! "Never give up, Never NEVER give up!" - Winston Churchill
But I agree, sounds like a memory leak
one question about memory leaks.. how do you know that they exist and how do you debug them normally?
i'm a few weeks into completing my first gideros app!
@mysps - in case's like the above (if it is a memory leak), then you'll notice things like your game slowing down or periodic lag in your gameplay when the garbage collector kicks in and try's to sort things out.
Memory leaks are often caused by not releasing all of the references to an object (often from within a different object) so that the garbage collector can't then free up memory as it believes something's still using it.
You can check by making repeated calls at strategic points (often at the point you move from scene to scene) to collectgarbage("count") and displaying the value returned - this will give you an indication of how much memory your using and ideally should be the same when you exit a scene as when you entered it.
As a general rule of thumb (especially with dynamic languages like lua) it's a good idea to do as much allocation as possible at the start of your app and then re-use objects rather than re-create them.
Debugging them can be quite hard, you have to keep an eye on what allocations you are doing and then make sure you remove all references when you've finished using them - the print() function and collectgarbage("count") are your friends here.
I know this probably sounds trite, but you have to be able to fully read and understand EXACTLY what your code is doing so that you can walk through the code by reading it and then looking for logic errors etc - again lot's of comments in your code is a good idea.
Again in the above example - the slowness issue *COULD* be caused by the game creating new fish with a command like fish = FishObject.new() then calling something like stage:addChild(fish), then when the fish moves off the right they *MIGHT* then just set fish = nil. At this point they've potentially lost the reference to fish and can't then easily remove it from the stage, so eventually all these lost fish are just sitting there off the screen consuming resources (they'll still need processing each frame to decide if they need drawing or not**) and slowing down the game (obviously I didn't write the app so I've no idea exactly what Teranth is doing here and this *might* be completely wrong - but it serves a point as an example).
** note : this is a common problem with frameworks that take a "retained" approach to rendering (where a list of each object to draw is retained by the framework) as opposed to the old-skool "direct" approach where remembering what to render is the responsibility of the programmer (the approach taken by Codea).
Hope this helps!
#MakeABetterGame! "Never give up, Never NEVER give up!" - Winston Churchill
The game will feature a Zen Mode--basically endless fish for stress relief clicking with no scoring, but I was looking into non-timer based ways to limit the current fish on screen. (On my testing phones, I have been having a few odd results with the timers, but it may actually be the memory leak causing it with this one. )
As well it may potentially cure my issue with the memory leak--I have had one other user mentioned that it was going sluggish on them but was unable to make my phone do it--no idea why exactly possibly my phone just has more memory/cpu and it would take too long I suppose?
@techdojo, again thank you very much for the information on collectgarbage("count"), I was trying to find a way to get currently running stats in my application for debugging purposes and will check into that one Gideros is awesome but accessing information about it's LUA VM is still a bit of a mystery to me--I will learn!
You have given me 2 good places to begin looking for the issue, since this is the first of my apps that makes a lot of use of inherited classes I will have to look over how I am accessing the 'self' object as I guess it can cause some issues when used from inside inherited classes
Anyway thanks for trying the game out guys and your great input, it's invaluable to me. I will dig around the code and see if I can't find the issue and fix it ASAP
P.S. Great puns by the way, sorry I "sunk the ship" here heh :P
Eli
New Version has been posted on Google Play as soon as they actually update their site (1 hour or so I would guess, but who knows)
The game will be getting an update in a few days introducing a Zen mode--endless clicking, and some new obstacles to a high-score glad you like it and thanks again for the feedback
@mysps, yeah @techdojo knows his stuff, very helpful and I would like to say thanks for your input as well you really have to love this forum great people, great software and a good time coding
also love the fish looks very cute.
#MakeABetterGame! "Never give up, Never NEVER give up!" - Winston Churchill
Lua has the capability to be a fantastic language to be really productive in, but it's got just a many "gotcha's" if your not 100% careful.
#MakeABetterGame! "Never give up, Never NEVER give up!" - Winston Churchill
Website: http://www.castlegateinteractive.com
https://play.google.com/store/apps/developer?id=Castlegate+Interactive
(It was actually the local variables in loops that messed me up last time I was looking, I had thought that they were local to the current cycle of the loop and thus throw away, but it appears they left a reference for a while anyway, lots of wasted memory.)
@Scouser , glad to hear it
Really have to love this forum!
Game has been updated again heh with the first of the new baddies.
Also be especially careful of closures which are an incredibly powerful feature if used right, but can seriously mess with your head (and your code) if you don't!
Likes: Teranth
#MakeABetterGame! "Never give up, Never NEVER give up!" - Winston Churchill
Website: http://www.castlegateinteractive.com
https://play.google.com/store/apps/developer?id=Castlegate+Interactive
Likes: phongtt
Watch out for Gnasher The Shark! He hates combos and will appear to try and stop skilled players! ClickFish v1.4 is now available!