@george18 Thank you for sharing!
I tested “3. loq_profiler - plugin that displays a graph of frame rate and memory usage”
but as I can see this plugin decreses my app frame rate about 15 - 20 fps on real device!
Do you have similar observation? [import]uid: 193524 topic_id: 34739 reply_id: 139141[/import]
Hey. Great you took the time to put this together.
Will bookmark this for sure! I agree storyboard is buggy and unnecessary complex… I still use director
most of the time!
Thanks. [import]uid: 13632 topic_id: 34739 reply_id: 139154[/import]
george18 -
you wrote that “Also, there’s either a Corona bug or SpriteHelper bug that causes entire spritesheets to not be garbage collected if animated sprites are loaded in a require()'d file and that file is not unrequire()'d.”
Can you tell us more about this? How, exactly, have you “unrequired” the module to get around this? I’m using SpriteHelper and LevelHelper and seem to have a huge memory leak whenever I instantiate objects when loading a LevelHelper level (which, in turn, uses SpriteHelper sprite sheets). [import]uid: 135391 topic_id: 34739 reply_id: 138753[/import]
george18 - also, if you could please explain some of your storyboard workarounds, that would be great. My overall HUGE problem using storyboard is that even if I “remove” scenes manually, the scene “module” still appears to exist in memory. All local variables declared in a scene are still kept in memory, even if most of the display objects are purged. These pile up as system memory leaks. I tried setting “self.view=nil” in my exitScene event but haven’t gotten that to work, either. So frustrating. [import]uid: 135391 topic_id: 34739 reply_id: 138754[/import]
george18: Any code / instructions related to your implementation of PushWoosh would be greatly appreciated! If you don’t want to post the code in this thread you can send them via email: simon at evilgenius dot com dot au
Thanks!
[import]uid: 12217 topic_id: 34739 reply_id: 138797[/import]
We use the following unrequire() method:
-- Extracted from SpriteLoq's open source API. Credit to Loqheart
function unrequire(m)
package.loaded[m] = nil
rawset(\_G, m, nil)
-- Search for the shared library handle in the registry and erase it
local registry = debug.getregistry()
local nMatches, mKey, mt = 0, nil, registry['\_LOADLIB']
for key, ud in pairs(registry) do
if type(key) == 'string' and type(ud) == 'userdata' and getmetatable(ud) == mt and string.find(key, "LOADLIB: .\*" .. m) then
nMatches = nMatches + 1
if nMatches \> 1 then
return false, "More than one possible key for module '" .. m .. "'. Can't decide which one to erase."
end
mKey = key
end
end
if mKey then
registry[mKey] = nil
end
return true
end
In exitScene we first remove all event listeners, then walk through all displayObjects we created in that scene and remove them, then set any references to loaded files to nil, then we call unreqiure() on those files.
I’m not sure which of the above steps are required due to the way we coded our game, which ones might be required due to bugs or quirks of storyboard, and which ones should just be done all the time either way. But doing them all seems to work pretty well for making sure everything gets cleaned up.
I’m not sure what to do if you’re having variables leak that are not displayObjects. Normally this doesn’t seem like it would be a big problem even if it was happening (All the local variables we work with are tiny). But maybe your app is different. I suppose you can try putting all of them into a table and then in exitScene make sure all references to the table are nil then set the table to nil.
Sure! Just sent you an email with the code. [import]uid: 135827 topic_id: 34739 reply_id: 138873[/import]
Im curious what game mechanics from Go Ninja were used in Shaqdown. Because it feels like the a reskinned game with Shaq instead of a NInja. Was this used to save time? Were you able to build upon your original game mechanics? [import]uid: 75779 topic_id: 34739 reply_id: 138993[/import]
@rmckee282002
Gameplay wise they are a bit similar. Both of them are side scrollers that have generally stationary enemies, both have cutscenes, and so on. This was actually something that OneSpear (our publisher) requested when they first approached us. GoNinja was very successful, so we didn’t see a need to stray too much from the ideas we had when building it.
That said, there’s a huge number of differences too. ShaqDown built from scratch, and has a lot more depth and detail than GoNinja. In ShaqDown there are many more ways to kill each enemies, and there’s a unique boss at the end of each stage with specific weaknesses. Enemies are also spawned in special patterns instead of randomly like in GoNinja. If you play one game after the other you might see just how different the two feel. [import]uid: 135827 topic_id: 34739 reply_id: 139106[/import]
george18 - Thank you for sharing such insight on your team’s development efforts, it’s helpful.
Storyboard has been buggy for myself as well so I’m especially interested in the insight you’ve shared on that. I’ve had to abandon a project I’ve put months of work into because I’m exasperated with unexplained Storyboard bugs.
Corona Labs, can we make Storyboard a priority for getting sorted out? I consider that type of functionality fundamental to nearly any developer’s efforts. [import]uid: 105707 topic_id: 34739 reply_id: 139121[/import]
@george18 Thank you for sharing!
I tested “3. loq_profiler - plugin that displays a graph of frame rate and memory usage”
but as I can see this plugin decreses my app frame rate about 15 - 20 fps on real device!
Do you have similar observation? [import]uid: 193524 topic_id: 34739 reply_id: 139141[/import]
Hey. Great you took the time to put this together.
Will bookmark this for sure! I agree storyboard is buggy and unnecessary complex… I still use director
most of the time!
Thanks. [import]uid: 13632 topic_id: 34739 reply_id: 139154[/import]
george18: sorry for the late reply, but I never actually got your email regarding PushWoosh. Could you try re-sending it, or alternatively, send it to my other email address: simon (at) burford (dot) me? Thanks again! [import]uid: 12217 topic_id: 34739 reply_id: 140162[/import]
george18: sorry for the late reply, but I never actually got your email regarding PushWoosh. Could you try re-sending it, or alternatively, send it to my other email address: simon (at) burford (dot) me? Thanks again! [import]uid: 12217 topic_id: 34739 reply_id: 140162[/import]
Hello, it’s been a while since you wrote this but I am also heavily using Spriteloq in my game. I tried the unrequire function you posted but I just get errors when I try to use it. Is there a newer version?
Hello, it’s been a while since you wrote this but I am also heavily using Spriteloq in my game. I tried the unrequire function you posted but I just get errors when I try to use it. Is there a newer version?