Page 1 of 1

Parasite Eve Tech - How It's Done

PostPosted: Fri Jul 30, 2010 11:48 am
by Andyfer_Ruu
Hello to all that read this thread!
This thread will be about the tech behind the Parasite Eve games, basically I shall try and explain what they did to create parts of the game.

I wont pretend that I know everything about games creation, so if I get anything wrong, please leave a comment telling me what it is and I'll edit the information.
This will take some time to finish, so I shall add a little bit of information for now, and then add more over time.

I also base some of my information off my own experiences with using a game engine (Blender GE). So if i'm not 100% sure how the pros did it, i will tell you how you could go about programming it in general.

Enjoy!
---------------------------

|Programming|

Playstation 1 games are written using a programming language called "C" along with the Playstation's standard Library.
For those of you who don't know, a programming language is used to create programs for a game or a computer etc. It is what tells the console or PC how to do something.
A library contains all the information needed to help a programmer with things like 3D graphics handling or audio manipulation etc.

C is widly used for console programming, and is familier ground for experienced computer programmers. It is easier making a console game than a PC game, because the programmer doesn't have to worry about supporting sound cards or graphics accelerators. I believe that the PS2 and PSP also use C programming. (I'm not deffinitly sure if the other consoles use it, but chances are they probebly do).

All Parasite Eve games will have been written in C programming language.

---------------------------

|Pre-Rendered Videos|

Almost all games use pre-rendered videos in some form.
"Pre-rendered video" means that the video file was created seperatly from the game, it was not made using the resources on the game disc.
For example, high detail cutscenes (like the opening cutscene when you play the games),
intro videos before the title screen,
and even some backgrounds in Parasite Eve 2 are pre-rendered videos.

If the developers need to make a high detail cutscene for the game, they will model the higher resolution characters and animate them on a computer. They would then save it as a video file and place it into the game disc.

At a certain point in the game, a program will tell the game when to play that video file.

Remember, only the video file goes onto the disc. Not the high resolution characters.
The CD disk woudln't have enough room, and the PS1 would never be able to handle something that complicated.

The PS1's power is very limited, so developers relied more upon pre-rendered files. This is because you can put more (graphic wise) onto a video.
Next Generation consoles use more "real time" cutscenes because they have more processing power, which allows them to do more things with the actual models and effects on the disc.

The videos themselfs are played on a flat mesh called a plane. A plane is a 3D mesh that is completely flat like a piece of paper.
The video is applied to it like a texture (these are called video textures).
That plane is then programmed to display the video on it at a certain point in the game.
The plane itself needs to be programmed to refresh itself a certain amount of time every second. This creates the illusion of animation on the video (normaly there are 25 pictures, or "frames" in one second. The plane would have to refresh itself 25 times per second).

