With a wealth of sounds, tempo and key changes availability you can create a background music masterpiece to suit your needs. Tap out your drum beat, move your finger around to play your bass and keyboard. Then change the filters and mix away until you have exactly the sound you want.
Once you are happy with the sound, save it and export the file to your Mac. Now just have your game engine loop the file and your background soundtrack is complete. It is so easy and quick to make music you can spend the extra time creating more background tracks and changing what plays in your game over time.
But that is not where it stops. Enter AudioBus, another fantastic app that lets music apps on iOS talk to each other. http://audiob.us/
With a growing community of supported music apps the options are endless – http://audiob.us/apps/
With access to free and paid quality music apps that now talk to each other on iOS, the world of creating music has really opened up, not only for musicians but for us game developers as well.
So I have had some time to play with the new version of Unity 3D (version 4) and I decided to play with the new Mecanim animation system and how it works with a NavMeshAgent and a Ragdoll.
For a good starter video tutorial and demo scene on the Mecanim animation system go here:
I was very happy to see how easy it is to set up a character with the new Mecanim system. I had a zombie running around my scene in no time at all after watching the about tutorial on the system.
I then created a NavMeshAgent version of the zombie and saved it as a prefab so I could use it later by spawning the zombies on the go.
The video demo below has 200 zombie that are destroyed by explosions and respawner.
I then starting to think it would be nice to change from the Mecanim system to the Ragdoll system when the zombie get hit by the explosion. This turned out to be very easy as well. I just created a ragdoll zombie prefab so I could create it over and over when I needed it.
The zombies have a rigidbody attached to them and a box collider that is use as just a trigger. When the explosion hits the zombie it checks that it is hit by an explosion object (using a tag name) and then if it is an explosion object that has hit the zombie, the zombie object creates a ragdoll version of itself in its current location from the prefab. It then destroys itself and the new ragdoll version of the zombie is affected by the Rigidbody.AddExplosionForce function that the explosion object has on it.
The explosion trigger is just a Physics.Raycast from the camera to the ground and the explosion goes off at the ground hit point.
I hope it helps someone and if you think it can be improved please leave a comment.
Below is the code we are interested in.
if ([UIScreen instancesRespondToSelector:@selector(scale)])
{
//So we grab the screens scale factor – 1.0 = SD screen & 2.0 = HD screen
CGFloat scale = [[UIScreen mainScreen] scale];
//and now we grab the device model – we are only interested in if it is an iPhone or iPad
NSString* valueDevice = [[UIDevice currentDevice] model]; //and now we grab the device model – we are only interested in if it is an iPhone or iPad
if (scale > 1.0) //If the scale factor is not 1.0 it is a HD screen
{
CCLOG(@”HD Screen”);
if ([valueDevice rangeOfString:@”iPad”].location == NSNotFound) //Test to see if our valueDevice NSString does not contains the substring iPad & if it does not it is an iPhone otherwise it is an iPad
{
NSLog(@”iPhone HD”); //HD iPhone load HD iPhone graphic
screenToLoad = @”screenHDiPhone.pvr.ccz”;
pListToLoad = @”screenHDiPhone.plist”;
imageToLoad = @”Screen960x720.png”;
} else {
NSLog(@”iPad HD”); //HD iPad load HD iPad graphic
screenToLoad = @”screenHDiPad.pvr.ccz”;
pListToLoad = @”screenHDiPad.plist”;
imageToLoad = @”Screen2048x1536.png”;
}
}else { //and if the scale factor is 1.0 then it is a SD screen
CCLOG(@”SD Screen”);
if ([valueDevice rangeOfString:@”iPad”].location == NSNotFound) //Test to see if our valueDevice NSString does not contains the substring iPad & if it does not it is an iPhone otherwise it is an iPad
So I have been playing with the JoyPad SDK and have discovered that you can control the simulator with your iPhone when you use the JoyPad SDK – http://getjoypad.com/ and have it running thru your home WI-FI system.
So now we can control our apps using iPhone screen touches and have it displayed on our Mac screen for screen capture software to record the interaction with our games and other apps.
Will provide the source code for this demo soon.
Here is a quick sample video of a sprite running on the iPad simulator but controlled by my iPhone.
I have gone with a universal binary as I do not like paying for iPhone and iPad versions of games. I also have an introduction price set to 0.99c and it will go up shortly after the release. But it will not be outrages as again I do not like paying to much for games on the iPad.
Here is a brief description of the game.
Destroy countless Alien enemies as fast as you can in this dual stick retro style arcade shooter. Then collect as many stars that the aliens drop when they get destroyed as fast as you can before they disappear.
The number of stars you collect are added together from game to game so your position on the Total Stars Collected Leaderboard will always be changing.
Compete with your friends to be number one on three Game Center Leaderboards – Stars collected in a single game, Total Stars collected or the Highest Score.
Would you like to switch the virtual joystick over – not a problem – select yes so that the left joystick fires and the right one controls your ship instead of the default which is the other way around.
Features:
Control your ship with one joystick and shoot with the other joystick for independed ship and bullet direction.
Double tap to drop bombs.
3 Game Centre Leaderboards
19 Game Centre Achievements with more on the way
Power ups to help destroy more enemies or restore your shield
I have been helping several people on twitter over the last few weeks to get started with Cocos2d – http://www.cocos2d-iphone.org/ – so I thought I would put together a list of useful sites and other information all in one spot.
Your first stop should be the Cocos2d documentation and forums:
First off I would like to thank Andreas for making his TexturePacker software available for free to development bloggers – http://www.texturepacker.com/ and Mike of www.71squared.com for providing me with a copy of Particle Designer which I will do a separate blog on later once I have had time to play with it some more – http://particledesigner.71squared.com/
I have been playing with Cocos2d for a little while now and have read lots of tutorials, forum posts and blogs and have decided to share this post as I have not seen any posts about rotating a CCsprite in Cocos2d – http://www.cocos2d-iphone.org/ – using the degrees from SneakyInput – https://github.com/sneakyness/SneakyInput and changing the sprite as it rotates using a spritesheet.
I am going to be using this spritesheet:
Here is a quick youTube click of how it all looks running:
player = [[Player alloc] initWithGame:self]; – this also sets our start frame for our sprite to display.
and then our joystick:
gameJoystick = [[JoyStick alloc] initWithGame:self]; – I have set up a right hand side joystick as well which is not used as yet as I want to control my bullets separately to the player. I have included a simple skin for the joystick as well. For some reason I have to create the texture cache again in the Joystick.m file as it can not see it otherwise. If anyone knows how to get around this, please leave a comment.
All of this code I have found out about in other tutorials: