This is just bugging me

Started by
5 comments, last by Kilobyte 19 years, 6 months ago
Ok so I was recently thinking about game ports, eg, when a game is ported from PS2 to X-box, now these two consoles are programmed for using two very different develpment environments, so why do the games come out so similiar?
Advertisement
When something needs to be ported, there will be an abstraction between the two different systems.

----------------
| Game scripts |
----------------
|
----------
| Engine |
----------
|
---------------------------
| Specific PS2 Functions |
---------------------------

Instead of writting the whole game over, we simply need to rewrite the sepcific PS2 Functions in XBoX functions.

If the game was not designed to be ported, the programmers will have to search for the PS2 Functions and translate them into specfic XBoX functions. This step may or may not require major rewrites to the internal system, which will make the game feel a bit differently.
I thought a custom renderer had to be written per-console, which made it difficult to port games to different systems if they weren't designed to be ported. But then again, I have no idea, so just listen to what that first poster said.
Things change.
It's pretty much similar to switching APIs. If you design the code so this is easy, there should be no problems.
I teleported home one night; With Ron and Sid and Meg; Ron stole Meggie's heart away; And I got Sydney's leg. <> I'm blogging, emo style
Thanks but i'm still kind of confused, let's say a game's engine was orientated around OpenGL and I wanted to port it over to DirectX, it used OpenGL libaries and the code from those libaries, would I have to change the OpenGl libaries and code to similiar DirectX libaries and code, i.e. re-writing an OpenGl based texture mapper to a DirectX based one?
Pretty much

int MMORPG() {  myCoolAI();  myCoolPhysics();  DrawScreen();  return 0;}void DrawScreen() {  PrepareMyBuffers();  CalculateShadows();  GL_functionCalls();}


Becomes

int MMORPG() {  myCoolAI();  myCoolPhysics();  DrawScreen();  return 0;}void DrawScreen() {  PrepareMyBuffers();  CalculateShadows();  D3D_functionCalls();}


Of course, it can become slightly (read extremely) more complicated since different libraries might require different data and functionnalities can't always be mapped one on one, but this is the main idea.
I teleported home one night; With Ron and Sid and Meg; Ron stole Meggie's heart away; And I got Sydney's leg. <> I'm blogging, emo style
Thanks everyone, I now have much better understanding of how this works. :)

This topic is closed to new replies.

Advertisement