

 |
Warp 1.5: History
|
 |
A few months before writing this game I happened to find the very
interesting raytracer
application Persistence of Vision.
Interesting because it's free and because it uses a scripting language
which gives the user detailed control of every part of the rendering.
Since most serious computer games developers use raytraced graphics in
one form or other, I figured I should do the same -- just to force myself
to learn how to use the application. (I had experimented a little with
it to create the graphics of Adios, Amoebas!
but that wasn't big enough to count.)
It seemed like a good idea to base the project on an improved version
of my old game Warp, because then I'd be using
known programming techniques and I could concentrate mainly on the graphics.
I had also received a number of suggestions on how to make that game
more interesting. For example:
- Add the ability to move up and down
- Allow for firing and steering at the same time
- Use more than one "bullet"
- Make the levels easier
Apart from that I threw in some desired modifications of my own:
- An altered technique for updating the background, allowing
more flexibility in the way objects are distributed on the screen.
- Replacing all bullets with plain, white filled rectangles, assuming them
to stand out better and be faster to draw in Java.
- Start and end sequences that would give the game more of
a "space" character. (All decent shoot-em-up games should have a special
attack wave or a huge enemy at the end of levels.)
- A proper highscore list, where you can type in your
name. The reason why I hadn't done that before is that the highscore list
is always what I create last -- when I've almost lost interest in the game and
figure "Naah, who needs a highscore list with names? It doesn't get
permanently stored anyway."
- A deterministic random number generator for the backgrounds, making
them "random", yet identical each time.
- Use of AudioDataStream objects instead of AudioClips,
which meant less to download over the net. (See the
sound page for details.)
- An extra control device for three kinds of optional music.
(See the music page for details.)
- A more sophisticated control panel. While trying out different
designs, I realized it would bear an uncanny resemblance to a cellular phone
no matter what, so I went all the way and shaped it like a phone
just for the heck of it.
There is only one part that hasn't been drawn by a computer
and that's the logo. It was just too awkward to draw in any other way
than by hand.
I had originally planned to list the Persistence of Vision
script files I wrote for the graphics, but they probably wouldn't be
of much help to anybody, so I'll settle for just showing the code that
generated the spaceship.
|









|
#declare ship=union{
intersection{
sphere{<0,0,-5>,5
scale <1,1,0.9>}
union{
difference{
box{<5,5,-4>,<-5,-5,-6>}
cylinder{<0,6,-3>,<0,6,-7>,4}
}
box{<-3.8,1.2,-7.4>,<-2,-5,-4>}
box{<3.8,1.2,-7.4>,<2,-5,-4>}
sphere{<0,-1.5,-5>,2.7}
cylinder{<0,-1.5,-5>,<0,1.2,-5>,2.7}
cylinder{<-5,-1,-6>,<5,-1,-6>,0.7}
}
pigment{Gray80}
finish{phong 1 ambient 0.2}
}
union{
sphere{<-3,-0.9,-7.4>,0.5
scale <1,1,1>}
sphere{<3,-0.9,-7.4>,0.5
scale <1,1,1>}
cylinder{<0,-1.3,-5>,<0,0.2,-5>,2.8}
pigment{Red}
finish{phong 1}
}
union{
cylinder{<-1.8,0,-6>,<-1.8,4.3,-6>,0.8}
cylinder{<1.8,0,-6>,<1.8,4.3,-6>,0.8}
pigment{Gray80}
finish{phong 1}
}
}
It's not as complicated as it may look. The ship is just a combination
of boxes, spheres and cylinders, with different colors and textures.
The same applies to most of the other objects in the game.
|
|

|