For 1) Gideros should allow Sprites that are no longer reachable from lua nor on stage to be GC'ed. I am not sure about listeners though
Thx! I guess I'll have to test garbage collection with and without different listeners and tweens that may cause memory leaks.
> Newcomers roadmap: from where to start learning Gideros "What one programmer can do in one month, two programmers can do in two months." - Fred Brooks “The more you do coding stuff, the better you get at it.” - Aristotle (322 BC)
> Newcomers roadmap: from where to start learning Gideros "What one programmer can do in one month, two programmers can do in two months." - Fred Brooks “The more you do coding stuff, the better you get at it.” - Aristotle (322 BC)
Enabeling font filtering has the same impact on a font as enabling texture filtering on a texture, that is absolutely no impact on the CPU, but GPU has more work to do. I don't have any figures nor facts at hand, but I guess decent GPUs have dedicated hardware for texture filtering, so all that it costs is more reads in texture memory. This is so common that I suppose all GPU makers have optimized that case too (caches, pipeline, look ahead, etc).
> Newcomers roadmap: from where to start learning Gideros "What one programmer can do in one month, two programmers can do in two months." - Fred Brooks “The more you do coding stuff, the better you get at it.” - Aristotle (322 BC)
i have a quick question about Zerobrane studio. since i've moved to a new computer the 'outline window' is greyed out for me and so i cannot see it. do you know the reason? i've updated zbs to the most recent github version, but it's still greyed out. i need to fix this as this is one of the main reasons i use zbs.
UPDATE: i've found it as a tab next to the project window. it's a bit misleading that it's greyed out in this case. in any case at the end i've got it.
Guys, if I remember correctly, there was a small class for vertical scrolling content? What's its name? (I know there's big 'Layout' class, but I'd just go with small class)
> Newcomers roadmap: from where to start learning Gideros "What one programmer can do in one month, two programmers can do in two months." - Fred Brooks “The more you do coding stuff, the better you get at it.” - Aristotle (322 BC)
I guess yes! I've just checked it, I guess it's good. Thx! P. S. It seems to be grid-based. Maybe there's some other class to scroll just smoothly?
> Newcomers roadmap: from where to start learning Gideros "What one programmer can do in one month, two programmers can do in two months." - Fred Brooks “The more you do coding stuff, the better you get at it.” - Aristotle (322 BC)
Its not a question, and definitely not worth for a separated thread, so i decided to post it here I was playing around with noises (perlin and simplex), and they uses math.floor() 3 times per noise function call, and folowing this page, i also tried to make a fastfloor function) And i found a couple ways:
function fastfloor1(value)return(value*2)//2endfunction fastfloor2(value)return value <<0endfunction fastfloor3(value)return value >>0endfunction fastfloor3(value)return value |0end
Here is profiler code:
max@100000
calls@10
local randomSeed,random,floor=Core.randomSeed,Core.random,math.floorlocalrad=math.rad
randomSeed(0,1)-- just in case the first call takes longerfunction test1()
randomSeed(0,1)for loop=1,maxdolocal v=random()*100000local floored = v >>0endend--function test2()
randomSeed(0,1)for loop=1,maxdolocal v=random()*100000local floored = v <<0endendfunction test3()
randomSeed(0,1)for loop=1,maxdolocal v=random()*100000local floored = v |0endendfunction test4()
randomSeed(0,1)for loop=1,maxdolocal v=random()*100000local floored =(v*2)//2endend--function test5()
randomSeed(0,1)for loop=1,maxdolocal v=random()*100000local floored =floor(v)endend--
Core.profilerReset()
Core.profilerStart()for loop=1,calls do
test1()
test2()
test3()
test4()
test5()end
Core.profilerStop()
result=Core.profilerReport()print("Number of tests:",max*calls)for k,v inpairs(result)dolocal found=falsefor k2,v2 inpairs(v)doif found and k2=="time"thenprint(v1,v2)endif k2=="name"andstring.sub(v2,1,4)=="test"then v1=v2 found=trueendend
end</pre>
And the results:
Number of tests: 1000000
test2 0.3579149000052
test3 0.41253449999931
test5 0.75688079999782
test4 0.44130270000278
test1 0.35352640000201
hell, after 2 days messing with scrollable classes my nerve cells are really annoyed I have to admit that coding interfaces is ugly as hell in gideros: monkey-coding at its best
I guess I should give 'Layout' class a try
> Newcomers roadmap: from where to start learning Gideros "What one programmer can do in one month, two programmers can do in two months." - Fred Brooks “The more you do coding stuff, the better you get at it.” - Aristotle (322 BC)
@Apollo14 , yes, what i hate most about (game) programming is doing the interface, especially if i want it to adapt to various screen sizes. but this issue is not that much gideros dependent i think, although a visual editor could help a lot. and yes, Layout class maybe helpful, i did not use it yet in any project.
@Apollo14 , yes, what i hate most about (game) programming is doing the interface, especially if i want it to adapt to various screen sizes. but this issue is not that much gideros dependent i think, although a visual editor could help a lot. and yes, Layout class maybe helpful, i did not use it yet in any project.
in my case event listeners from 'listview' and 'button' classes messed with each other, it got ugly (I use my customized button class)
> Newcomers roadmap: from where to start learning Gideros "What one programmer can do in one month, two programmers can do in two months." - Fred Brooks “The more you do coding stuff, the better you get at it.” - Aristotle (322 BC)
@oleg, well, if you look at the gui of my game ikonomikon you'd see that it's a bit different from what one usually needs. the same goes for my app fragmenter. also i do not make many apps/games, just a few that i work on a lot, thus so far i could not reuse my templates/snippets too much. but you are right, next time i do a gui, it will be way faster than the first time. in general what i find most annoying is to make the gui adapt to screen sizes from ratio almost 1:1 to almost 2:1. if you just put things in the middle of the screen and in corners, that's fine, but if you want to have kind of a frame and many buttons arranged inside, then there will be difficulties.
@Apollo14 , yes, what i hate most about (game) programming is doing the interface, especially if i want it to adapt to various screen sizes. but this issue is not that much gideros dependent i think, although a visual editor could help a lot. and yes, Layout class maybe helpful, i did not use it yet in any project.
in my case event listeners from 'listview' and 'button' classes messed with each other, it got ugly (I use my customized button class)
That is the reason I redesigned aceslider for my button class
@oleg, well, if you look at the gui of my game ikonomikon you'd see that it's a bit different from what one usually needs. the same goes for my app fragmenter. also i do not make many apps/games, just a few that i work on a lot, thus so far i could not reuse my templates/snippets too much. but you are right, next time i do a gui, it will be way faster than the first time. in general what i find most annoying is to make the gui adapt to screen sizes from ratio almost 1:1 to almost 2:1. if you just put things in the middle of the screen and in corners, that's fine, but if you want to have kind of a frame and many buttons arranged inside, then there will be difficulties.
Here's my 2: 1 screen adaptation option. I tie all the elements not to specific coordinates but to a percentage of the screen width.
I am making my own UI system with several widgets (List/Table,Tree,Scrollable pane, Checkbox,RadioButton,TextFields,Label,...). I used it for my last game and it saved me a lot of time. It adapts to screen dimensions automatically. It also support gestures, drag and drop, templates and factories, and a powerful layout builder from a table description.
I will release it as part of gideros soon, but I’ll need your help for the documentation!
@hgy29 It would be good if the Gideros GUI could be modified directly from the code
I like how it is done in defold: I can add a text box from the code to the properties panel and associate it with a variable in the game code. Then I can visually change the values of the variables through the properties panel
I will release it as part of gideros soon, but I’ll need your help for the documentation!
We'll help!
> Newcomers roadmap: from where to start learning Gideros "What one programmer can do in one month, two programmers can do in two months." - Fred Brooks “The more you do coding stuff, the better you get at it.” - Aristotle (322 BC)
@hgy29 It would be good if the Gideros GUI could be modified directly from the code
actually I don't have a graphical UI builder yet.
I said something else We command Print () - we can output the text to the console 'Output'. And in defold there is a console 'Properties' in which you can create a text field in the console and output values from the program code, and then you can read the values from the text field in the console in the table lua /
Comments
For android: https://github.com/gideros/gideros/blob/master/libgid/src/android/platform-android.cpp#L139, but since this piece of code actually calls Java, effective code is here:https://github.com/gideros/gideros/blob/master/android/GiderosAndroidPlayer/app/src/main/java/com/giderosmobile/android/player/GiderosApplication.java#L1028
For 1) Gideros should allow Sprites that are no longer reachable from lua nor on stage to be GC'ed. I am not sure about listeners though
Likes: Apollo14, MoKaLux
"What one programmer can do in one month, two programmers can do in two months." - Fred Brooks
“The more you do coding stuff, the better you get at it.” - Aristotle (322 BC)
"What one programmer can do in one month, two programmers can do in two months." - Fred Brooks
“The more you do coding stuff, the better you get at it.” - Aristotle (322 BC)
Likes: MoKaLux, SinisterSoft, Apollo14
(I'm concerned about spritefont PNGs and Spine texturepack PNGs - do they auto-scale?)
http://docs.giderosmobile.com/automatic_image_resolution.html
Dislikes: JuanZambrano
"What one programmer can do in one month, two programmers can do in two months." - Fred Brooks
“The more you do coding stuff, the better you get at it.” - Aristotle (322 BC)
UPDATE: i've found it as a tab next to the project window. it's a bit misleading that it's greyed out in this case. in any case at the end i've got it.
Fragmenter - animated loop machine and IKONOMIKON - the memory game
What's its name?
(I know there's big 'Layout' class, but I'd just go with small class)
"What one programmer can do in one month, two programmers can do in two months." - Fred Brooks
“The more you do coding stuff, the better you get at it.” - Aristotle (322 BC)
Likes: oleg
Fragmenter - animated loop machine and IKONOMIKON - the memory game
Thx!
P. S. It seems to be grid-based. Maybe there's some other class to scroll just smoothly?
"What one programmer can do in one month, two programmers can do in two months." - Fred Brooks
“The more you do coding stuff, the better you get at it.” - Aristotle (322 BC)
https://wiki.giderosmobile.com/index.php/UI_Scrollable_List
Likes: Apollo14
Likes: Apollo14, oleg, luyimoon
http://forum.giderosmobile.com/discussion/7636/my-scroll-class#latest
Likes: Apollo14
https://play.google.com/store/apps/developer?id=razorback456
мій блог по гідерос https://simartinfo.blogspot.com
Слава Україні!
I was playing around with noises (perlin and simplex), and they uses math.floor() 3 times per noise function call, and folowing this page, i also tried to make a fastfloor function) And i found a couple ways:
And the results:
Likes: oleg
Likes: rrraptor, MoKaLux, SinisterSoft
Likes: SinisterSoft
I have to admit that coding interfaces is ugly as hell in gideros: monkey-coding at its best
I guess I should give 'Layout' class a try
"What one programmer can do in one month, two programmers can do in two months." - Fred Brooks
“The more you do coding stuff, the better you get at it.” - Aristotle (322 BC)
Fragmenter - animated loop machine and IKONOMIKON - the memory game
https://play.google.com/store/apps/developer?id=razorback456
мій блог по гідерос https://simartinfo.blogspot.com
Слава Україні!
(I use my customized button class)
"What one programmer can do in one month, two programmers can do in two months." - Fred Brooks
“The more you do coding stuff, the better you get at it.” - Aristotle (322 BC)
but you are right, next time i do a gui, it will be way faster than the first time.
in general what i find most annoying is to make the gui adapt to screen sizes from ratio almost 1:1 to almost 2:1. if you just put things in the middle of the screen and in corners, that's fine, but if you want to have kind of a frame and many buttons arranged inside, then there will be difficulties.
Fragmenter - animated loop machine and IKONOMIKON - the memory game
https://play.google.com/store/apps/developer?id=razorback456
мій блог по гідерос https://simartinfo.blogspot.com
Слава Україні!
I tie all the elements not to specific coordinates but to a percentage of the screen width.
https://play.google.com/store/apps/developer?id=razorback456
мій блог по гідерос https://simartinfo.blogspot.com
Слава Україні!
I will release it as part of gideros soon, but I’ll need your help for the documentation!
Likes: SinisterSoft, rrraptor, oleg, Apollo14, keszegh, Atavismus, vitalitymobile
I like how it is done in defold: I can add a text box from the code to the properties panel and associate it with a variable in the game code. Then I can visually change the values of the variables through the properties panel
https://play.google.com/store/apps/developer?id=razorback456
мій блог по гідерос https://simartinfo.blogspot.com
Слава Україні!
"What one programmer can do in one month, two programmers can do in two months." - Fred Brooks
“The more you do coding stuff, the better you get at it.” - Aristotle (322 BC)
We command Print () - we can output the text to the console 'Output'.
And in defold there is a console 'Properties' in which you can create a text field in the console and output values from the program code, and then you can read the values from the text field in the console in the table lua /
It is hard for me to write in english, just follow the link:
https://defold.com/manuals/script-properties/?q=properties
This function is called go.property
https://play.google.com/store/apps/developer?id=razorback456
мій блог по гідерос https://simartinfo.blogspot.com
Слава Україні!
shapeFlag - Is on or off by default?
https://play.google.com/store/apps/developer?id=razorback456
мій блог по гідерос https://simartinfo.blogspot.com
Слава Україні!
Likes: oleg