tips on creating the "Axelay Effect" with out Mode 7

A place for people with an interest in developing new shmups.
Post Reply
User avatar
ShmupSamurai
Posts: 473
Joined: Fri Jan 15, 2010 2:15 am
Location: Texas

tips on creating the "Axelay Effect" with out Mode 7

Post by ShmupSamurai »

As a side project, I'm planning out a shmup/rpg hybrid and was going have an overworld map that your ship flies over. I wanted some tips for creating the fake-3D effect seen in Axelay's odd numbered stages.... :|

Any ideas, thoughts, tips, or suggestions? :)
Use Shumpman's advice!

"USE A BOMB!"
User avatar
Rozyrg
Posts: 918
Joined: Wed Feb 11, 2009 12:03 am
Location: Southeast USA

Re: tips on creating the "Axelay Effect" with out Mode 7

Post by Rozyrg »

Well, I think the general idea would be to first divide the section of background you're displaying horizontally into even sets (say 20 pixels vertically). Higher sections get 'squashed' and lower sections get stretched out more depending on their height. Then you'd just reorder the position of the sections so there wouldn't be gaps or parts that overlap.

Granted, I have no idea how to actually code something like that at this point; but breaking it down in my mind, that's how I imagine going about it. >_>
MSW
Posts: 9
Joined: Mon Aug 15, 2005 10:19 pm

Re: tips on creating the "Axelay Effect" with out Mode 7

Post by MSW »

:oops: I had to look up Axelay vids on Youtube to remember just what the effect looked like :oops:

Looks to me that it isn't perspective correct, more like those "melting screen" tricks used in the early Amiga demo scene stuff. Replicating it depends on a number of factors. What are you programing with (language, DirectX, OpenGL, etc.), game screen resolution, and target platform (modern PC, old Pentiums, iPhone, etc.)

Simplest way if useing Direct3D/OpenGL is to use the 3D hardware to render it for you. 3D model is a stack or grid of quads with either verticies or U/V texture cords modified to reflect the look you want. Then just useing the hardware U/V texture offsets to 'scroll' through the landscape.

If you are comfortable with math you could render the screen out tile by tile by verticaly stretching/shrinking each tile respective of where it fits onscreen...easy with hardware support for this, more difficult if you roll your own routines to do as such. But with modern hardware and even a resonable screen resolution you shouldn't need assembly to do this either.

Another way is to treat the scrolling backgrounds as a bunch of sprites 1 pixal tall and as wide as the background need be. Number these sprites in sequence, say from the top of the background to the bottom. And if you draw these sprites onscreen in a linear fashion, sprite 0 at the top, sprite 1 is one pixel below that, sprite 2 is 1 pixel below that, etc. You end up drawing the background as a flat surface. However if you instead follow a sine wave or a spline instead of a linear function as you "walk" along the Y axis. You can end up with something approximenting the effect you seek.

Hope this helps :D
User avatar
ED-057
Posts: 1560
Joined: Fri Jan 28, 2005 7:21 am
Location: USH

Re: tips on creating the "Axelay Effect" with out Mode 7

Post by ED-057 »

Let's say you're copying a 2D rectangular image, one pixel at a time. The coordinates of the source pixel are x1,y1 and the coordinates of the destination pixel are x2,y2. For normal copy, everytime you increment the source coordinate, you do the same with the destination coordinate. So when x2 increases, x1 does by the same amount. x2/x1 and y2/y1 are equal to 1. A value other than 1 causes a rescaling of the image, for instance increasing the destination coordinate by 2 for every time that the source coordinate goes up by 1 (x2/x1=2) gives an image that is twice as wide.

You can also make the destination y coordinate dependant on the source x coordinate, etc. (y2/x1 and x2/y1) which will cause shearing of the image, or together can be used to rotate an image.

See here as an example, how sprite scaling/rotation works on the GBA:
http://www.cs.rit.edu/~tjh8300/CowBite/ ... ec.htm#OAM (sprites)

