Hi I'm Gàbor from Italy.
First, apologize for my english, but I'm a Hungarian boy, and live here in Italy.
Finally I choose Gideros for my further mobile development, after one month of search.
I'm a flash developer, and graphic designer.
Well if anyone have a necessary to help for the design , if I can help you, because I'll have to necessity for your massive knowledge
Unfortunately AS how I think in this year, not have a really good performance in both cases ( IOS, Android ).
Well of course AS has a good libraries, components etc, what now I don't find yet for lua.
Now I'm trying to learn Lua, I think is a good language, but not a really simple how I thinking first.
I need immediatelly for your help.
Sorry if you written these things in 1000 time ..
I found some sites :
www.lua.org/
/lua-users.org
1 ) This is a good startup sites ?
2 ) What I see in these sites, I can apply all in Gideros , is it compatible?
3 ) I can use in Gideros external libraries xml (i found some libraries but I'm don't remember their names ?
4 ) I'm really confused with the object references . Double dot and simple dot. If anyone help me to understand this difference. In AS and JS I always used only dot reference for all things.
Example I found in lua.org:
////////////////////////////////////////////////////////
Account = {}
Account.__index = Account
function Account.create(balance)
local acnt = {} -- our new object
setmetatable(acnt,Account) -- make Account handle lookup
acnt.balance = balance -- initialize our object
return acnt
end
function Account:withdraw(amount)
self.balance = self.balance - amount
end
-- create and use an Account
acc = Account.create(1000)
acc:withdraw(100)
other example found in the forum :
////////////////////////////////////////////////////////
--let's create our own class based on Sprite
Scene = Core.class(Sprite)
function Scene:init()
--variable self is referencing to instance of the class scene
--so if we do this
self.somevar = "somevalue"
end
--create instance
local scene = new Scene()
--let's define function using :
--meaning we will use same scope
function scene:samescope()
--somevar is still accessible
print(self.somevar) --results "somevalue"
end
--now let's use .
--meaning we will use different scope
scene.differentcope = function()
--somevar is NOT accessible
print(self.somevar) -- results nil
end
Thanks a lot for any help.
And have good job.
NG
Comments
Here would be an example of difference between : and .
for each method in string object we can pass string to it
Summing it up:
Likes: avo, Caroline
I have found the lua-users.org site to be a great reference, especially for specific topics.
http://www.lua.org/pil/
You can also google for "lua tutorial".
Ad. 2: yes, every plain lua program is OK. Note that gideros has its own class system, and some examples use other class implementations, so you might to modify examples, or use 2 different class implementations at the same time.
Using external modules (written in C) is not that easy: you would need to compile them yourself, but as a beginner, you should just skip them (i.e. "not usable within gideros").
Ad. 3: as already written, you can use all plain-lua libraries, but should avoid binary modules.
Ad. 4. it is already explained. In one sentence: in lua if you use dot, you should pass "self" as a first argument of a class method, i.e. "function class.method(self, arg1, arg2)", but to make the source code look nicer, lua has a "syntax sugar", so you can write this like "function class:method(arg1, arg2)". It is only visual difference, for the computer both forms are exactly the same - no difference in program logic. So if you want, you can skip using colons entirely, just remember to put "self" as a first argument (also when calling an object mehod: "object.method(object, arg1, arg2)" ), as in your Account example above.
Website: http://www.castlegateinteractive.com
https://play.google.com/store/apps/developer?id=Castlegate+Interactive
it's nice to see some italian here!
ITALIAN MODE ON
Benvenuto!!! sono sicuro che ti troverai bene qui!
ITALIAN MODE OFF
Ciao
Gianluca.
www.tntengine.com
Thanks a lot ,for all help, and suggestion .
You are very kind , to help me.
I think now understand the dot and double dot syntax.
See you son.
Have a good job for everybody!
NG