A problem with airplanes

for Hostile Waters TC

We've got most of the basics figured out for our water based plugin, but we still have no idea how we're going to implement airplanes into the game. One of the main problems is that a plane might go under a boat occasionally without any damage. There are many, many more. It's the same with submarines. We can't figure out a way to make them actually flying. It just doesn't seem to make sense. Thanks for your suggestions.

There's a shadow topic somewhere down the page. As for making them pass over things, I'd think resource IDs would help you somewhere. Be it ship or RLE IDs, I wouldn't know, but I'd think it was something about resource IDs. I'm hoping you aren't giving us any ships to drive, because I think the player's ship is on top of everything.

Then again, it may be the order in which everything is stored in memory, and you can't do anything about it without an engine hack.

Your ship isn't always on top -- if you have a përs or a ship in a düde that has a 100% chance of appearing in a system, that ship will sometimes -- in fact, more often than not, in my experience -- fly over yours.

If planes dont need to be pilotable, or act like ships, they could be submunitioning missiles with explosions that look like planes. This would be for dive bombing and such.... I cant figure really how to make it work though.

Hmm... The shďp resource's "Shots on top of ship" flag causes shots fired by that shďp to be displayed on top of everything. If you could convince the plane to fire an un-guided cannon with a plane sprite, that would solve your problems. Perhaps if the cannon sub-munitioned into a long-range guided weapon?

It would use most of the tricks from rotating turrets, except that it has to be fired forward, so that the plane doesn't point at the closest enemy. 🙂

Edwards

Well, wouldnt it act more like a helicopter then? Even if it were inertialess?

byteme, on Jun 3 2005, 02:08 PM, said:

Well, wouldnt it act more like a helicopter then? Even if it were inertialess?
View Post

If the "sprite gun" fires straight forward, the shot will point in the direction that the plane is flying.

Edwards

PS. I came up with a problem with this method- banking animations are impossible, and they would be a very good thing to have for a plane.

I meant more in terms of variable speed. Might it make more sense for the ship to have zero acceleration and some max speed, and be allowed to hyper out while not stopped?

You come into a system at max speed, right? and if you have zero accel, you cant stop.

(Intertialess, of course.)

It is a pity about the banking though. Hmm...

It would not bother me if the planes occassionally appear under the ships, as long as the game is fun.

It'd bother me. Takes away from the realism of the game. Plus it'd be a problem for them because they'd get boatloads (pun intended) of e-mails about the bug.

How does the Nova engine determine what ship is on top?

erikthered, on Jun 4 2005, 08:17 AM, said:

How does the Nova engine determine what ship is on top?View Post

I'm almost certain that it is based on the internal numbering system for ships in a system- the first ship created is 1, the next ship is 2, etc. This order is also the order that you cycle through when selecting a target ship (and is also important for a minor bug in the ProxRadius field, which I won't go into here. I mentioned it is BugFest '05).

Edwards

This post has been edited by Edwards : 04 June 2005 - 02:52 PM

As am I -- and what's curious is that sometimes you are not the first ship generated in the system -- I've had instances where large, large ships show up on top of me, and other times, in the exact same system, I'll be on top.

Never from behind, though.

UncleTwitchy, on Jun 4 2005, 05:24 PM, said:

Never from behind, though.
View Post

...

I can't believe you.

Anaxagoras, on Jun 7 2005, 02:24 PM, said:

...

I can't believe you.

And I thought I was bad for preventing such thoughts about my posts.

erikthered, on Jun 4 2005, 02:17 PM, said:

How does the Nova engine determine what ship is on top?
View Post

I'm not so sure about Nova, but the previous games were based on SAT (Sprite Animation Toolkit - a sprite rendering and game-management library). By default, SAT sorts the sprites based on their position on the screen. Sprites are sorted by position so that those higher up the screen are drawn before those that are lower down to give a feeling of depth - although you don't really notice this in EV.

Of course, that's just the default - ASW could have used their own sorting system based on something else. 🙂

Nova is based on SpriteWorld. I know that much.

tycho61uk, on Jun 9 2005, 06:49 AM, said:

I'm not so sure about Nova, but the previous games were based on SAT (Sprite Animation Toolkit - a sprite rendering and game-management library). By default, SAT sorts the sprites based on their position on the screen. Sprites are sorted by position so that those higher up the screen are drawn before those that are lower down to give a feeling of depth - although you don't really notice this in EV.

Of course, that's just the default - ASW could have used their own sorting system based on something else. 🙂
View Post

While this does make sense for zelda-esque applications, this method is obviously not used for nova. Take a direlict ship, line up due south of it and fly towards it. If it stacked by position on screen, you would 'pop' behind it just as it passed under you. Cleary, this doesn't happen in nova for any player/ai or ai/ai encounters. The stacking is much more likely to be the order of creation, oldest toppest.