Lua really needs a decent IDE like Visual Studio with drag and drop GUI creation.
@antix aren't you satisfied with Widget Candy? It looks like really great solution.
> 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 No file requester and no decent keyoard input are the issues here. Of course this isn't any flaw in Gideros since it is focussed on mobile development and doesn't need to include any such things by default
Widget Candy is also around 9000 lines of code and is kind of clunky IMHO.
Guys, sometimes I create classes not for reusability, but for readability only. How to do it right?
For example it's a popular practice to create class like 'Enemy.lua' And then create many instances, like: local enemy1=Enemy.new() local enemy2=Enemy.new() etc.
But it's convenient to also have separate class 'Boss.lua' though Boss will appear only once, and definitely it's more correct practice to make it a local object, not a global class but it's very convenient to edit its logic in a separate lua file
Can 'require' method help somehow? If we create file 'includedStuff.lua', and exclude it from execution.
Then we can
require"includedStuff"
but we can't access local variables that were declared inside 'includedStuff.lua' we can access only global variables that were declared there But these variables become local to current scene, they are not global at all.
Is it better to include such files instead of creating global classes whenever possible? what are the pitfalls?
> 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)
you can simply create a function instead of a class
yes, but this function will be global
we should avoid globals whenever we can, shouldn't we?
> 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)
In OOP it's cool creating a class for boss, even if it's just used once. If it, however, has similar properties to the enemy, one option is to create a base class for enemy and boss, and extend enemy and boss from the base class. OOP lovers rejoice!
About the "includedStuff.lua", yeah that would probably be a little faster. But the difference would come down to accessing self variables vs. global. I don't think there is much in it.
In most cases people go overkill on classes - the best thing to do is keep things simple...
In an arcade game just have all your intelligent (enemy) sprites in the same pot. Loop through to do all the collision, etc - when it gets to their 'type' have a brain variable that if not null is the pointer to the function that calls their brain - call it with the pointer to the current sprite, so each sprite is basically the same, including bosses.
In each 'brain' generate a joypad bitmap, this can be processed in the next stage of the main sprite loop (along with animation, debounce, etc - anything that is common).
If you have enemies that are quite complex and have special moves (all mapped to it's own bit in the joypad bitmap), just have a second variable that points to a second function that's called if not nil - that can be 'action', it follows the brain call. It looks at the joypad bitmap and does whatever special action the 'brain' has told it to do,
That way you can replace the 'brain' function with a different function that just gets the controller bitmap from a real joypad controller - instantly making it easier to test or add multiplayer.
Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!). https://deluxepixel.com
You do all that on the google play console, not in Gideros.
Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!). https://deluxepixel.com
@oleg probably you should export project for Android Studio and check logcat.
I also can't make google gaming services work, not even auth (though it was working before). During last few days google's console has been pissing me off. I'm almost ready to give up on google's gayming services.
Tomorrow I'll see what is happening there in logcat.
> 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 I also had conflict when 'Ads'+'Gaming' plugins were together in project, it was in previous version of Gideros. Now I don't have this conflict, cause I can't even authorize
@oleg you can add in google's console one dummy achievement just for this case, and never use it in game.
In my test projects I have dummy achievements, there's no such error in console.
> 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 projects with no achievements - but they work fine - no error.
Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!). https://deluxepixel.com
Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!). https://deluxepixel.com
Not much different in new gaming plugin except it now handles features previously only available in googleplay plugin, and it was updated to newest google apis
But you still can disable gaming plugin, can’t you ? If you can’t, I mean if ads don’t work when gaming isn’t enabled, then it is an issue with ads plugin instead.
ads plugin shows error in the old version of Gideros there is no error what's the reason ??
EDIT: "ADS" does not work without a "gaming" plugin
C:\212121\mimimi Cat\07_09_18\mimimi Cat\tmp\app\src\main\java\com\giderosmobile\android\plugins\ads\frameworks\AdsAdmob.java:432: error:
method does not override or implement a method from a supertype
<a href="https://forum.gideros.rocks/profile/Override" rel="nofollow">@Override</a>
^
Note: C:\212121\mimimi Cat\07_09_18\mimimi Cat\tmp\app\src\main\java\com\giderosmobile\android\plugins\ads\Ads.java
uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.
1error
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:compileReleaseJavaWithJavac'.
> Compilation failed; see the compiler error output for details.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.* Get more help at <a href="https://help.gradle.org" rel="nofollow">https://help.gradle.org</a>
BUILD FAILED in 10s
Exec returned: 1
Export failed! See details above.
@oleg, the issue you see has nothing to do with gaming plugin being enabled or not, it has to do with you trying to use an obsolete version of google play services in ads plugin. Try to use 12.0.1 or better
Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!). https://deluxepixel.com
Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!). https://deluxepixel.com
Could it be that you have googleplay plugin enabled too ? There are three plugins in which to set up google play services: gaming, googleplay (which should no longer be used), and ads (and firebase for those who have it). All these plugins must ask the same version of google services
Comments
It looks like really great solution.
"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)
Widget Candy is also around 9000 lines of code and is kind of clunky IMHO.
For example it's a popular practice to create class like 'Enemy.lua'
And then create many instances, like:
local enemy1=Enemy.new()
local enemy2=Enemy.new()
etc.
But it's convenient to also have separate class 'Boss.lua'
though Boss will appear only once, and definitely it's more correct practice to make it a local object, not a global class
but it's very convenient to edit its logic in a separate lua file
Can 'require' method help somehow?
If we create file 'includedStuff.lua', and exclude it from execution.
Then we can
we can access only global variables that were declared there
But these variables become local to current scene, they are not global at all.
Is it better to include such files instead of creating global classes whenever possible?
what are the pitfalls?
"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://play.google.com/store/apps/developer?id=razorback456
мій блог по гідерос https://simartinfo.blogspot.com
Слава Україні!
we should avoid globals whenever we can, shouldn't we?
"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)
About the "includedStuff.lua", yeah that would probably be a little faster. But the difference would come down to accessing self variables vs. global. I don't think there is much in it.
Likes: Apollo14
In an arcade game just have all your intelligent (enemy) sprites in the same pot. Loop through to do all the collision, etc - when it gets to their 'type' have a brain variable that if not null is the pointer to the function that calls their brain - call it with the pointer to the current sprite, so each sprite is basically the same, including bosses.
In each 'brain' generate a joypad bitmap, this can be processed in the next stage of the main sprite loop (along with animation, debounce, etc - anything that is common).
If you have enemies that are quite complex and have special moves (all mapped to it's own bit in the joypad bitmap), just have a second variable that points to a second function that's called if not nil - that can be 'action', it follows the brain call. It looks at the joypad bitmap and does whatever special action the 'brain' has told it to do,
That way you can replace the 'brain' function with a different function that just gets the controller bitmap from a real joypad controller - instantly making it easier to test or add multiplayer.
Likes: Apollo14
https://deluxepixel.com
I do not use achievements how to turn them off ??
https://play.google.com/store/apps/developer?id=razorback456
мій блог по гідерос https://simartinfo.blogspot.com
Слава Україні!
https://deluxepixel.com
this error occurs when I enable ads and gaming plugins
in my console I have game services turned off !!
https://play.google.com/store/apps/developer?id=razorback456
мій блог по гідерос https://simartinfo.blogspot.com
Слава Україні!
I also can't make google gaming services work, not even auth (though it was working before). During last few days google's console has been pissing me off. I'm almost ready to give up on google's gayming services.
Tomorrow I'll see what is happening there in logcat.
"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 я мабуть неправильно написав англійською, в мене немає помилки в logcat
в мене показує сповіщення в консолі що в файлі apk, у мене включені "досягнення"-я думаю це десь у плагіні прописано, мені потрібно їх виключити..
https://play.google.com/store/apps/developer?id=razorback456
мій блог по гідерос https://simartinfo.blogspot.com
Слава Україні!
Now I don't have this conflict, cause I can't even authorize
@oleg you can add in google's console one dummy achievement just for this case, and never use it in game.
In my test projects I have dummy achievements, there's no such error in console.
"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://deluxepixel.com
Likes: oleg
https://deluxepixel.com
Likes: SinisterSoft
Previously, there was such a mistake, but I could turn off the "gaming " plugin and use only the plugin "ads"
https://play.google.com/store/apps/developer?id=razorback456
мій блог по гідерос https://simartinfo.blogspot.com
Слава Україні!
https://play.google.com/store/apps/developer?id=razorback456
мій блог по гідерос https://simartinfo.blogspot.com
Слава Україні!
https://play.google.com/store/apps/developer?id=razorback456
мій блог по гідерос https://simartinfo.blogspot.com
Слава Україні!
Likes: SinisterSoft
https://play.google.com/store/apps/developer?id=razorback456
мій блог по гідерос https://simartinfo.blogspot.com
Слава Україні!
https://deluxepixel.com
https://github.com/gideros/gideros/commit/d688638f70b33ac6fd891b0d2813acdf1370fc0d
Recently, AdMob add one more function: onRewardedVideoCompleted that need to be implemented (@Override)
I hope that is the main cause of the problem and then we will find out if AdsAdmob.java is up to date
Likes: oleg
and what should I write there?
https://play.google.com/store/apps/developer?id=razorback456
мій блог по гідерос https://simartinfo.blogspot.com
Слава Україні!
Likes: oleg, antix
https://deluxepixel.com
https://play.google.com/store/apps/developer?id=razorback456
мій блог по гідерос https://simartinfo.blogspot.com
Слава Україні!