Ball rolling sound effect - iphone

I am working on a Labyrinth style app for iPhone using Chipmunk and openAL. I got everything working except the ball rolling sound. What I have tried is playing a small sound for each update in the ball's position so that the overall effect sounds like the ball is rolling. Based on advice on this forum I tired using velocity of the ball to adjust pitch of the sound. I have the following problems:
I cant hear the sound at all when I am playing this sound in a chipmunk call back. I can hear it elsewhere.
Even if I got this working somehow, the sound I should play has to be very very short as the ball doenst take too long to roll. THere has to be a alternate way.
Can anybody please help? I can even pay for a simple application that did this if the sound is also included.

I recommend cheating... record (or find somewhere) some longish looping sounds of the ball rolling at different speeds. Have one of them playing, based on the speed of the ball. As the ball's speed changes, you can cross-fade from one sample to another. My guess is that that will sound more realistic than just varying the pitch of a single sample.
Of course, it may be enough just to have one longish looping sample, and only vary the volume proportional to the ball's speed. I'll have to go track down my labyrinth game and check. :)

Related

Unity Animator Checking Too Slow

I'm currently just trying to learn to use the animator within Unity, I'm very in-exp at animation and don't understand it even in the editor as I focus on programming/scripting.
I have an animation and the states for the animations as-well as the conditions all working perfectly however the animation check for the next state is way to slow. I've tried changing the speed of the actual state but it speeds the animation up and makes it look like my character is walking insanely fast.
I've tried messing around with the frames, making them over a longer time period and making the speed of the state faster however it seems to counter act each other, when I make it longer frames the pace of the animation is slow and then when I make the speed of the state go quicker it just makes the frames tick faster making the animation faster.
What I believe is happening is that the check for the next state of animation is happening once the full animation has been played. However what I need is the check to be happening constantly (as if frame by frame of the unity game not the animation).
Any advice would be great, I've tried using youtube to solve this before coming here however most people are creating a platformer game where as I'm trying to aim for a top down 2d, all directional character movement instead of the linear x axis character movement., and outside libraries.
I deeply apologise for my inability to find a suitable source. I have literally just came across an article online that came across a simple solution.
here:https://answers.unity.com/questions/221601/slow-animation-response.html
basically if you can't be bothered to click the link and you are having the same problem,
find exit-time by clicking the transition and then in the inspector and untick it.
Sorry.

Coyote time for 2D platformer

I'm a novice game designer and a coder new to the term 'coyote time.'
I've always felt its existence before or after practicing game design as a career ever so naturally playing other games, but now that I have to implement it to my own game I'm kind of confused how to actually attempt to do it.
My game is set up with modified CharacterController in 3D world space as an orthographic 2D platformer. If anyone could give me where to look for head start trying to implement this feature for the first time or a very simple example I'd appreciate it very very much. Google didn't quite cut it this time for me :(.
It's 11 months late but hey, maybe someone else will benefit from the answer.
Have a player variable called coyoteTime. Whenever the player touches the ground, set coyoteTime to a certain number between 0 and half a second. At every game update, reduce that number. If the player touches the ground, set it back to that number.
When the player tries to jump, if (0 < coyoteTime), the player can jump.
This is basically just extra time to jump

Unity 3D low fps

I'm using Unity3D 5.3 version. I'm working on a 2D "Endless running" game. It's working normally on PC. But when I compile it to my phone, all of my gameobjects are shaking when they are moving. Gameobjects are in a respawn loop. I'm increasing my Camera's transform position x. So when my camera is in action, all of the other objects look like they are shaking a lot and my game is working slowly on my phone as a result. I tried to play my game at Samsung, on discovery phones. It's working normally on some of them. But even on some Samsung devices it's still shaking. So i don't understand what the problem is. Can you help me with this?
One thing you can do is start optimising, if you have a game that is either finished or close to it. If you open the profiler, click "Deep Profile" and then run it in the editor on your PC, you'll get a very detailed breakdown of what is using the most resources within your game. Generally it's something like draw calls or the physics engine doing unnecessary work.
Another thing that might help is to use Time.deltaTime, if you aren't already. If the script that increases the transform doesn't multiply the increase by Time.deltaTime, then you're moving your camera by an amount per frame rather than per second, which means that if you have any framerate drops for any reason, the camera will move a smaller distance and that could be throwing out some of your other calculations. Using Time.deltaTime won't improve your framerate, but it will make your game framerate independant, which is very important.

How to "render" a Box2D scene on iPhone

I'm currently using box2d with cocos2d on iPhone. I have quite a complex scene set up, and I want the end user to be able to record it as video as part of the app. I have implemented a recorder using the AVAssetWriter etc. and have managed to get it recording frames grabbed from OpenGL pixel data.
However, this video recording seems to a) slow down the app a bit, but more importantly b) only record a few frames per second at best.
This led me to the idea of rendering a Box2D scene, manually firing ticks and grabbing an image every tick. However, dt could be an issue here.
Just wondering if anyone has already done this, or if anyone has any better ideas?
A good solution I guess would be to use a screen recorder solution like ScreenFlow or similar...
I think your box2d is a good idea... however, you would want to used a fixed-time step. if you use dt the steps in the physics simulation will be to big, and box2d will be unstable and jittery.
http://gafferongames.com/game-physics/fix-your-timestep/
The frame rate will take a hit, but you'll get every frame. I don't think you'll be able to record every frame and still maintain a steady frame rate - that seems to be asking a lot of the hardware.

Synthesizing a realistic bounce sound for maze tilt marble game

In considering the design of marble-in-maze games where you tilt the table to get the ball to the end of the maze without going down one of the holes, I wonder whether anyone here has considered the modelling of the sound of the ball hitting the walls...
The ball doesn't always make the same sound.
This other question covers the rolling sound:
Sound of a rolling ball
But I am more interested in the bouncing sound - I am often struck by how unrealistic it is in most people's version of the game.
What are the factors to consider to work out how to produce a realistic sound?
How must the sample or raw data then be processed or generated?
There are some good links in the Sound Modeling section of this page from a course at Carnegie Mellon: http://www-2.cs.cmu.edu/~djames/pbmis/index.html. The instructor, Doug James, is now at Cornell as does similar research there (http://www.cs.cornell.edu/projects/Sound/).
I've never tried to implement any of these methods, but I suspect that they're overkill and/or too slow for a small game. However, you might be able to generate several samples offline and choose an appropriate one at runtime.
Hope that helps.