In the case of Axelay, IIRC the background is rescaled vertically so that the image appears shorter near the top, and longer near the bottom. So y2/y1 would be less than 1 near the top and the value would (probably by using HDMA on the SNES) gradually increase to something greater than 1 near the bottom. That's assuming that it is really mode 7, it could be another screen mode and they are using HDMA to change a vertical scroll register to acheive the same effect (there is a TG-16 demo that does this)
User avatar
ShmupSamurai
Posts: 473
Joined: Fri Jan 15, 2010 2:15 am
Location: Texas

Re: tips on creating the "Axelay Effect" with out Mode 7

Post by ShmupSamurai »

Thanks alot for the suggestions, I think they'll make my work a little easier(sorta :lol: )

btw, I never knew the TG-16 was capable of that... :o

Really cool to know, shame it was never actually used in a game.(as far as I know)
Use Shumpman's advice!

"USE A BOMB!"
User avatar
Taylor
Posts: 1002
Joined: Thu Jul 03, 2008 11:35 pm

Re: tips on creating the "Axelay Effect" with out Mode 7

Post by Taylor »

The easiest way would be to render your game normally, then take the render as a texture and apply it to a cylinder or long plane. But the thing about Axelay and Mode 7 is, really, it looks rubbish.

Instead maybe consider the effect in Animal Crossing or Deathspank. Which is pretty much the same thing only with 3D terrain.

You can find information about it in the following TIGSource posts, followed by a tutorial in XNA you should be able to appropriate:

http://forums.tigsource.com/index.php?topic=13666.0
http://forums.tigsource.com/index.php?topic=8645.0
http://www.sgtconker.com/2010/09/articl ... -tutorial/
relminator
Posts: 55
Joined: Sat Jun 05, 2010 1:48 pm

Re: tips on creating the "Axelay Effect" with out Mode 7

Post by relminator »

Is it something like this?

Image

I did that by two texture modified planes.

Another approach would be emulating mode7 on sofware which isn't too hard at all.
User avatar
Drum
Banned User
Posts: 2116
Joined: Sun Feb 07, 2010 4:01 pm

Re: tips on creating the "Axelay Effect" with out Mode 7

Post by Drum »

Draw the background on a cylinder and get somebody to turn a crank to rotate it.
IGMO - Poorly emulated, never beaten.

Hi-score thread: http://shmups.system11.org/viewtopic.php?f=2&t=34327
User avatar
null1024
Posts: 3823
Joined: Sat Dec 15, 2007 8:52 pm
Location: ʍoquıɐɹ ǝɥʇ ɹǝʌo 'ǝɹǝɥʍǝɯos
Contact:

Re: tips on creating the "Axelay Effect" with out Mode 7

Post by null1024 »

Just increase the scaling vertically as you are nearer to to the top.
So...

Code: Select all

--------- scale vertically small
--------- 

--------- scale vertically mid

---------


--------- no scale this far down, at least in Axelay


---------


and you would have the scale amounts smooth, rather than banded like in my example.

And other than Axelay, Sonic 3D Blast on the Genesis does this for the special stages [but fails miserably because it also does proper perspective at the same time, so it gives you a headache to look at it].

this is probably a horrid mess of a post to understand ;_;
Come check out my website, I guess. Random stuff I've worked on over the last two decades.
User avatar
louisg
Posts: 2897
Joined: Wed Jul 20, 2005 7:27 pm
Location: outer richmond
Contact:

Re: tips on creating the "Axelay Effect" with out Mode 7

Post by louisg »

I'd expect it to be done on the real hardware by scrolling the image per scanline. So, you might be able to do it by creating a map of what line from the source graphic goes to which line of the screen-- essentially a bunch of x_resolution-by-1 blits. You could create the map by finding what the Z for each line of the screen is, and then mapping each line of the source image to Z. Basically, mode 7 minus the horizontal stretching. A second way you could do it is find the Z by "accelerating" Z into the screen per scanline.

Contra Hard Corps also has this effect during the front-view road scene.
Humans, think about what you have done
Post Reply