I've been trying to learn Gideros using the Reference Manual and this friendly and generous group, but I'm not gettin' it. My only experience has been writing games in Basic (AMOS on the Amiga, then Blitz3D on PC). But Events, EventDispatchers, Classes. One variable that can equal multiple tables, functions, .self ????
Kudos to all you people that learned Gideros ... any suggestions for a pre-language to learn before Gideros?
Thanks!
Comments
- It's probably a good idea to understand the basics of Lua. Here's some links to get you started:
Lua wiki tutorial: http://lua-users.org/wiki/TutorialDirectory
Official learning book: http://www.lua.org/pil/contents.html
Official 'getting started' page: http://www.lua.org/start.html
- A basic understanding of the object-oriented programing will help:
http://www.inf.ufsc.br/poo/smalltalk/ibm/tutorial/oop.html#what_is_object
1. http://www.gamasutra.com/blogs/ArtursSosins/20131129/205956/Learning_Gideros_in_10_easy_steps.php
2. Gideros Mobile Game Development book by Arturs Sosins (aka @ar2rsawseen). [recommended]
The basic concepts you might want to understand is multi-Threading, where you can start up a routine to run on its own while you run through your code, think of a Trung and branch, running side by side.
As for learning, as mentioned above, basic LUA is not harder or easier than Basic, Pascal, PHP, but much easier than Java, C++, C.
Best way to learn a language, is start with a simple Task, usually Hello World, and then you add things, one by one, till you your app evolves to somthing, mabe not as planned, but that is how many games are developed. I started one game I call bird lander, ends up being bird climber. lol...
---------------------------------------
I don't know a lot of languages. I come from AS3 in Flash and Lua suited me very well because it's kind of the same structure but simpler (in fact I came across Gideros and began using it for this article http://blog.giderosmobile.com/post/52707133103/port-your-flash-game-to-ios-android). And I think you'll find much more info and tutorials for AS3. Though I think you'd be learning a lot of stuff you won't need in the end.
Also, something that helps is taking a look and messing around with the examples that come with Gideros (which cover many topics) or any other stuff you can get your hands on, like Nebula Retro's code, or even the projects other people post on the forums asking for help, which normally are short and you can dissect them and try to understand each part.
http://www.rubymotion.com
RubyMotion right now is for iOS and MacOSX only.
The sample codes and small apps should be helpful but for the most part the help notes aren't extensive enough for this guy.
If I could ask you one specific question: what is self. ?
Function Bird:init(frameList)
self.frames = {}
Thanks again !!
Like @yubaro's quoted example the class is MyClass, the local variable no longer exists in the other function, while self.variable is still there.
What kind of app are you making with Gideros?
Meet Kate. Grey is her favourite colour. Maths is her favourite subject. Decency is her favourite type of behaviour.
She definitely does not like jewellery or modelling, but loves aeroplanes and other machines made of aluminium.
Forgive me if I am stating the obvious, but, in my opinion, the best way to learn a programming language is to passionately want to make a particular app, then try to make it. Each time you need to know something specific, you look up that particular thing, copy and paste the code and continue (whilst trying very hard not to get side-tracked by other interesting code snippets seen nearby). Maintain focus on making your app.
This method also provides small, regular moments of excitement, satisfaction and pride while you watch your creation gradually materialise.
Likes: Disciple
Meet Kate. Grey is her favourite colour. Maths is her favourite subject. Decency is her favourite type of behaviour.
She definitely does not like jewellery or modelling, but loves aeroplanes and other machines made of aluminium.
Seems Lua is also available now
http://codecombat.com/
When you call this function using
Lua is not an object oriented language. Gideros has an OO layer on top which you can use if you want but do not have to. You can program in Lua just as you would in Basic if you like.
If you look at my open source game, http://giderosmobile.com/nebula, you will see it is not written in OO style, the structure of the game is like a C program. You might find it easier to understand.
Likes: ar2rsawseen
https://github.com/gideros/gideros
https://www.youtube.com/c/JohnBlackburn1975
john26, thanks for the explanation of the colon, it helped, and the source for Nebula which will helpful in the future. Played the game today, fun, very challenging, and nicely done.
... and Disciple, thanks for the explanation of self (now I get it)
What kind of game/app are you making (or is it secret)?
Meet Kate. Grey is her favourite colour. Maths is her favourite subject. Decency is her favourite type of behaviour.
She definitely does not like jewellery or modelling, but loves aeroplanes and other machines made of aluminium.
Your programme will only spontaneously, automatically be read once (from beginning to end). Any bare code will be executed automatically and immediately, and then forgotten. On the other hand, any code encapsulated within functions (i.e. any code between a corresponding pair of the words 'function' and 'end') will be saved to memory (instead of necessarily being executed immediately).
Any given function will be executed only when its conditions (as specified by you) are met; and a function can be executed whenever you need it, as many times as you like.
The condition for a function to be executed is often the occurrence of an event, which is why it is handy to only have your desired event listeners running constantly (as you mentioned above), instead of the whole programme looping constantly. The convenient/efficient aspect is that you can turn a listener on only when it is needed. For example, a 'mouse up' event can never occur unless preceded by a 'mouse down' event; so, even in a situation where you want to monitor ('listen' for) both events, you might as well only have the 'mouse down' listener running at all times, and only add the 'mouse up' listener in your mouse-down function (and then remove it again in your mouse-up function).
Likes: ar2rsawseen
Meet Kate. Grey is her favourite colour. Maths is her favourite subject. Decency is her favourite type of behaviour.
She definitely does not like jewellery or modelling, but loves aeroplanes and other machines made of aluminium.
I made PC games for friends/family for years with Blitz3D. But Blitz3D doesn't work with Windows 7-64bit so my hobby ceased a while ago. I usually only have time in the winter to write games, so I'm testing out some new languages for this coming season. Mobile apps are also new to me so I'm started new directions. I have some unique match-3 games that I thought would be fun to adapt to Android. I suspect that new ideas will develop as I learn a new language (that's the fun).
What are you making with Gideros?
So you do not need to write the main loop yourself, everything happens in your listener functions (written in Lua). Any code in your program outside of these functions is executed on start up and is normally used to set global variables to initialize resources. Also, you need to register (some of) the listeners in global scope using addEventListener.
Thanks for your kind words about Nebula Retro, I hope it helps you to learn more.
https://github.com/gideros/gideros
https://www.youtube.com/c/JohnBlackburn1975
I'm working on an e-book/comic, but...
despite what I preached above, I keep getting distracted by other possibilities!
I'm intrigued by the word 'unique' in the description of your games (above). Can't wait to play them!
Meet Kate. Grey is her favourite colour. Maths is her favourite subject. Decency is her favourite type of behaviour.
She definitely does not like jewellery or modelling, but loves aeroplanes and other machines made of aluminium.
Gideros Mobile Game Development book by Arturs Sosins
Not only the book is great and will jump start your game development (it comes with game framework), but also to support our awesome ar2rsawseen whose name you will see in pretty much every thread and he will be normally the first one here to help you out
As for Lua, this is a nice short tutorial I really enjoyed and which will make you learn more about Lua:
LUA: really for Beginners
http://lua.gts-stolberg.de/en/?uml=1
Likes: Platypus
Please support @ar2rsawseen!
I also highly recommend @WauloK's book. It's great:
http://bluebilby.com/gideros-mobile-for-beginners-book/
Meet Kate. Grey is her favourite colour. Maths is her favourite subject. Decency is her favourite type of behaviour.
She definitely does not like jewellery or modelling, but loves aeroplanes and other machines made of aluminium.