Skip to main content

Making of my Fist Game ( Angry Wives )


My Fist Game !!! Finally I was able to finish it. It's been two and half years since I start investing my extra time on this.

It all started with a joke. My current working place is a real fun place to work. We usually hangout on teatime and through out any thing we got on each other. We use to sit on a circle and pick a subject and laugh the guts out. Ones we were talking about a particular slow server, we thought about letting the users play a game while it loads. Game like Angry Birds. Then an idea came to modify the Angry Birds game to something like Angry Babes. So instead of this birds there are hot hot girls flying and killing dudes inside building blocks.

Then I started wondering,

" What if this can be done for real? "

"How practical is this?"

"Can a single person do this?"

I think I have done a research on mobile game purchase statistics, it turns out to be IOS users have more trend over buying stuff than Android users. So IOS was my fist choice. But unfortunately I didn't own a mac. And I didn't have money to buy a one. But there are virtual machines. I manage to download a one and install it on top of windows. It was my fist mac experience. Even without the one and only mac touch pad and it's amazing graphic display, I was amazed by it. I was enthusiastic and energetic to do this. But I had lots of stuff to learn and lots of stuff to do.

learn Xcode, Objective C, Cocos 2d, Box 2D, etc..
learn about Sprite sheets and game designing, development, level designing, Memory management etc..
learn 2D Character Creation, 2D Character Animation, Sprite Sheets, etc..
learn Music and composing them

So how do I find time for these stuff? I had to make few changes to my time management. I started getting up in the morning at 4. and going to bed around 10.30. This seems to work for me since I get the most productive few ours of the day put in to this, and enough time to worry about the office stuff. Time went by and I waisted lot of time on some stupid stuff that I can't now even recall. I purchased few licenses as well. I was able to complete most of  the graphic needs. And I was able to create animations by drawing frame by frame, and export them to sprite sheets to animate them as a sequence of images like the old times. Even those breaking blocks I had to draw each and every frame of it. No. There was no easy way of doing that :)
My Spring Logic

It's now almost an year, I purchased an IOS developer license and it's already going to expire. I am not even close to finishing it. There were times I almost gave up doing this. I was running through many doubts. This game is two much for a beginner like me. I should have started small. Graphics are ok but the logic was killing me. It was too much I am not an OOP expert. Not even a beginner. And the logic with Box 2D was like rocket science.

So I made a bold decision to abandon the code I have done so far, and move to a new SDK. Corona SDK. At the time I made this transition, it was not free. But I decided it will be worth the investment. The main language they were using was Lua. Even though I never heard of it, it was really easy for me to catch up with it since Lua is lot like javascript. With the new SDK and language I found a sample which is doing exactly what I wanted. "Monsters vs Aliens". It has some of the things that Angry Birds game have like Parallax scrolling, physics, collisions, level management,  etc.. But some of them were missing. I took this sample and start modifying it to suit my need. But it was really difficult to do changes to this unknown code. Again I took a decision to code it from the scratch. And I did exactly that. I even implemented parralax scrolling investing lot of time to it. Of cause I was taking online examples, but it was my own code and my own logic at the end.

It is now almost one and half years since I started this and now I manage to complete few levels. But they had many problems. Even before the game starting the books started collapsing by them selves. Pinch zoom was messing my head a lot. Pinch zoom together with parallax scrolling make the game worlds coordinates messy. I was stuck at this particular problem for so long. It made me drop both these features completely from the game and bring the whole game world in to single screen. In the process I had to resize and recreate all the graphics and spritesheets completely.

My Setup


Now two years gone. I manage to complete all the 24 levels of my game. They look pretty decent, but there seem to be lot of memory leaks at the code level. By this time I owned a Mac Book Air, iPad 1st Gen, and iPhone 4. Both the iPad and iPhone are used ones, which I bought from ebay and Colombo second hand market. With the devices in hand the game is tested real time. The memory leak is there, making it impossible to publish it. I was using Director class to mange levels and scene transitions in my game. This class has a particular way of handling memory. I might have done something wrong, but I couldn't find it. So I looked for an alternative. Luckily the Corona SDK itself has released an alternative to Director. I started translating all my code to make it compatible. This has fixed my memory problem and the game is running smoothly on both devices at last.


Comments

Popular posts from this blog

Using javascript to Include a html file inside another html file

When there is no server side functionality needed we create the whole site in plain html. Usually these sites have left/right side menu, top header, footer etc.. If the site grows in to 20, 30 pages, it will be a headache to do a simple change like changing footer text. We will have to change each page. If we were using a server side technology like PHP, JSP, etc.., we will have the chance to keep the common areas in the site in different pages and include these parts in each page using a “include” statements. We can do the same thing with the plain old html and javascript. But how? First you need to create the site main layout using divs and give them unique ids. <html> <title>HTML Includes</title> <script language="javascript" src="js/main.js"></script> <script src="js/prototype.js" type="text/javascript"></script> <script language="javascript" xml:space="preserve"> // <

APIM 3.0 - populate multiple apis - bash script

Created a bash script to create, tag and publish multiple APIs. This is useful to populate data for the landing page. #!/bin/bash # get the URL consumer key clientId=$(curl -k -X POST -H "Authorization: Basic YWRtaW46YWRtaW4=" -H "Content-Type: application/json" -d @payload.json https://localhost:9443/client-registration/v0.14/register | jq -r '.clientId') clientSecret=$(curl -k -X POST -H "Authorization: Basic YWRtaW46YWRtaW4=" -H "Content-Type: application/json" -d @payload.json https://localhost:9443/client-registration/v0.14/register | jq -r '.clientSecret') echo $clientId echo $clientSecret encoded=$(echo -ne $clientId:$clientSecret | base64) echo $encoded # get access token accessToken=$(curl -k -d "grant_type=password&username=admin&password=admin&scope=apim:api_view,apim:api_create" -H "Authorization: Basic $encoded" https://localhost:9443/oauth2/token | jq -r '.access_token'

Overriding default look and feel of GREG - 5.3.0

Following list explains what are the best approach for different use cases. 1 ) - You created a new asset type, and you need to change the look and feel of the details page in the listing page just for that new asset type. To create a new asset type you need to login to the carbon console (username:admin, password:admin) https:// :9443/carbon/ Navigate to Extensions > Configure > Artifacts Click "Add new Artifact" link at the bottom of the page. By default in the "Generic Artifact" area "application" asset type is loaded. Note the shortName="applications" in the root node. "applications" is the name of the asset type. Browse in to /repository/deployment/server/jaggeryapps/store/extensions/assets Create a folder with name "applications"    Now we can override the files in /repository/deployment/server/jaggeryapps/store/extensions/app/greg-store-defaults   Since we are overriding the details page we need to