based on this thread http://www.giderosmobile.com/forum/discussion/1777/comparison-report-battle-of-the-lua-game-engines#Item_5
got an idea to create small init.lua file which would load different hacks and extensions to Gideros objects we all have used before. I'm not talking about plugins, but pure lua based extensions, and even not about lua classes as Button class or TextWrap, but extensions to current classes, which would enhance the usability of Gideros. Basically some abstraction to mainly used functionality
Here are some things I have in mind:
So what do you find relevant, what should be needed and what you have up on your sleeves to share?
And if someone wants to get their hands dirty, here's a bunch of stuff you can research and provide code for, that would help us a lot.Some tasksShow child behind the parent or not inherit alpha
Shadows for TextField is implemented making real textfield act as shadow and it's child as real displayable text, making shadow the parent of real text. This gives two disadvantages, a little more complex to implement, but we handled that, and inability to set alpha transparency to shadow, because real text automatically inherits it.
So what could be the solution to this: making shadow child of a real text, but make it appear and real text, not on top of it or do not let real text inherit alpha from parent.
I thought of other possible implementations, as adding shadow as a brother of textfield (setting it before textfield) under same parent, but this raised many unwanted scenarios, where original textfield changes z-index, or parent, which would require a lot of additional code to bypass this scenarios. But I'll hear any ideas you might have Determine the font type
To implement shorthand for TextField similar to Bitmap, there is a need to understand if user wants to load Font or TTFont object. In ideal situtions only one parameter should be passed, as value "tahoma". Then maybe inside constructor we could check if file tahoma.txt available, then it's a Font, if tahoma.ttf is available, then it's a TTFont. What would be the most efficient way to do it and what filetypes are supported by which objectChain everything
Right now most of the methods are chained, meaning they return they object (if not returning anything else) for shorter code writing. But still not all possible methods are chained. So the task is, either come up with set of keywords inside methods' name, that would cover up most of the methods (but will not cover methods that actually return something) and chain others manually.
Or come up with different approach how this can be done, for example, checking bytecode in function body for return commandRGB to hex conversion and vice versa
Now this might be to obvious thing to do, but I'm too tired right now to try and figure it out, so I'll post it here.
If we want to, for example, support HSL color model, there is a need to be able to convert 255, 255, 255 to 0xffffff and back, since Gideros accepts color in 0xffffff format.Taking and implementing any feature of the list
There are features list in the first post, that should be included in init.lua. Implement them, share the code, or extend existing features Test, test, test
While writing I do some initial test if this works at all or not. But more thorough testing is needed. For example, including this init.lua should not only provide additional functionality, which works properly, but also not to mess up with existing code, aka, provide full backwards compatibilityProvide feedback
Provide feedback on existing implementations, if many of you say something is needed, it will be included, if many says it's not needed it can be removed. But that's not all. Also consider function names, optimizations and other aspects, for example, creating abstraction layer for physics, in many cases I need to think for user and make decisions for them, just to make code shorter and easier. I'm not a dictator and don't want to make decision for all, let's make it more democratic and let's hear your thoughtsSuggest new features
This lib will be as good as there are features in it. If there is something you use, or something you think would ease the development or simply some functionality that would have helped you, please post. Provide idea and we will be grateful, provide also a code and you will be my hero (@atilim
)TLDR; aka GimmeDaCode: Github Repo