It looks like you're new here. If you want to get involved, click one of these buttons!
This is my work-in-progress game, Plane Crazy.
I hesitate to call it a flight sim, since the world view is all top down and very simple. Behind the scenes, the math is not too bad -- incorporating drag, lift, etc. So the behavior of the plane is moderately realistic (though not based on any particular plane). Game play is designed more around the old Dreamcast game, Crazy Taxi, in which you try to reach targets before the time runs out. In Plane Crazy, the timer represents fuel, so you race from one target to the next trying to keep your engine humming along.
It can lead to some amusing behavior, such as running out of gas only to glide to the next target and hear the engine kick in again. You can even throttle down to nothing in mid-flight, saving fuel for times when you want to run up your altitude.
There's still clearly a lot of work to be done. The instruments all look pretty good, but the world is nothing but some squares and a few very regular "forests." Since meshes have proven to draw very, very quickly, I think I can toss in a few thousand more trees and maybe some other items before the performance really takes a hit.
I'll have the code up soon.
Comments
AWSOME! Did you start this for my competition? This is amazing. You should change the subject to competition to enter it into the competition :-D
Where are da bombs? - Oh, this IS da bombs!
Great work!!!
Sort of. I was fiddling with the gauge and chart classes I made earlier and came up with the artificial horizon display. That got me started on the other controls -- the clipped numbers for the altimeter, the speedometer dial. And of course, once I had instruments, I had to have a plane.
I think it would be quite possible to do a decent job on a POV 3D flight sim, but I didn't think I could get it together by the 18th.
Good. You put it in the competition category. By the way, it's almost as cool as the Google Earth flight simulator>
Great work! Are you using sprites for the instruments or drawing from primitives? They look really good.
Yeah the instruments are great. I love the analogue numerical dial.
Also like the fields scrolling past. Gives a real sense of scale.
Thanks. The instruments are drawn from primitives. As has happened so many times with Codea, I started off with "gee, I'll do it this way until the performance sucks" then never had to change,
And the code, in a few easy pieces. You'll quickly see that 1) there's a lot of duplicated code among gauges that really should be in one piece, 2) there are a lot of numbers in there meaning that as-is the code WILL NOT work on another screen size, 3) I'm still fighting to keep things straight with multiple uses of rotation and translation. I'll keep knocking those things around. In the meantime, here's the first draft.
Deleted -- see new version below
Deleted -- see new version below
Deleted -- see new version below
Deleted -- see new version below
Deleted -- see new version below
For what it's worth, my record flight time is 630, but I expect it's possible to keep flying nearly infinitely if you manage your fuel and build up altitude when possible.
Have fun.
Thank you. You always make incredible things.
I already pasted the code but I got an error at line 79 in main program about "compare number with nil".
To solve the error, I mark the line 78 as comment and it works.
EDIT: Another solution by not marking as a comment in order to read the highest score
I'm definitely going to try this one out. After working on my shape explorer, I had the idea of using the iPad itself as a control device, measuring the pitch and yaw, but I got too busy to pursue the idea. So I'm excited to see someone's done it.
oh wow! i cant find my answer in the code so... a very bisic question @mark :
how do you basicly do the map-drawings (not the little map, the big map where the plane is drawn on)? by drawing simply everything and translating it by the plane position? or are the out-of-screen-elements not drawn? I am interested in this me because i tried something comparable...
@sanit -- thanks. I inserted that line for reading the high score, then never went back to test what happened if it wasn't there.
@Maxiking16 -- I'm using meshes, with rotate, translante, and scale (although I think scale is commeted out in this version) to adjust to the plane's position. The big map itself is actually a stack of meshes -- one for the square "ground" rects, one for the tree textures. one for runways. Then on top of that are some features drawn with primitives, like the details on the runway. Then there's the plane, which is actually not quite at the center of rotation because I wanted to give you more space to see "ahead" than you'd get with the plane at the center of the screen. And the sprite for the plane itself is rotated 180 degrees. So I frequently get lost in mental fog thinking "okay, so the plane is heading north northeast. Now... what do I do with the meshes, and why is the mini map upside down?" I can tell you that, compared to iterating through arrays of sprites or primitives, meshes draw MUCH faster.
@Andrew_Stacey You should see the original test. Not only did I use the iPad for pitch and yaw, I used acceleration for the throttle. So to make the plane go faster you had to actually get up and move, and if you slowed down the plane slowed down. I may put a switch in there to turn that feature back on, but it does make it hard to play the game without an open space the size of a football field.
Please do, I love the acceleration idea
Ok, here we go with version 0.2.
1) This one should work much better with devices of different resolution.
2) The terrain is more varied and colorful, with 2000 bushes, 3500 trees, "sandy" areas, rocks, water, etc.
3) Gameplay balance has been tuned up, so that planning your next target, adjusting the throttle, and careful attention to altitude and speed pay off in prolonged play. (I hit 900... Beat that.)
4) That crazy acceleration control mode is in there for people who have a parking lot handy and don't mind people seeing them run around with an iPad held out at chest level can give it a go.
And... I think that's about it. If someone can test performance on an iPad 1 that would be great. I kept cranking up the number of ground features until the iPad 2 started to stutter, then backed off a few thousand items. I can't tell you if an iPad 1 would be silk or a slide show.
I deleted the code above because there was some rearranging. If no one spots anything serious in this version, I'm counting this "official" and working on updates of orb-bits and Sprite Invaders between now and Saturday. Thanks.
My apologies on the length. I'm certain others here could have done it not just better, but more neatly and elegantly. But my coding style really hasn't changed since the invention of rocks.
@Mark - Thanks for the code! And by the way, your coding style isn't too bad. It's good enough that I can almost tell what it does without running it.
Will you add an objetive or mission? I like all those control and the ground flow, good job, congrats!
@jaurix originally I had several runways and had all the plane's trips require landing and stopping at those locations. But it was just too tough for starting off. Landing the plane successfully takes too much practice.
So I created the "fly to a target" bit as a warm up exercise. Then I... ran out of time.
I hope no one minds me digging up old projects and making zips of them.
There seems to be a problem with gameplay that I can’t solve: I have to tilt forward to turn the brakes off, but I can’t achieve liftoff without tilting upward, and any time I tilt upward the brakes turn on again!
It doesn’t seem from the above comments like this is how it’s supposed to run; can anyone spot what’s wrong in the code?
@UberGoober Thanks for consolidating these, it’s a very noble task

Tapping on the ‘Pilot’s Log’ it seemed to imply that the brake stuff was intended. I managed to get off the ground for all of about 5 seconds before I stalled at least
I’m happy to say I’ve also added this to codea-community-repo and can now be downloaded and run via the WebRepo project.