This is a 3D (ok, 2.5D) racing game, where you tilt the iPad to steer left and right, and to speed up and slow down.
It has a track editor shown at the start of the video below, allowing you to push the track into a shape of your choice, then you can race on it (this technique could be used to create a sculpting app).
I’m also looking forward to seeing your tilt steering code. I’ve struggled with tilt steering in the past, because you only seem to be able to access the rotation rate, rather than an absolute value, so the “centre” of the wheel shifts if the user steers past the left or right wheel lock
I’m thinking of billboarding the people, but that means separating them individually from the side panels, so it’s quite a lot of work. There may be a better option.
The crowd is individually animated, there is a mini-map, and a rather crude car front end image that helps with steering. All the images are really placeholders.
I’m not going to finish this game for the competition, because there isn’t a lot of time, and that is all the boring work. Instead, I’m going to write up the interesting stuff in the game on my blog, then I’ll post the link here.
For those who want to try it as it stands now - code
It’s a fixed set of 100 points. When you touch the screen, it takes the direction and dots it with the directions of all the points, and distorts them more if they are close in angle. That’s all.
for i=1,points do --loop through track points
local ti=track[i]:normalize() --get direction of this point
local a=dn:dot(ti) --dot with touch direction
if a>0 then --if on same side of track, then
a=a^(16-Smoothness*3) --adjust for smoothness
--then move point up or down its normal
track[i]=ti*(dLen*a+track[i]:len()*(1-a))
end
end
beautiful
i remember the first car game in 2d “Atari Eduro” by Ruilov
a lot of work to create 3d car game in 60 fps on ipad air
I can not wait to see the buildings on the side of the road ^:)^ ^:)^
--speed is controlled by tilting forward and backward
speed=math.max(0,math.min(maxSpeed,speed+Gravity.y))
--turning left and right is controlled by tilting left and right
--this angle is in radians to avoid needing to convert for sin/cos
angle=angle+Gravity.x/100
Well done @Ignatz another class piece of work. I like the neat way you set draw to equal the function you want to use for rendering (ie managing wether your in the editor or in the game). The only thing I noticed is that if you tilt it too far forward then the orientation changes, I guess you could fix it to either LANDSCAPE_LEFT or LANDSCAPE_RIGHT.
@yojimbo2000 - whenever I’ve seen games that use the accelerometer to control movement it’s usual to have a calibration screen at the start of the game to define some initial reference point (ie hold device still for a couple of seconds) and then calculate distance from this point. Personally I’m not a fan of tilt based gaming but each to their own.
@Ignatz - for what it’s worth, when the voting opens your game is the one that will get my vote. I think out of all the entries I’ve seen so far it’s the most technically impressive and offers the greatest opportunity to learn new skills from.