iPad Car Race Game - ipad

i will be developing a car race application, you will see the car from the top as well as the track (road) on the screen.
Tilting iPad (using accelerometer) will make the car move in the direction of title but I want to restrict the car movement along the road only.
In ActionScript 3 we have hit test between the objects, and i could just use the hit test method between the car and the road to keep the car on the track.
How can I do the same in iPad to keep the car on track? Will I be working at a very low level coordinate based logic or do we have something easier in here to avoid the car getting side tracked?
Do you suggest me to look into cocos2D?
It's a very broad question, kindly answer whatever you can instead of de-voting (as happened before), kindly just point out a direction regardless of sorting out an exact/specific answer. Thanks.

Short answer: you will have to calculate this yourself. Pretty much the only function the iOS SDK provides that sort of helps with collision detection is CGRectIntersectsRect()

Related

Making a scrolling floor like in Street fighter 2 in XNA(Monogame)

How would I make a scrolling pseudo 3d floor like in street fighter 2 in XNA(or more specifically MonoGame)?
https://gyazo.com/ea78954a5d96c3cb522eeac4a6ee5f21
for reference, if you aren't aware what I'm talking about. I Understand the concept of how it was done on the SNES(moving each line of the sprite separately) but how could I achieve the same effect in XNA with today's technology and libraries?
What you need is a simple ViewPort.
A ViewPort basically shows only a little scene from an overall bigger Picture. Like you have it in sides crollers or RPGs. You only see the current scene and not the complete Level/World.
An implementation example can be found here:
http://community.monogame.net/t/simple-2d-camera/9135
It might be a bit tricky to understand everything at the beginning, but at the end you can reuse this for almost any 2D game and several effects (camera shake, Rotation and so on) so it's worth the effort,

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.

SpriteKit: Should I pan the camera or move the background?

When building a game with SpriteKit, with a platformer game (like Doodle Jump for example), is it preferable to move the camera up, or the background nodes down ?
What is the standard practice in other frameworks ?
MOVE THE CAMERA!!!
One of the weirdest things about 2D game engines is that it often takes them a series of versions to get a camera.
They should be born with them.
SpriteKit was no different, it took forever to get a camera.
Now that it has one, never ever think of not using it.
Will make your life a million times simpler.
I can think of no exceptions, but look forward to being proven wrong.
move background was HOTFIX until proper cam support added.
use the cam. its easy and fun. no reason to not imo.

Why cant virtual reality sets (HTC Vive/Oculus) play standard games

Visually speaking, the "displayed image" (in the steam/vive window) looks very similar to any other game being rendered on the desktop. Eg: Counterstrike, WoW, etc.
Question: Why is it then these games don't "feel" like being in a VR environment?
Also, programmatically speaking (image rendering, camera angles, depth field, etc)
Question: Can a non-VR game work with the VR sets as long as you configure the controls to the headset and wands? Eg: Headset = joystick; wand buttons = menu etc.
Thank you.
Edit: Please let me know if you have any reading recommendations on this subject.
The non-VR games simply weren't made for VR.
That said, there are hacks that make non-VR games semi-work in VR. You can check out Vorpx for Oculus, but I don't know of anything for Vive. There will be very big issues and headaches, though.
A lot of things will look bad - like missing graphics as almost all games go through shortcuts so they don't render what you will not see. For example there is no sky in RTS games and the map ends just after the end of scrollable space. Or when you're driving a car in a race game, there probably isn't even more to the car then the dashboard (no seats, back of the car etc). No one should see them, so no one made them.
It's even worse with the user interface of these games, no one had depth in mind when they designed this, so you'll have an ammo counter that makes you cross eyes end such.
I could go on and on with the issues, as this is just the tip of the iceberg.

calculating force, velocity and distance in chipmunk

I am newbie with Cocos 2D, Chipmunk and Box 2D.
I have started basic docs and started to develop games.
Currently I am working with chipmunk.
I stuck at few points And they are as follow.
In my application, there is a player Who kick the soccer ball and ball will move to distance according to force applied by kick of player.
I am confused for ..
How do I make players whole body static and can make his one lag moveable to let it kick the ball.
How do I calculate force and vector and distance etc.
How do i move to next screen if my ball goes to out of current screen.
Please let me know the url from which I can easily get all type of examples for chipmunk application.
First off, you should learn chipmunk first and then try to solve your problem. I see a lot of people just wanting their problem to go away without actually making an effort to solve it. Here's some google results on Chipmunk tutorials.
https://www.google.co.cr/webhp?sourceid=chrome-instant&ix=sea&ie=UTF-8&ion=1#sclient=psy-ab&hl=en&site=webhp&source=hp&q=chipmunk%20tutorials&oq=&aq=&aqi=&aql=&gs_l=&pbx=1&fp=37838802d5e34660&ix=sea&ion=1&bav=on.2,or.r_gc.r_pw.,cf.osb&biw=1680&bih=882
About the 3 questions:
If you learn chipmunk or box2d, you can easily go and test different settings, from static bodys to joints to density. Depending on what you want to do, the solution differs. I suggest you look into that.
You can use several functions on each body you register. For box2d, youd use body->getAngle(), body->getLinearVelocity(), and body->getPosition(). With these 3 functions you can calculater force, vector and distance from every object. Im pretty sure chipmunk has something like this.
Really?? PSEUDOCODE: if (ball.position OUTSIDE screen.bounds) nextLEVEL();

Resources