PlayStation Power: Net Yaroze Mission Impossible?
August 07, 2021, at 03:01 AM (0 comments)
Title: PlayStation Power: Net Yaroze Mission Impossible? Author: mgarcia Date: 2021-08-07 03:01 +0200 Tags: Media Comments: Open
|
Available in Spanish.
PlayStation Power Magazine, Issue 13 - May 1997.
Main article: Yaroze - Mission Impossible?
By Daniel Griffiths (Production Editor).
Introduction.
This is a huge article! 6 full pages, crammed with a lot of pictures, technical spec's and information. It is by far, the most concise and detailed article I've read on the Net Yaroze, mentioning Ken Kutaragi and PlayStation history, including the fable Nintendo PlayStation! Although it doesn't talk directly about the videogame or game development industries, it does however compare the Net Yaroze very fairly to the professional development kit.
To me, it reads like Daniel Griffiths was (and possibly still is) a programmer, he mentions having used an assembler, and probably with access to the professional PlayStation development kit, which is shown in two images. I guess he had a Net Yaroze for a few days and had first hand experience with it, maybe even taking it apart for a cheeky internal photo shot?
There's also some programming at the end which describes the making of a simple Asteroids game, surprisingly in very good detail, almost like a tutorial! To my knowledge Daniel Griffiths' Asteroids game was never uploaded to the European Net Yaroze server, which would be ironic considering what he wrote about hoarding your creations.
There are a few minor grammatical and editing errors here and there. Also a few UK informal terms, which I've annotated to make clear. And of course, it goes without saying, it has that 90's British humor! 😃
A high resolution image (7Mb) can be viewed here of the code and handwritten notes, the printed text is easier to read then the handwritten notes unfortunately.
The Mission Impossible theme is pretty clever, leading up to the inevitable question, should you buy one?
Funnily enough, the magazine copy I bought had the "Is the Yaroze for you?" brutally removed!
I can imagine a young adult impatiently cutting it out, and using it as motivation, and putting it in a high school or university notebook, and reading it and salivating over it in classes. Or they removed it for the reverse side "Interested?" section, which has ordering information! 😃
But, we'll never know!
The missing sections was kindly scanned by Derek da Silva.
PDF version is available here.
Enough with the informal banter, enjoy!
Mike.
Page 4 - Index.
Black Magic - All you need to know, from the pros and cons to step-by-step game creation.
Should you buy this seductive black box?
What does it do when you get it home?
All you ever wanted to know but were too baffled to ask.
Yaroze - Mission Impossible.
Page 61.
Your mission, should you choose to accept it, is to use Sony's new Net Yaroze PlayStation to program the next PlayStation block-buster. Peace of cake or mission impossible? Daniel Griffiths investigates...
It's NOT 64-bit. It's NOT Sony's answer to the N64. But it IS an extremely interesting piece of hardware, the implications of its arrival are tremendous and it might just make you famous...
It all sounds a little too good to be true. You've seen the pics. You've read confusing news stories. You've waded through turgid interviews with industry nobodies and now, as the finished UK Net Yaroze system goes on sale, the question remains. What is the Net Yaroze and is it any cop? [cop - UK informal, meaning: not very good.]
The Net Yaroze (pronounced Yah-Row-Zay, incidentally) costs £549 pounds and allows you to program your own PlayStation games. Sort of...
[Image: Two pages of the start of the article - Left: Net Yaroze, a PC and code.
Right: Man suspended holding a Net Yaroze in front of a PC.]
The idea is that the Net Yaroze will usher in a new age of creativity, allowing one time gamesplayers to create their own games at home, in much the same way as they did in the early eighties on lesser, now extinct hardware. This could provide the kick up the backside gaming needs after a glut of 3D shooters and racing games.
True, everything you need to program PlayStation games is included in the package but one vital component is lacking - a PC. And it doesn't stop there. This PC will also need Internet access, with all the modem (14,400bps minimum), subscription fees and phone bills this incurs. Seems programming your own PlayStation games could be an expensive hobby. But let's say that aunt Bertha has just gone belly-up, has left you a huge wodge of cash, and you like a challenge, just what can the Net Yaroze do for you?
THE Net Yaroze KIT.
Page 62.
The Net Yaroze comes in two separate innocuous packages, one for hardware, one for software. Tip the contents of both boxes onto your floor and this is what you get.
[Image: high resolution image of the Net Yaroze package contents (minus the software box and misc papers). ]
[Listed in counter clockwise order from the image above.]
- Two-pin continental power supply.
- Three-pin plug adapter.
- A black PlayStation.
- Net Yaroze boot [green] disc.
- Net Yaroze development [silver] disc.
- Two matt black joypad's.
- Black memory card.
- Serial I/O comms cable.
- Composite cables.
- SCART Block.
- Start-up Guide [Red book].
- Library Reference Guide [Green book]
- User Guide [Yellow book].
Is the Yaroze for you?
Page 63.
Imagine a game. Imagine the best game ever. Now curse the fact that you don't work for Sony or one of a thousand other developers and can't make your dreams a reality. It's a similar frustration being in the best band ever and not having a record contract.
Imagine if there was a way that these bands could perform a gig audienced by the bosses of every record company. And not just a one off gig, but one for every time they wrote a new song. And all for a one off £550 pound payment. Every band in the land would gladly hand over the cash. Well this is exactly what the Net Yaroze allows hopeful programmers to do. It's all thanks to the Net side of the deal.
You see the Net Yaroze web site is the ONLY way you can get a game out of your PC and Net Yaroze. You can't cut your own discs to flog down the market. The game exists within your PC's hard drive and is loaded into the black Net Yaroze PlayStation via the supplied serial cable. As far as it's concerned it's loading the game from a CD into its on-board memory. This also imposes another limitation. The whole thing must be shoe-horned into the PlayStation's 2Mb of RAM, the same amount as a standard grey PlayStation and cruelly unaltered for the Net Yaroze. The more you think about it the worse and worse the Net Yaroze looks.
However, this is actually no restriction at all. Think about your favourite games. Think about how often they access the disc. Okay, Resident Evil goes at it every ten seconds but Tekken 2, for example, only loads between bouts, Tomb Raider in between vast levels and, get this, Ridge Racer ONCE at the beginning of the game. The whole game, cars, tracks, everything, fits into 2Mb of RAM.
It's therefore possible for a cunning programmer to create a two character Tekken-style bout, or a single Tomb Raider-style level.
[Image of page with characters from mentioned games above, two images of Sony's UK website, and 11 small images of demos].
The Net Connection.
[2 images of Sony's UK Net Yaroze website.]
It can be argued that the Net Yaroze's Net connection is more important than the hardware itself. Rather than leaving you alone in your spare bedroom in Lowestoft [ an English fishing port and resort town] to create a classic, access to Sony's Net Yaroze web sight lets you meld minds with similarly far-flung geniuses (genii? ) like yourself.
Ask questions, offer solutions, tell everyone about your latest Net Yaroze-related discovery and, of course, stick your finished game on the sight for everyone else to download and play. There are already loads of unofficial web sites for you to pillage or contribute too.
Mind you, you don't have to get involved. You can of course hoard your creations, keeping them shackled in your bedroom for your own personal entertainment but you'd be a miser and a fool in doing so. It's here that you get to air your work to Sony and a host of other watchful developers who have signed up to the Yaroze system, and have a bash on everybody else's games too. And it's all free!
The first part of the web site is packed with info about the Net Yaroze and allows you to order the free Net Yaroze information pack (see below) via e-mail. The second part is for members only and requires the entering of your ID (decided by yourself on your application form) and your password (sent to you by Sony). Pass the test and you're in.
Once inside there are plenty of helpful guides aimed at pointing you in the right programming direction but by far the most tasty bit is the demo section, where you can download hundreds of demos and the work of fellow Net Yaroze owners. And remember it's all free.
At present the software available is somewhat less than impressive (finished games are few and far between) but the more owners there are and the more acquainted with the system they become the greater the quality of software on offer.
Here's just a few of the goodies currently on offer.
[11 images of Net Yaroze demo screen shots.]
Graphics demos include some shoot-'em-ups, a few very simple driving games and a polygonal shaded girl you can rotate then 'explode' at the press of a button.
Minimum Requirements.
The minimum specification PC required is a 486 DX2 66Mhz, like the scabby one pictured above. All you need to do is make sure it's got a serial port.
Interestingly having a faster or flasher PC is of no advantage whatsoever. Sure it'll compile your C code faster, a process required to turn your program into a form digestible by the Net Yaroze, saving you a couple of minutes, but the finished results are the same since the code runs on the Net Yaroze. The PC merely holds and transfers the data across via the supplied serial cable.
This means that you might be able to pick yourself up a PC bargain and use it with your Net Yaroze. 486 DX2 66Mhz PCs (now getting on for two years old, which is an age in PC land) are going for around £300 pounds secondhand these days. Why pay more?
Once you get serious about your Yaroze programming you may want to invest in the CodeWarrior development system produced for the Yaroze by Metrowerks who can be contacted on the web (http://www.metrowerks.com).
This makes programming your machine much easier, offering an all-in-one, simple to use Windows 95 solution that also allows you to use a Mac rather than a PC as your host system. The price? At present Sony have an offer where you can have CodeWarrior along with your Yaroze for an additional £90 pounds.
Interested?
Page 64.
There are three ways in which you can buy a Net Yaroze and non of them involve going into a shop and saying “I'd like a Net Yaroze please".
Due to the limited market for the system and the legal side of things (Sony are keeping a firm eye on whether the system takes off and watching out for any emerging stars), Sony are taking care of the entire sales side of things themselves.
Firstly you've got to make contact with Sony's dedicated Net Yaroze department. You can do this by phoning or writing to Net Yaroze Team at the address at the end of this box. Give them the necessary details, ie your name and address and where you heard about the Net Yaroze and they'll send you an information pack with an enclosed application form. This is the ideal stage to mull over your potential purchase. And find the required £549 pounds.
Okay, let's just say that you've got the pack, you've got the cash and yup, you've got your heart set on a Net Yaroze. Well, fill in the enclosed form, scrape up your money and bung it to Sony. Cheques are accepted, helpfully. Within 28 days you'll receive a letter acknowledging your purchase and giving you your vital Net Yaroze ID (which you specify) and password which allows you into the exclusive members only part of the Net Yaroze Internet web site. This is sent separately from the rest of the kit, rather like a PIN number and cashcard combo, but within the next few days the actual Net Yaroze hardware and software packs themselves will arrive at your door. Now you're just about ready to rumble.
The Yaroze brochure is a rather glossy and posh affair.
Fancy a swish Net Yaroze info pack? It's free.
Phone 0171 4471616 or write to:
The Net Yaroze Team
Waverley House
7-12 Noel Street
London
W1Z 4HH
Any disc will do.
NTSC Japan, US, Canada and PAL.
If all that programming malarky sounds a bit troublesome you can always take solace in the fact that your black beauty lacks any type of country code checking. This pesky software routine checks that the disc inserted is from the same country as the machine, preventing the playing of US and Japanese discs on a UK PAL machine and vice versa. With the Net Yaroze the world is your lobster allowing you to buy the latest Japanese and American games often months ahead of a snail's pace UK release. Final Fantasy VII, for example, has been available in Japan (and in the UK via import shops) since February!
The clever Net Yaroze senses the PAL (UK [Europe, Australia, etc]) or NTSC (US and Japan) origin of the disc and wisely chucks out a colour picture for you too. How kind. One thing that it won't do is play gold pre-release discs, but then these are only for use in the software industry (although some have been leaking out into playgrounds across the land thanks to unscrupulous pirates) so don't let that worry you.
[Page image with Net Yaroze brochure, a black disc,
Ken Kutaragi holding a PlayStation circuit board and 4 setup images.]
It's a set up!
1 [Image of Net Yaroze PlayStation with Net Yaroze Access Card held above the first memory card slot.]
Set up your Net Yaroze as you would your normal machine then insert the Access Card. Ownership of the card proves that you're a legit Yaroze owner and without it your Net Yaroze is a useless lump of plastic.
2 [Image of Net Yaroze PlayStation with the lid open and the green boot disc inserted, the Access card is inserted.]
Next step, pop the Net Yaroze boot disc into the PlayStation. When this disc has loaded your PlayStation will sit like a lemon patiently waiting for contact with your PC. But before you turn on the power...
3 [Image of the back of the Net Yaroze PlayStation with the AV cables already plugged in and the Net Yaroze's serial communication cable being inserted into the serial port.]
Plug one end of the communications cable into the serial I/O port on the Net Yaroze. It's on the back y'know. It's the port previously reserved for use by the serial link-up cable in link-up games.
4 [Image of the back of a PC Computer with the Net Yaroze's serial communication cable being plugged into the the PC's RS232 DB9 port.]
Stick the other into the COM port of your PC. This is usually a small 9-pin port but a fifteen pin adaptor is supplied should your crumbly PC require it. Seems they've thought of everything. Clever chaps.
[Continued on the following page.]
5 [Image of a PC computer with the CDROM tray open, the Net Yaroze's PC SDK disc is on the tray.]
Switch on your PC, lob in the Net Yaroze development disc and copy the programs contained thereon, onto your hard drive. Follow the instructions in the Start Up Guide to get your machines working together.
6 [Image of a green screen with (bouncing) coloured balls.]
First job is to send the demo program down the wire into Net Yaroze. Voila - loads of coloured balls bouncing around the screen. Once you know how to load and run Net Yaroze programs it's half the job done.
Inside information.
Page 65.
[Image of a black PlayStation with the top cover and CDROM drive removed, exposing internal circuitry.]
[Text in clockwise direction.]
- Operating system ROM.
This is what really distinguishes the Yaroze from the grey machine.
The new operating system allows for PC contact via the serial I/O port. - The black heart. [Actual article says "Black memory card".]
The Yaroze's central processor is identical to the standard PlayStation's 33Mhz R3000 chip. - Internal memory chips.
From top to bottom there is 512K sound RAM, the 1Mb video RAM and the 2Mb DRAM which is the bit you have to squeeze your programs in. It's all exactly the same as the grey standard PlayStation. Which is a bit of a pity really.
[Top left image of two PC cards - The PlayStation development kit.]
This pile of rubbish is the £10,000 pounds PlayStation development kit.
The sleek and sexy Yaroze makes it look a bit daft doesn't it?
[Image of a computer without a case, the two PlayStation development PC cards are installed, and a CDROM drive (also without a case) is on top of the PC case.]
Internally the Net Yaroze is identical to the grey PlayStation you own already. It has the same processors, the same memory chips, the same CD drive - everything. There are only two differences between the Net Yaroze and your basic model.
- One, it has different boot ROMs and;
- Two it has the ability to bypass the CD drive in serial I/O port via the communications cable.
Oh, and it's black as well. That's it. And it costs £550 pounds?! Sheesh...
More important are the differences between the Net Yaroze and the full-on development system, used by developers the world over to make PlayStation games. These are surprisingly few.
First of all the Yaroze comes as a separate, fully functioning PlayStation rather than as a chunky card for fitting inside a PC. There's also less RAM available (see above) meaning that rather than being able to create huge games then cut it into loadable 2Mb chunks you have to plan ahead to squeeze whatever you want within these boundaries.
There's no extra RAM for debugging, a program that (ideally) runs alongside the C compiler reporting on any errors that have occurred and so on.
Finally the libraries of graphics tricks available is slightly reduced and some intricate modelling routines are missing, meaning that constructing intricate 3D models, such as Tekken characters is currently very tricky, but just possible if you're persistent.
Still, what did you expect for £549 pounds? Beats shelling out £10,000 pounds for the full system anyday!
[Page image with Net Yaroze circuit board, development PC cards,
stack of PS1 games,Ken Kutaragi and 2 setup images.]
Ken Kutaragi.
[Image of Ken Kutaragi, while hand gesturing.]
The Net Yaroze is the work of Sony's Ken Kutaragi. Who the hell's he? Well, he's the bloke that invented the PlayStation. Yup, it's all down to Ken.
Way back in the mists of time, after building televisions, video tape recorders and perhaps most famously the Walkman, Sony founded a TV broadcasting technology division. Ken Kutaragi headed the project and invented an image manipulation system called System G, which was used to produce tacky seventies TV image warping and whizzing effects a la Bohemian Rhapsody.
When Nintendo wanted CD technology for their aging (now deceased) SNES console they asked Sony for help, who wheeled out Ken and the System G team as proof of their graphics know how. When the deal for the CD drive fell through Ken convinced a gutted Sony that he could come up with a console of their own, rather than waste the work he'd already done. Best of all, without the 16-bit SNES ties he could go mad and create the ultimate console. And so the PlayStation was born.
Now he's created the Yaroze - a programmable PlayStation aimed at getting new talent and new ideas back into games. Thanks Ken.
Sure you want a Yaroze?
[Image of 50 PlayStation CD cases stacked, with most games having duplicates.] Tempted by the Net Yaroze?
£550 pounds? is a lot of money and when you add in the cost of a decent, modem equipped PC (£1,500 pounds approx) you've got a £2050 pounds bill on your hands. That's an awful lot of PlayStation games. 51 in fact, and here's what they look like. Still tempted?
Easy as a PC?
Page 66.
So, do you need to be a PC whizz to get anything to happen? Unfortunately the answer is quite possibly. Setting up your PC and Net Yaroze involves letting it know which COM port your modem is on and at what baud rate it transfers data. If you're lost already best rethink that Net Yaroze purchase.
[Image of a PC Desktop]
At present the software used to send programs to your Net Yaroze is a DOS program (an unfriendly on-screen text-based way of communicating with your computer) and Windows 95 (the PC's most popular and friendly operating system) doesn't get a look in. It's a shame because you'll be using Windows 95 to access the Net side of the deal, uploading and downloading programs, but must then switch to scabby DOS to send them to your Net Yaroze. The Codewarrior system mentioned earlier is a far friendlier Windows 95-based system but remember that this only makes obtaining results slightly easier rather than necessarily quicker or better. The choice is yours.
[Image generated from the Net Yaroze, while it's downloading data from the PC.]
One worthy feature is that included on the PC Net Yaroze development disc is a 28 day free subscription to the PIPEX Internet service provider (after which it's £12.99 a month) and will allow you to get 'on-line' as they say.
Sure, following the Start-up guide will tell you the necessary DOS commands to make contact but even at this stage it's all frighteningly awkward. Round about now getting your Net Yaroze to anything will seem like a minor miracle so getting it to run the demo which Causes 1500 shaded, multi-coloured balls to ricochet across the screen will cause you to crack open the ginger beer in celebration. Initial euphoria over, it's time for the tricky stuff...
Let's start programming.
Net Yaroze comes with a C compiler. C is a fast and efficient language, ideal for games programming. A large number of specially written C functions are supplied to control the hardware, and these, thank Jehovah, take care of most of the hard work.
Source code is compiled within your PC by the GNU C Compiler (or the Metroworks system if you shell out the extra for it), and the compiled code sent to your Yaroze PlayStation by a DOS program called Siocons. This utility will also start the programs running once there are transferred.
In practice, the C source code is entered using whatever text editor you have to hand (even Windows Notepad will do), then saved and compiled. The compilation takes only a few seconds and is the one part of the system where your PC's processor speed will make a difference. Mind you, even large programs will only take a minute or so and with shorties it'll take longer to transfer the data to the Yaroze than to compile.
Separating the system used for writing the code and the system used for running it, makes for an ideal development system. No matter how bad the bugs in your program, the PC will never crash. You can also make use of the GNU debugger utility to examine your code line-by-line, or simply insert print statements at vital points - these can be used to display the contents of in-game variables (life remaining/ammo/screen position) on the PC screen.
The powerful libraries supplied means that programming the PlayStation is remarkably easy; much simpler then programming the PC or Amiga for example which require you to do so much more. If you want to dig deeper, it's possible to program the PlayStation in Assembler directly - although I think I'll leave that for the time being...
[Image of a windows 95 DOS console, running Siocons and sending data to the Net Yaroze.]
[Page image with a PC Desktop, Net Yaroze loading screen,DOS Siocons terminal,
2 demo images and images of the first 3 steps of making a PlayStation game.]
An introduction to PlayStation graphics.
The PlayStation has some amazing graphics facilities, and these are all available to the Net Yaroze programmer. The core of the graphics system is the Framestore [VRAM]. All the sprite and texture information is kept in the Framestore, a separate area of memory which the CPU can't access directly. Special library routines are used to copy data to the Framestore and to create all the objects you need to display.
The graphics hardware includes direct support for double-buffering (to keep your graphics smooth and flicker-free), and because you can give each object a priority, it includes depth-cueing so that objects which are further away will be hidden by those closer to the player.
Most programs will run on a frame-by-frame basis: that is, all the code will be executed in the time it takes for a video frame to be displayed. There are plenty of other advanced features too, such as the ability to use transparency, and making your objects fade into the distance as they travel away from you. You can also make use of the 3D engine [a framework] to display solid or texture-mapped 3D objects. The PlayStation also has a 24-bit mode for displaying images with over 16 million colours. As far as we are concerned, this is for still images only (intro screens etc). If you have a video digitiser you can use this. facility to get pictures of yourself into the action!
[Two images, anime sprite demo on the left and 3D spaceship demo on the right.]
Fifteen steps (and six hours) to writing a PlayStation Game.
Step 1 - Sketch out the game plan.
[Image of paper with a drawing of a screen (box) with shapes with directional arrows and text resembling pseudo code.]
The first step to creating a game is to have a rough idea of what you want. Obviously the game will change and evolve as you are writing it, but having a good plan will help you determine what your goals are, and what is actually possible with the PlayStation's hardware. By sketching out what actually happens in the game, you can get an idea for the programming involved and start to piece together the "logic" behind it all. We decided to build a game based on our old arcade favourite (and easy to program) - Asteroids.
Step 2 - Design graphics for the game.
[Image of the Photoshop application with images a rock shape and a triangle spaceship.]
As we all know, graphics are of paramount importance. The look of a game sets the scene, so it's worth spending time on this part (as we obviously didn't). You need to design the appearance of every object which appears in the game, either on paper or using a graphics program such as PaintShop Pro or Photoshop. At this stage you also need to decide upon the resolution of graphics mode you are going to use and the number of colours which are to be displayed. Sprites can either have 16 or 256 colours.
Step 3 - Work out the game logic.
[Image of handwritten pseudo code - 5 steps for handling rocks.]
So. Asteroids. How do the rocks move? Well, they are sprite objects so they have an X and Y co-ordinate. This all needs to be thought about and planned out before you can even begin any real programming. We'll make them drift around the screen until they get to the edge, and then start again. At this stage we need to write down how the game works - not in programming language, but in a plain step-by-step way which makes sense. A flowchart, if you will. It'll make writing the actual program much easier in the long run.
Page 67.
Step 4 - Write the skeleton game code, zap it to the Net Yaroze and test it.
[Image of a screen displaying "HELLO WORLD!".]
It's time to get the Net Yaroze up and running. The link between the PC and the Yaroze is a serial one, and by default this is 9600bps - not amazingly fast. If you have a memory card in slot two on the PlayStation you can store other default speeds - up to a much faster 115200. The first program is a very simple one, and is only to check that everything is working properly. The C compiler is called with the “Make” utility, and the “Siocons” program is used to blast the data to the PlayStation and start it running.
Step 5 - Design data structures.
[Image of Notepad with source code displaying rock, bullet and ship data structures.]
With a language such as C, it's important to spend time designing the data structures which will hold vital information about the elements in your game. For example, each rock in the asteroids game will need to remember its position (the X and Y co-ordinates), the direction in which it is moving, and its status (blown up, a large rock or a small rock). As there will be more than one rock, we create an array: which is a "super variable" able to store this information for all the rocks we need.
Step 6 - Convert graphics into suitable binary code.
[Image of a Photoshop window containing the ship in a grid, next to a Notepad window with source code of a structure populated with hexadecimal numbers.]
All the graphics which we so carefully designed need to be converted into data suitable for inclusion into the program. The Net Yaroze system comes with utility software to convert images stored in familiar format such as BMP into the PlayStation's own format. In this game however, we'll do it by hand - converting each pixel in the graphic into a suitable number. These numbers are included, in a special order, in a C structure which will define the shape. Tricky sounding, yes, but quite logical in practice.
Step 7 - Write code for moving the rocks.
[Image of 3 red and brownish rocks.]
Now we can start the real programming. Using the game logic we sketched out the programming isn't as hard as you might think. C [programming language] is quite a straightforward language and a lot of the code is simply concerned with initialising the sprites. The Yaroze comes with a large library of functions which perform all the vital work, such as drawing the sprites or reading the controller. Up to now it's taken about two hours, and most of that is spent trying to find the necessary libraries in the reference books which cleverly aren't in alphabetical order!
Step 8 - Write code for moving the ship.
[Image of one red and brownish triangle shape, the ship.]
The PlayStation hardware is capable of many tricks. One of them is the ability to rotate a sprite by a given angle - this makes moving the player's ship very easy. All we need to do is read the controller, check to see if the left or right buttons are pressed, and if they are, increment or decrement the angle of the ship sprite. The PlayStation will change the sprite graphics for us automatically. It's also possible to scale the sprite up or down for instant 3D effects, but we'll leave that for the time being.
Step 9 - Write other routines.
[Image of Notepad displaying the bullet handler.]
The final element in our Asteroids game is the player's bullets. Once again, these are simple sprites. The tricky part is working out which direction to move them - but if you remember your GCSE maths you will realise that we can use Sin and Cos to convert the angle of the ship into values required to alter X and Y position of the bullets. The rest of the bullet code is concerned with updating their position. Oh, and making sure the player needs to let go of the fire button before firing again - we don't want to make it too easy.
Step 10 - Write other routines.
[Image of Notepad displaying an infinite for loop - the main game loop.]
We need to add a few other features to the game: for example, the player's score and number of lives is easy, as we can use a very similar function to the C language's own “printf”. If you use an ordinary printf, the text is displayed on the PC's screen: this is great for debugging the program.
We also need to write the collision detection routines, as the PlayStation sprites don't include this facility. This requires quite a lot of tricky coding - it's taken us about three hours and some unnecessary hair-pulling to get this far.
Step 11 - Add sound effects.
[Image of a windows 95 DOS console listing of C:\PSX\BIN folder and aiff2vag output.]
With the bulk of the game completed, it's time to turn our attention to the sound effects. Once again, the Net Yaroze library contains all the functions we need to trigger the sound effects when the player fires, or when a rock is hit or even for creating our own musical soundtrack. Utilities are provided to convert standard PC WAV files into PlayStation format so you can easily sample your own effects via your sound card or use any of the millions of 'blips' and 'ftangs!' you have cluttering up your hard drive.
Step 12 - Add different phases to the game.
[Image of PlayStation Power magazine logo.]
Currently the game all runs within one loop: when you run it, the game starts at once and you're fighting for your life. We need to expand this to provide several phases. These include a "Press Start to Play" message, the game itself, a High Score table and maybe even an attract mode. You can also start to play with adding different levels of difficulty, and even secret options. Let's stick with something pretty simple for now, such as the displaying of a famous logo while we're waiting for someone to hit the start button.
Step 13 - Add music.
[Image of a windows 95 DOS console listing of C:\PSX\BIN folder and aiff2vag output.]
The PlayStation can play music directly from CD but we're not able to mess with that bit thanks to the fact that the CD drive is entirely out of bounds. Phooey. Fortunately we have full access to its MIDI synthesiser. If you want to add some music, utilities are provided to convert Standard MIDI Files into a format which the PlayStation can play directly. This means you can use any MIDI sequencer program to compose music especially for your game.
Step 14 - Add special effects.
[Image of a toaster, with 5 frames of fire shooting up.]
After five or six hours, we are definitely into the polishing stages. Time for some special effects. When the player's ship is hit, we need a huge explosion - this can be achieved by drawing ten frames or an orange fireball growing and dispersing, and replaying this several times simultaneously.
We can also add twinkling stars or even a background drawing to liven up the graphics a little.
We set it up to display this frame for a moment, indicating your demise.
Step 15 - Finished!
[Image of an Asteroids game with "PROGRAMMED FOR PLAYSTATION POWER" on the bottom.]
With everything finished, it's time to take a well earned rest and show our blockbuster to the rest of the world. You can do this in two ways: get all your mates round and show them, or upload the finished game to the Net Yaroze Web site and share your work with other PlayStation programmers. This is the best way to get feedback, pick up some hints and tips and maybe even get discovered by a major software house.
Good luck!
So should you buy one?
[Image of the lit fuse next to a BOMB with a pain face covering it's ears.]
So should you buy one? Only if you know a thing or two about C [programming] and PCs and fancy replacing all your existing hobbies with Yaroze programming! If that's you, good luck. The world awaits.
End of article: Yaroze - Mission Impossible?
PlayStation Power Magazine, Issue 13 - May 1997.
By Daniel Griffiths (Production Editor).