Page 1 of 2

World Aviator!

Posted: Sat Jan 14, 2012 9:39 pm
by Jack
World Aviator is a little top-down flight game I've been working on for the past two weeks. It has landing, crashing, refueling & two maps!

But it also doesn't have a rotating plane image, sounds, a working speedbreak or a map changing menu.
It still needs a lot of work!

Controls:
A to turn right
D to turn left

W to throttle up
S to throttle down

E to raise flaps
Q to lower flaps

T to raise landing gear
G to lower landing gear

1 & 2 to switch between maps.
1 is for USVI & surrounding islands
2 is for BETA ISLAND

While landed, press F to refuel.
L8NOl.png
L8NOl.png (80.95 KiB) Viewed 428 times
Try it out!

Re: World Aviator!

Posted: Sat Jan 14, 2012 10:40 pm
by bartbes
Four remarks:
  1. You can't steer and change the throttle at the same time, perhaps some elseifs that are supposed to be ifs?
  2. You can't see yourself on the minimap.
  3. Being able to land anywhere isn't as good for my ego when I land on an airstrip.
  4. The plane "blip" doesn't indicate a direction.
Other than that, I like where this is going.
Oh, and, for everyone else playing this: be sure to retract your landing gear while on the ground, fun times!

Re: World Aviator!

Posted: Sat Jan 14, 2012 11:01 pm
by Nixola
I can't see the first map, I'm on a giant, blank, white land. The second works

Re: World Aviator!

Posted: Sat Jan 14, 2012 11:41 pm
by Jasoco
Power of 2 strikes again! Whither thou 0.8.0? Comest and saveth us from this curse!

Re: World Aviator!

Posted: Sun Jan 15, 2012 12:01 am
by Jack
bartbes wrote:Four remarks:
  1. You can't steer and change the throttle at the same time, perhaps some elseifs that are supposed to be ifs?
  2. You can't see yourself on the minimap.
  3. Being able to land anywhere isn't as good for my ego when I land on an airstrip.
  4. The plane "blip" doesn't indicate a direction.
Other than that, I like where this is going.
Oh, and, for everyone else playing this: be sure to retract your landing gear while on the ground, fun times!
I have that issue too, when it comes to steering most of my code is "if k == 'a', direction=direction+1" type stuff. What would I do to allow multiple keypresses?

For landing on the airstrip, is there some way to detect what color is underneath the plane, or would I use a hit detection type setup?
Nixola wrote:I can't see the first map, I'm on a giant, blank, white land. The second works
Seems weird that it wouldn't show up, is there a "landmass.png" in the map1 folder?

I don't know if this would be an issue, but are you using the 0.8.0 love files?

Re: World Aviator!

Posted: Sun Jan 15, 2012 12:17 am
by Nixola
I tried both love and love-unstable (after reinstalling it, it removed itself '-'); with love I have the issue above, with love-unstable (0.8.0) the map is white. And it doesn't read keyboard input. I think I'll extract the .love file tomorrow, it's 1:17 AM here

Re: World Aviator!

Posted: Sun Jan 15, 2012 12:21 am
by bartbes
Jack wrote: For landing on the airstrip, is there some way to detect what color is underneath the plane, or would I use a hit detection type setup?
You could use ImageData:getPixel, or indeed compare against a few defined rectangles.

Re: World Aviator!

Posted: Sun Jan 15, 2012 12:53 am
by Jack
I saw the example about issues with images that aren't divisible by 2, I could use that to fix the white boxes issue.

But for the getPixel, I don't really understand how it works. Would I call it in the update function?

Re: World Aviator!

Posted: Sun Jan 15, 2012 11:27 am
by coffee
Nice work so far. Interesting project for LOVE portfolio of games.
It's for now a bit strange we start landed in plain sea. Bartbes suggestion will fit as a charm for land/sea/runway detection!
be sure to retract your landing gear while on the ground
Wait, shouldn't we retract the landing gear only in air?

Re: World Aviator!

Posted: Sun Jan 15, 2012 12:04 pm
by bartbes
Jack wrote:But for the getPixel, I don't really understand how it works. Would I call it in the update function?
If you've loaded the map as ImageData, and you want to check if a certain pixel is runway, you use getPixel to find the color value at that spot, and compare it to the runway color.
coffee wrote: Wait, shouldn't we retract the landing gear only in air?
Which is exactly why you should try it.