In Parasite Eve 2, some whole backgrounds are video files. When you're going to the Akropolis Tower and you see the helicopter wreckage, that is a pre-rendered video being used as a background.
I don't know the exact details, but I think the video is designed to play a section at a time. when Aya reaches a certain point, a program will tell the video to play the next part of the animation.
However, the background does seem to follow Aya as she moves. So most likely the video plays backwards or forwards when you press the directional buttons. (Don't hold me to this, that is what I would do if I made it).

---------------------------

|Pre-Rendered Backgrounds|

All Parasite Eve games apart from Parasite Eve 3 use this.

To explain this simply, the developers use a picture as a background in the game.
Characters are basically floating in mid air infront of this background, and the camera is positioned in such a way that it gives the illusion of the 3D models being apart of it.

Invisible walls or "boundries" are then placed around the 3D models to stop them running off the edge of the picture.
If there is a wall in the background image, the main character should not be able to pass through it. These boundries also act as a collision barrier to stop that happening.

Any kind of picture, video, or texture, has to be applied to a 3D mesh in order for it to show up on screen. Just like the pre-rendered videos, these backgrounds are also applied to a flat mesh or "plane".

If a character or object has to pass behind something, like a fence for example, a section of the background is applied to a seperate plane as a texture, and then positioned closer to the camera. This gives the illusion of an object passing behind it.

It's all about illusions.

---------------------------

|Reflections|

Games cannot make "real" reflections. It is all faked.
Real time reflections take a lot of processing power, 3D modeling and animation programs can do it because it can take aslong as it needs to calculate the effect as it's rendering the video. That is why an animation takes so long to make.

A games console doesn't have the power to give you real time reflections. This is because it has to do everything on the fly.
It has to make tons of calculations every second to display everything on screen. It has to track every object in a level, all while executing other programs so you can actualy play.

I'll list one or two tricks games developers use to fake reflections.

One way is to link a 3D mesh to a camera. This way, the mesh displays what the camera can see.
A great example of this is on Parasite Eve 1 when the camera pans around New York.
You can see that the ocean reflects the city and the objects above it (It's a very nice looking scene in my opinion).
The ocean is just a flat mesh (plane), it is programmed to display what a specific in game camera can see. I'm not sure of the technical details to be honest, i always have trouble programming it myself.

You can use that same technique to create reflections in flooring and in windows. This is used in Parasite Eve 2, and is noticable when you play the Akropolis Tower section at the start of the game.
In an emulator, you can change the settings so you can see the meshes used in game. There is one mesh under Aya to show the floor relfection, and one to the side which shows window or wall reflections if there are any.

They did this by "parenting" a plane to Aya's character model. Parenting is when you can make an object follow a different object no matter where it moves to (like if a character has a necklase around their neck, the necklase is parented to the character).
The floor reflection mesh is parented under Aya, it also has transparency applied onto the mesh aswell.
That way, the image the camera is displaying onto that mesh looks like a faded reflection.
Of course, these days you can make the entire floor reflective without using a seperate mesh to display just the characters own reflection.

I'm not sure about the window reflections, but I'm pretty sure it's the same thing except it has a directional constraint applied to it. This means the mesh can only move in one direction.
This is only a theory, but i think the window reflection mesh is set to invisable until the main character walks past a window. A "flag" next to the window will detect the main character standing near it and will send a messege to the window reflection mesh - making it visable again.
These days, an easier way to do this is if you assign a camera to the window normaly. That way the window will show the character as they walk past, without the need to use flags or seperate meshes to show the characters reflection.

The last technique i will share with you is used in next generation consoles like GameCube, PS3 and the Nintendo Wii.
Sorry if i missed a console out, but these are the ones that I deffinitly know use this.
Next gen consoles rely heavily on "shaders" to give you it's impressive graphic effects. Shaders determine how something should be drawn on screen, like textures etc.
PS3, WII and most hand helds use Open GL (GLSL) shaders (including the game engine i use myself). Using this, they can make a fake reflection effect that is used to make a metallic sheen (especialy chrome) and water reflection.
bascialy they use a texture as a reflection. When the camera moves, the reflection texture moves along with the camera, making it look distorted as it moves along the mesh. usualy the reflection map is a colour gradiant with metal. But if you want to give it the illusion of reflecting backgrounds, you would use a screenshot of the environment around it instead.

---------------------------

|Animated textures|

All games use animated textures. They're used to make effects like smoke, gun flashes, sparks, and alot of other stuff. It would be a long list if i told you them all.

It works like any normal animation. For example, if an artsit wanted to make a gun flash, they would draw or make a series of pictures. each picture will show the gun flash form and then fade out.
All the images are saved onto one file, that file is then applied to a flat plane mesh.
The animation is programmed to spawn/appear at a certain point whenever it is needed.

Parasite Eve 1 did an impressive thing during the cutscenes in the police car. The background itself is either an animated texture or a video file.
The background creates the illusion of the car moving through the city streets.
On both sides of the wind sheild (front view) are 2 planes containing an animated texture or video showing the reflection of buildings passing by.
All of this was made using pre-rendered graphics. It is a very nice effect if i do say so myself. I havn't seen many PS1 games use that idea.

In parasite Eve 2 they use the same effect on some of their backgrounds too.

---------------------------

|Enemies|

Since Parasite Eve is an RPG game, the battle system is quite straight forward.
Parasite Eve 1's battle system is the most simple. Usualy the enemies have an attack pattern to them, which makes them easier to figure out how to kill them.

The PE1 enemy characters are programmed with a delay/ timer which tells them how long they can wait before it's their turn to attack, or how long to wait before doing an action. In the Blender Game Engine i use, the delay timer uses something called "logic ticks" to determine time.

Once the timer counts to it's programmed time, it sends a signal to the next program it is linked to.

When the enemy attacks, they will "track to" their target, meaning that they will look in the targets direction (or always look in its direction depending on what is needed). Although with some programming you can make a more advanced targeting system.

Depending on distance and conditions, a program will tell the enemy model which attack or action they should use. Each attack is programmed with different conditions, attack damage, and any other effects.
If the enemy is quite a distance away from the target, the computer will measure the distance between the target and itself, it will then search for a condition for a long range attack by using the distance it measured.
Example:
If the Rat is more than 3cm from Aya Brea - Execute long range attack program.

Most enemies are programmed with an attack pattern though, meaning they will repeat the same actions over and over in a loop. The crocodile boss is a good example of this.
The crocodile will use it's tail to attack, and then charge at the main character to deliver a close range attack with it's claws.
Of course, sometimes it doesn't follow this loop exactly, but generaly it does.

This is so the player can predict its actions and exploit the moments when it's open to attack, after all you wouldn't want a game that's too hard to play - it also introduces a strategy element.
In the game engine i use, this would be done by using "control states"
Think of a state as a page in a book. Page one contains a timer and the attack it should do after the timer runs out. After the attack is executed, a messege is sent to the characters controls telling it to switch to state 2.
State 2 will be like the next new page in that book - a blank slate - ready for the programmer to say what the character should do next.
And using these states, you can create an attack loop.

PE2's attack system is more advanced (I prefer it) There is no attack timer this time, meaning that the enemies will attack you in real time.
One of the first enemies you encounter uses the "tracking" method mentioned above, this means it will always face the target - which means it will also follow it when it starts to walk/run. Once it gets to a certain distance (in this case) it executes a short range attack, waits a few seconds and then repeats.

It's quite difficult to describe how it's done, but it's quite easy once you know how.
Since I'm not sure how Square Soft would of programmed it, I'm telling you how you could go about doing this in general.
Games companies don't usualy give away their source codes you see (it is illegal to rip any part of the source code off the disc anyway).

---------------------------

|HP, MP or Parasite Energy Bars|

HP, MP, Parasite Energy, and values in general are programmed using variables or properties.
Things like how many bullets you have left and how many items you have etc uses this aswell.

Basically the property or variable will keep track of how much something is worth.
Example:
HP = 20
This means that the character model has a property/varible called HP and it's value is 20.
So, to put it simply, the character has 20 HP.

From here you can add sub programs to add more effects to it.
Example:
If HP = 0, play a death animation
If MP = 0, disable parasite energy attacks
etc.

Weapons and attacks are programmed with values that tell the computer how many attack points to take from a targets HP property.
I would do this by sending "messages"
This means if an enemy attack manages to touch a character model, it will send a "messege" to that same character - telling it to lower its HP by a set amount.

It is the same with items. If you use a healing item, it sends a messege saying to raise the targets HP.

Almost everything within a game is controled using variables and properties like this.

---------------------------

(more coming soon)

---------------------------

Re: Parasite Eve Tech - How It's Done

PostPosted: Wed Apr 04, 2012 3:21 pm
by Chai
Hi! Did you rip 3D models from Parasite 1 and 2?
I'm looking for this and find a thread by you: http://facepunch.com/threads/1080117

I can extract this: Image
You can see a Chaser and Madigan textures xD

Re: Parasite Eve Tech - How It's Done

PostPosted: Fri Jun 15, 2018 10:16 am
by Sharppy