Jump to content
  • entries
    106
  • comments
    796
  • views
    139,543

Final Defense

Sign in to follow this  
vdub_bobby

1,016 views

I DON'T THINK I've ever shared this unfinished project.

FD20061003.bin

blog-6060-1173134513_thumb.png

 

The concept:

You man an anti-aircraft turret located in the center of a besieged city. It is up to you to defend your city from enemy aircraft.

 

Very loosely inspired by Fighter Pilot.

 

Details/dreams:

-would use a crosshair to aim. The crosshair would be free-moving, the screen would scroll when the crosshair reached the edge of the screen

-use 24+ pixel width sprites for enemy aircraft

-changing weather/visibility conditions

-have a very robust 3D engine underneath it all, enemy fighters would approach from the horizon, pass over the city, bombing buildings that they passed over, and then fly back over the horizon.

-city buildings stored in RAM so that you can see which buildings are still standing. When they're all gone: game over.

 

Why I stopped working on it (besides usual reasons of lack of time, etc.):

-I really, really, really wanted the city buildings to have a parallax effect. I could not figure out how to do it (with the playfield).

 

Any brilliant insights on how to display (at least) three rows of parallax-scrolling cityscape that (a) doesn't constantly flicker and (b) spans at least 80% (128 pixels) of the width of the screen?

Sign in to follow this  


12 Comments


Recommended Comments

Very cool!

 

I'm sure you could use this for something in another game if you don't finish this idea. :)

Share this comment


Link to comment

It looks like you've already done a scrolling effect on the gray playfied objects. What I don't understand is why the near plane is moving slowly while the successively further planes are moving faster (until the very far horizon which is moving slowly like you would expect). I think you have a conundrum if you want to satisfy your design goal on the 2600.

 

If you are trying to avoid the chunky scroll of the playfield in your city planes, the maybe obvious approach is to cover up the leading and trailing edges of your city blocks with sprites. You would have to use a Galaxian style trick in order to replicate the sprites. So replicated sprites cover up the chunky scrolling and you fill in the middle parts with scrolling playfield. Right, I'm sure there's a crunch on cycles with this idea because it looks like you also need some extra time to setup the asymmetrical playfield. Now we've all dreamed of a world where the playfield was just a little wider and had smooth scrolling.

 

For the big sprites, I have some nifty code. I should post up a demo.

Share this comment


Link to comment

It looks like you've already done a scrolling effect on the gray playfied objects.

I did a scrolling effect, true, but the city planes don't overlap and I don't think it looks very good.

 

I did some more thinking on this last night and possibly I could get them to overlap by using sprites for the near and far planes and PF for the middle plane. Maybe.

Share this comment


Link to comment
What I don't understand is why the near plane is moving slowly while the successively further planes are moving faster (until the very far horizon which is moving slowly like you would expect).

It's because you are rotating, not moving parallel to all the observed objects.

 

Think about this:

What you see is an arc:

------horizon-------
\o1			   /
 \			 /
\		 /
  \o2   /
	You

o1 and o2 are two objects that, together with you, lie in a straight line. As you rotate to the left, those objects will move through your field of vision and and eventually, since you, o1, and o2 are all in a straight line, reach this position:

------horizon-------
\			   o1/
 \			 /
\		 /
  \   o2/
	You

They have the same angular speed (they both moved the same angular distance in the same time) but, since o1 is further from you, o1 must move a greater linear distance, so it must move faster.

 

The large, slowly moving hill should probably just be ignored.

Share this comment


Link to comment

Uhm, when you are rotating, shouldn't all move at the very same speed?

I'm not being completely clear, I guess, but technically: nothing actually moves, not even you! :)

 

But the *apparent* linear motion of further objects is much faster than closer objects.

 

It took me forever to wrap my head around this, but trust me, the city motion is correct. I think. :)

 

Spin a CD. All points have the same angular velocity but different linear velocities: points further out must travel faster to traverse the same angular distance in the same amount of time.

Share this comment


Link to comment

Uhm, when you are rotating, shouldn't all move at the very same speed?

I'm not being completely clear, I guess, but technically: nothing actually moves, not even you! :)

 

But the *apparent* linear motion of further objects is much faster than closer objects.

 

It took me forever to wrap my head around this, but trust me, the city motion is correct. I think. :)

 

Spin a CD. All points have the same angular velocity but different linear velocities: points further out must travel faster to traverse the same angular distance in the same amount of time.

I agree with Thomas. Look into a pair of binoculars and spin around - you don't see the parallax motion like you would see when moving sideways with the same pair of binoculars.

 

EDIT: A camera viewfinder or LCD screen would work just as well.

Share this comment


Link to comment

Fire up Battlezone in MAME and see what happens there. :)

 

Edit: I see where Bob's going with this. It depends on if it's "true" first-person perspective, or a "video-game" first-person perspective, and what your field-of-view is supposed to be.

 

Currently, the far layers are moving too fast. The objects should remain lined up, on both edges of your peripheral vision.

 

So in this picture, points A, B and C are lined up with the center of the screen:

 

FD20061003.gif

 

But when I rotate around, A and B (in red) don't remain lined up, but they should be where the blue letters are:

 

FD20061003_1.gif

 

(This is actually more of a third-person perspective, but I think it gives the effect Bob is after.)

Share this comment


Link to comment

Fire up Battlezone in MAME and see what happens there. :)

There is foreground/background parallax with Battlezone, but I wouldn't necessarily rely on it as all of the foreground objects move in lockstep regardless of their distance.

 

A better gauge would be a modern 1PP game.

Share this comment


Link to comment

There is foreground/background parallax with Battlezone, but I wouldn't necessarily rely on it as all of the foreground objects move in lockstep regardless of their distance.

But it may give the effect Bob is after. (See edited post, above.)

Share this comment


Link to comment

Spin a CD. All points have the same angular velocity but different linear velocities: points further out must travel faster to traverse the same angular distance in the same amount of time.

Sure, but when looking from the center, they are also further away and looking smaller by (about) the same amount their speed increases. Therefore their "visible" speed is about the same as for closer points.

 

Nathan's pictures explain the correct physics very well.

Share this comment


Link to comment
Nathan's pictures explain the correct physics very well.

Yes, and to the extent that the binary doesn't do what Nathan's pictures show is programming error.

Share this comment


Link to comment
Guest
Add a comment...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...