Flash - Detect tilting iOS - ios

I've got a sample game here, and I wanted to give it a try on the iPad.
How do I listen for tilting in flash?
If I have a standard space invaders game, I want to move the spaceship left and right when I'm tilting the device left and right. How do I do this?
Thanks! =)

Did you try AccelerometerEvent? Here's a tutorial and sample application using accelerometer to control the ball movements: http://www.gotoandlearn.com/play.php?id=116

Related

Making a Platform game with Corona SDK

I'm trying to develop a platform game similar to Geometry Dash but i'm facing a lot of problems during the making of the algorithm.
I don't barely know how to proceed. Are the levels structured with a long image ( that is the ground) with obstacles added, or there are many obstacles generated progressively during the game?
I'd like to know where to start from, what to draw and how to place it in my game, how to build the collision detection.
The game will be an auto-scrolling platformer, so, will the character's asset be moving right or will all the level except for the character be moving left?
I'm a beginner, so i would like to receive detailed answers and not too difficult to understand. Thank you.
if you have any advice I would gladly listen to it.
I've done all corona tutorials but they doesn't explain how to do a platformer. - Luca Pasini
Looks like you still don't feel how game work from inside. Tutorials probably will not help you much. I think you need to start something very simple by your own - not by tutorials.
For example:
Show red rectangle
Show blue recatngle
Tap on the screen and red rectangle must change his position (not by transitions - just by core x,y change)
If they are collide - show text: "You win". Collision check just by raw calculations.
Then go with updates, that will make it looks more like a game.

objective-c/iOS Track location with camera

I want to display real time video on the iPhone Screen.
I know the GPS coordinate of my house.
I want to display a vertical line on the screen that shows me my house direction.
If i move my phone, turn left, right, i want the vertical line to move left and right to show where is my house.
If my house is behind me, i do not want to see the vertical line.
Do you think this kind of application is easy to make ?
For this you have to use "Augmented Reality". You can find many more source code for this.
Please check the below links:
Location Based AR
Augmented Reality Toolkit

Detect vertical or horizontal position iOS

I have an iPhone 4 and I would like to detect whether the phone is vertically straight (see first image) or horizontal (see second image). I am not talking about portrait vs landscape view detection.
I am new to iOS development and I think what I am looking for is the accelerometer (specifically the pitch property perhaps) or gyroscope. I have looked online and I am not quite understanding the code or whether I am looking for the right properties. Can someone please tell me how this can be done?
Thank you!
Try the accelerometer api and check the position of the phone.
here is a tutorial: http://tech.pro/tutorial/968/iphone-tutorial-reading-the-accelerometer

DeepEnd(cydia tweak) like 3D background for iOS

I am trying to emulate 3D background in one of the application we are developing.
Check this video on what i am trying to do : http://www.youtube.com/watch?v=429kM-yXGz8
Here is what i am trying to do to emulate this 3D illusion in our
application for iPad.
I have a RootView with 3 rounded buttons centered on the screen which animates in circular motion.
On bottom screen i have some banners of size (600*200) which keeps rotating with flip animation.
I also have some graphical text that is part of the background which contains the "Welcome message"
All elements are individual graphics, and hence when the user moves the iPad we only move the background based on the position of iPad using x,y,z coordinates of accelerometer.
the background moves accordingly, however this is not enough to have 3D illusion, so we decided to add some shadows to graphical elements(buttons, banners, text) and move the shadow accordingly with the iPad's position.
However the result is not convincing, and accelerometer is not updating value if user moves iPad to left and right on stand up position facing iPad straight to the head.
I was wondering if anyone have tried to achieve something similar with success? or any resource to help on how to achieve this? i am just confused whether by using only accelerometer will work or should i go with gyroscope?
Using face detection for simulating a 3D effect already has been done (by me). You can download a complete sample from http://evict.nl/code/face-tracking See the video on that page for a quick demo.
You should definitely use both. accelerometer (movement) and gyroscope (device angle). But for a true 3d effect you probably need to use the camera + face detection.

Head movement detection - iOS

Someone asked me if is it possible to detect the head movement of someone using the iPhone's camera. It's because that the person wants to detect when his head touches some random objects falling from above.
This game represents almost what I'm trying to say. Is it possible to use the camera to detect someone's head movement or other part of the body to avoid the ball touching the ground? Not using your fingers over the screen, or the movement of the device.
Do you think it could possible? Because I haven't see any app / game using someone's movement. And if is possible in iOS... would it be possible to do it on Android?
Thanks in advance.
Have a look at this Apple demo code, it's pretty close to what you're after:
http://developer.apple.com/library/ios/#samplecode/SquareCam/Introduction/Intro.html

Resources