GitHub Repository:
I'd like to point it out again, please check the GitHub repository if you want to see more specific information, each commit goes into a lot of detail about all previous changes! Follow us at : http://github.com/AmritP777/MAD-Tank-Team
Project 2 : Amrit/James - new project code name : Not A Tank Game
In last report I detailed that the Cocos2d port has begun, but did not get very far. This week I am happy to announce that the port is completed and performance is pretty good. We are now working on "rapid feature output" in hopes of getting ready for a big usability test in a couple of weeks.
Various improvements/changes:
- Now using CocosDenshion sound library, more specifically, SimpleAudioEngine, to take care of all sounds. Have turned my Sounds class into a singleton which can be accessed from any other class in the game, it's the one central place which deals with all sounds. Loading in a nice MP3 song (but we will soon have to sort out compressing that down) for background music as well as using some cool sounds for laser/machine gun fire, it's all really smooth and exactly how we want it. Initially there was problem with slow-ish level load times because it would initialise the necessary libraries for working with sound, but to get around this I initialise all those things on appdeletate init. Basically it makes application start-up time longer but gets rid of delays on level load which I thought was more important. This start-up difference is actually only about 2 seconds extra than normal.
- Got rid of the old Explosion class along with the lame, cheap looking explosion animations.
- In place of the old Explosion class, now using cocos2d particle effects for explosions which look super awesome! I would upload images, but they really wont' do any justice. It's better if you just check it out in class or compile yourself from git. If you don't know what particle effects are, a guy has made a video detailing a couple of the possible particle effects at : http://www.youtube.com/watch?v=koWpcRPBeTE
- The Weapon/UserTank/EnemyTank classes no longer hold UIImage's, instead I have changed it so they just hold an NSString referring to the image that should be used for it. Eventually, I will need to change this again as I will get on to using sprite sheets where I can make further changes so that as a enemy tank moves, it's not just translating position across screen but also showing some kind of frame changes to look better.
- Fixed problem where bullets were appearing from center point of tank, they now appear in front of the barrel, therefore look way cooler
- The game loop is scheduled to sync at update speed of the app, which is at 60FPS. Everything runs faster and is generally smoother now
- Have got some (albeit cheap looking) background images in place just by setting up a sprite in background, but hope to eventually create backgrounds with CCLayers and have the backgrounds animated to some extent
- Changed the way the game works a little bit (I will detail this more in a little bit below), the menu system is now like this (the items inside that screen are shown in parenthesis) :
Launch game -> Presented with Main Menu Scene (Play Now!, Settings), click Play Now! you go to Level Select Scene(Intro, Level1 ~ 10, Back to Main Menu). At the moment only level 1 is being worked on, as a base to get things in place. Once we have that sorted, we will be able to use that sort of as a template for the other levels scenes. Anyway, on this level select menu, we have a nice pop-up that comes up when a user clicks on a menu item for a level which has not been created yet/not yet been unlocked. We could have mixed UIKit here and had a UIAlertView come up easily, but that has frame rate implications mixing OpenGL and UIKit like that, so we just created a new little layer to add on. - Now reading through some tutorials to learn how to use spritesheets properly, want to start with having nice effects when the player tank is moving up and down, rather than just teleporting he can have nice animations.
- Done some more research about the textureCache (was trying to figure out how to use that from last update) and found out that I don't explicitly have to add all my textures to that textureCache, actually when you create a new sprite , "spriteWithFile", Cocos2d will automatically add that file to the texture cache and whenever you create another sprite, it checks the cache for that file name, if it's there, it returns the texture, if not, it adds the new one to the cache.
- Added in some nice transition effects which occur in between scene changes, there's lots to choose from, and the way we change to other scenes can actually be a lot better but for now it's done the "quick & easy" way.
Game change ideas are finalising!
You might recall we've been trying to think up of a nice game scenario for a while so that we can have a reasonable change in theme to separate our product from Maples one. Basically, the storyline of ours is going to be something along the lines of :
Your virtual character has bumped into a secret treasure chest, he releases this Genie who gives him the choice of having any kind of special power that he wishes to have. The character cannot decide about what is best, so he makes a deal with the Genie to let him try out a few of the things he might want to wish for. The genie will take the player and put him into all sorts of chaotic adventures with special powers of his choice, this will be the basic premise for each of our levels. - The intro scene will be what explains this storyline and will be available to view at any point in time via the Level Select Menu. We can also add in some basic tutorial describing game controls and so on in this section.
We decided a good number for a total amount of levels would be 10, and some ideas for the levels we have so far (will probably only implement 2 of these for a prototype/demo):
- Be a transformer-guy who transforms into a plane. In this stage, you are fighting in the Sky, where you shoot big ugly birds and other air planes. You will have Machine-gun as default auto fire weapon and Rockets as stronger weapon available after a cool down period. Nukes are also there, it will call some other planes to bomb all enemies on screen.
The boss stage (yes, all our levels will have classic boss battles!) will be in space, he will probably be some ridiculous Satellite who bounces back your bullets to you every now and then as well as shoots lasers at you. This will be the easiest stage - You turn into a Ninja and try to keep the enemy martial artists from invading your home-town. You will throw acid bottles (sort of like a basic nuke) and shurikens (ninja stars). We might be able to implement something tricky to use the current game engine to have the ninja move on y axis too, with melee attacks, but that is yet to be seen.
The main nuke would be throw a bunch of ninja stars, affecting all enemies on screen. At the end, you would fight this gigantic Samurai boss who throws ridiculously large swords at you. - You become a werewolf and run around the woods trying to rescue your wolf buddies from this evil dragon boss. You fight little goblin guys and eventually work your way up to the boss. The boss is this big dragon guy who can burn you right up if you're not careful. He has heaps of life and just runs around really quickly and throws fireballs.
- .... Haven't thought of more ideas yet!
Problems
So as you can see, there are lots of nice things we want to do, but for now we are working on tackling a couple issues which have arisen from this weeks progress:
- There is a huge memory leak issue, it's got to do with the CCParticleEffects as far as I can tell from the Leaks Performance Tool, but I'm not sure how to go about it from there. According to my knowledge, the property that I used "autoRemoveOnFinish=YES" is supposed to completely cleanup that particle object once it's animation is over but it doesn't seem to work. The memory leak, as severe as it is, strangely enough doesn't effect performance of the game. The memory drops right down to 3MB and then slow to 1MB, going back up to 4~5 and looping again from 3MB. It never goes to 0 and never crashes which is wierd.
- Also seems to be a bit of a leak from the audio class but it's no where near on the same scale as the one regarding particles
- Nothing in the Settings screen yet, so when you get there from Main Menu, you can't go back - you have to exit the game fully (click home button then go to multi-tasking dock and close it from there too). Eventually need to get on to putting volume controls and displaying current high score on there as well as providing a means to go back to main menu.
- Need a whole lot of images for basically every single interface element. Right now just using really cheap 2-minute MS Paint jobs. People see it and think it's just a crappy 1-week game and don't realise the efforts that were put into making it what it is.
- Need to change enemy out of bounds removal so actually it removes them when they move off the screen rather than when they "poke their nose" off the screen.
- Try to use midi files for back ground musics as they are really small in file size, plus there are heaps of nice royalty-free ones available. With such small file sizes, we can afford to have a unique separate bg music for each game level.
- Implement a proper pause method on the game scenes and instead of drawing two separate "back to level select" and "pause" buttons, have a single button which pauses the game and brings up a menu (similar to the one that shows "level locked" on Level Select Screen) with options to resume game, change game options (go to settings screen) or go back to level select. This should also pause background music as well as call pause on sharedDirector to invalidate any current schedules etc.
- The collision frames are all wrong! Now that the images are bigger while we are testing it, it is way more apparent that the out of bounds frames are quite wrong. Should be a quick fix, for now we consider it a minor bug - barely worthy of documenting but here nonetheless.
- Have started to try use a sprite sheet that I made using this software called Zwoptex, it also created a handy plist file for me which I can use directly with cocos2d to load spriteframes from. Unfortunately I was having too many bugs when trying to use it following this tutorial (it was a bit outdated), I'm just hunting around forums now trying to find a solution. So far I heard its probably fact that my version of Zwoptex is newer than what is supported by the cocos2d version I have installed so I will try fix it by upgrading cocos, but that will involve moving into risky beta territory.
- Visually display cool-down of the extra weapons somehow
Goal for two weeks time
We are getting into our Uni holidays soon, will have other assignments and things to work on too, but hopefully will set aside lots of time to totally rush this project to a good enough state where we can submit it as a demo to the app store. With this, we should be able to have other people download and start testing it, providing us with valuable feedback on usability factors and general game play. Also we will be able to tell if it sparks any sense of addiction or not.
Conclusion
That's it for now, I'm sure we will come up with more interesting things for our next update. Will try to keep up more regular updates, maybe every 2 days rather than twice a week since we seem to have so many changes/improvements all the time.
Regards,
Amrit
Mad Tank Team
Comments