I will update this thread as soon as I get some idea when using gideros.
First is about MovieClip
Keep an internal reference for an movie clip before it's completed and dereference it when completed. Two reasons for that: 1.We will not need to make a reference for a local movie clip and dereference it when it's completed just for preventing it from collectgarbage.
2. it become very Simple to add MovieClip.stopAll() if all the movie clips are referenced internally.
Second is about index position of child sprite
add function for modify the index position of child sprite, for example
Sprite:setIndex(index) --set the index position to index
Sprite:bringToTop() -- bring the sprite to the top of all children in its parent
Sprite:bringToBottom() -- bring the sprite to the bottom of all children in its parent
In some games,I may need to drag a sprite A and drop it on top of sprite B,but if the index of B is larger than A,currently I must remove A first then add A again to make sure A is on top of B.
Comments
Timer.delayedCall() return a handler for cancel it if needed.
https://sites.google.com/site/xraystudiogame
Add an export library option in the export project dialog.
Most all of time ,after export the whole project the first time and made some modification to the xcode project , I just check on the export assets only option in the export project dialog. However, the problem come out when gideros updated,most of my project still use the old libgideros.a.
https://sites.google.com/site/xraystudiogame
leaderboard as before, and the application is still running
https://sites.google.com/site/xraystudiogame
The black screen showed frequently, not only return from leaderboard but also return from any other custom full views.
Just pop up the leaderboard and leave it there, after a cup of tea and dismiss the leaderboard,the game view become black but the ad banner is still live.
here is the screencast
https://sites.google.com/site/xraystudiogame
Can you take a look at this black screen bug when you get some time.
https://sites.google.com/site/xraystudiogame
http://www.giderosmobile.com/forum/discussion/comment/9038#Comment_9038
I've just taken a look and it appears you can implement all three fairly easily. Just put the following in an extensions Lua file that is loaded by all your projects:
Likes: jack0088
Very nice,according to the documents
Sprites can have only one parent. Therefore if you add a child object that already has a different sprite as a parent, the sprite is removed from the child list of the other sprite and then added to this sprite.
Maybe even if you add the child object to the same parent,the child is removed from the parent first then add to the same parent again
https://sites.google.com/site/xraystudiogame
One more idea:
After exporting the project,the first thing you have to do is makeing different size of icons to the project.
Currently,I have more than 10 games,and I did some modification to the exported projects. So when I need to update the whole project(not only the asset),it's very time consuming, and I plan to modify the template project before export. However the icon can not be added aumatically. I think it would be nice to add a Icon.png(maybe 512 *512) to the gideros project and when export the project for ios or android, it was converted to Icon.png ,Icon-72.png, Icon@2x and so on for the exported project.
Likes: ar2rsawseen
https://sites.google.com/site/xraystudiogame
https://sites.google.com/site/xraystudiogame
In my test,it may be collected before or after it completed,so I must make a reference to it myself.
https://sites.google.com/site/xraystudiogame
But this is not the case for Timer and UrlLoader objects. If a Timer or a UrlLoader object is already running, it's not collected.
so using Timer.pauseAll() will not make any unaccessible Timer objects eligible for GC? we must use Timer.stopAll()?
http://www.nightspade.com
local mc = MovieClip(....)
mc:addEventListener(Event.COMPLETE, my_func)
So I always make a reference to mc somewhere else,is it necessary?
https://sites.google.com/site/xraystudiogame
But
https://sites.google.com/site/xraystudiogame
https://sites.google.com/site/xraystudiogame
You should add the MovieClip object to the stage, not the sprites that MovieClip object is made of.
I always check a pause flag in each ENTER_FRAME handler.
https://sites.google.com/site/xraystudiogame
local sprite = Sprite.new()
local mc = MovieClip.new{
{1, 100, sprite, {x = {0, 200, "linear"}}}
}
stage:addChild(mc)
https://sites.google.com/site/xraystudiogame
My common situation, the sprite is always on the stage, and I need to make different animation to the sprite, so I just add the sprite to the stage not the MovieClip.
https://sites.google.com/site/xraystudiogame