Never give up!
This is a post for all new corona developers and some thought about my journey!
This forum post is not a question – it is just some of my thoughts on Corona and how to achieve something. And excuse me for my grammar, it’s my old school English.
So, I have been struggling around with Corona SDK for maybe 6 month now – and I have tried almost everything. Okay, that’s a lie – but all the generic stuff that you can do with Corona, I have tried for sure. Lua is da shit.
I don’t see my self as a skilled Lua programmer, maybe an average or a median Lua programmer as you maybe are? Read further if you are on the same level as I am.
My native spoken language are Pascal, Asp, Javascript, Sql and PHP and some of the other higher level languages. I have been programming since i was 15 years old, and I am now an old man. That would make it to, about 30 years of programming ? from time to time. – In different languages. Yes, I am 45 years old and if you ask me what C++ is, I am not sure what to say? Is it something you can eat? The older I am getting, the harder to learn. That’s the facts.
So when I first started up with Corona and Lua, I felt in love directly, it felt so close to the core. I have never seen or spoken a language that is so quick, and so straightforward. It must be gods gift to us programmers ? I remember when I was programming threads in Delphi, what a nightmare that was. I still wake up in the middle of the night, sweeting and having nightmares about those threads. Okay, there are no threads in Lua, but it is almost there and similar. Lua has become my new lover, besides of my wife – for sure. (She is well aware of Lua now a day, but she feels confidence about that) I felt in love directly – and I am sure that you also will do / or did – or gone do. Lua is the way to get close to the core in a natural way.
So, what is my goal with this post? Well, don’t give up – if you never give up, you will get a result. Set up your goals and don’t rush into the project. Let it take its time. When you’re stuck into a problem, ask a question in the forum. Sometimes you will get an answer, sometimes not. That depends on how you ask your questions. Provide all the code, or at least the core of the code – so that other members can see what you are up to. Then you will get some help. Don’t forget Google, he is my best friend after anscamobile.com. By that I want to tell you all who helped me and answered my questions in the forum, you are the best! Lua love or Corona love, to you all!
So what have I accomplish these 6-month, and what’s the point with this post?
Well, not much for fact, but I have two games in the development pipe. But I want to share what I have done, and what you can do if you set up your goals, and never give up. I will give you a short description of something that I never thought that I could have managed to accomplish.
From the beginning:
So, I finally found a partner on the Internet, you know – the big World Wide Web ? I was looking for a graphics artist. And I found him on a forum here in Sweden. We had some email conversation and it turned out that we where living close, so we meet in real life. What a coincidence! The meeting felt good so we took it from there.
We did agree on a partnership and started to draw down the most important facts with our games, and our game studio. We wanted to build the best games for younger children and that’s the red line in our goal (Swedish term). We are both driven by our passion and we want to reach our goals. I had used Corona for a couple of moths and he is doing storyboards and other stuff for the major TV channels in our country. He is damned skilled!
So, we started up and signed up on our agreements on paper, the boring stuff – you know. Then we started to draw the documents for the gameplay. Not so sexy, but a must to get all the facts on paper. Google document was our friend for that. Finally, we started to build our first game and my partner was delivering graphics, and I was the code monkey. It was like Christmas to get started! Hes graphics are wonderful!
We did some progress very fast in the beginning and we had the whole gameplay up and running with menus, animations and everything, within two or three weeks. Piece of cake, was my thoughts – we are gone publish this game real soon. It is a simple game, how hard can it be?
Well, that didn’t happen, the application it self was consuming a lot of texture memory. Dohhh! Okay, back to the drawing board. We had an application with 10 animals – and it was consuming over 90MB of texture memory. Not acceptable since we are gone have at least 40-50 animated high res animals in the final game. The game is targeted for iPad.
So, here we had our first big problem, iOS cant take spritesheets bigger then 2048x2048. And all our animated animals are big. One sheet could maybe fit five frames. That’s not much of an animation when we are running in 60 fps. The second problem was, how are we gone transform the Flash animation to Corona and the Lua language, without any hands-on? We wanted the conversion between my graphic artists Flash files to Corona be completely automatic. He didn’t want to ask me to adjust a nose 4 pixels to the left, and I don’t want to adjust my code so that the nose is adjusted 4 pixels to the left. You know, He is doing he’s stuff, and I am doing my stuff. We wanted this to be an automatic procedure. And we wanted the usage of the texture memory to be low as it could be.
So, I thought – lets make those animated animal built in pieces. Then we only needed one face, a couple of eyes, some arms, a tail etc. –Well, we started of by that and I had major problems to just combine all these elements into a object (animal). Finally, I managed to import all these assets to one animal from Flash –but hey, how are we gone translate my artist animation from Flash to Cornona?
The goal was to do a replicate of the timeline in Flash, was this possible? –Well, I started to script out all data from Flash that I could use in corona. It was a journey, I can tell.
So, I have never touch an actionscript or jsfl in Flash before, and I have never started up Flash (maybe one or two times). And I have just been learning Lua for 6 months. Well, Google and search terms like AS3 helped me out and we where on the way. I can definitively say that Flash has some lack of implementation and it really sucks when you want to export data from the animation. Flash is not a gift, it’s a curse – for sure when it comes to scripting.
Well one week later, finally I succeed to make a script that my artist is running in he’s flash environment, and that produces a lua file with all the necessary data that I need. And it automatically publishes this file in our shared dropbox. I just grab the file and paste it into my project folder with the graphics. And guess, that file – when I add it to corona, is exactly as the animation in Flash with all the timelines. No matter how many frames, objects he is using.
How neat isn’t that!
So, I am a new beginner and have accomplished this:
A animation engine in lua that is efficiency when it comes to the usage of texture memory with high res graphics. No spoiled pixels.
I managed to export data from the timeline in Flash that is usable in Corona, completely automatic.
A animation in Corona that is a copy from my artist timeline I Flash
I am in the end of the development of my first game.
Okay, for you propeller heads, here are some interesting facts.
* I am in the stage between beginner and average when it comes to Lua.
* The pipeline we have developed is unique and fully automatic
* We are using the normal tween functions in Flash and converted these to Lua
* Our spritesheets are using around 700x700 pixels per object and they are hires for iPad 2.
* We are creating a copy of the timeline in flash and for 50 frames we are using 200Kb of memory + the texture mem for the graphics.
* The graphics are maybe using 6MB of texture and those are high res for iPad.
* I am a newbee
Conclusion, Set your goals and never give up. Don’t start several of projects, complete them one by one.
Best regards , Joakim
No, I am not doing this post to brag about my self, I am doing this to encourage you, with your development!
[import]uid: 81188 topic_id: 23438 reply_id: 323438[/import]
[import]uid: 52430 topic_id: 23438 reply_id: 93967[/import]
[import]uid: 29181 topic_id: 23438 reply_id: 93976[/import]