Amount of API specific code

Started by
3 comments, last by chollida1 18 years, 6 months ago
I'm looking for a bit of info on the amount of API specific code in newer console engines. For those of you who have commerically programmed for the xbox, with the games that you write, do you confine all/most of your directX function calls to a single file? Or does it not matter because the game will only run with directX, so there's no need for a single file/class, because there will be no graphics API extensibility? Edit:: This is assuming that you haven't signed an NDA that says "Don't talk about any aspect of any code that you write while working for us. Not at all. Ever. Even a little bit." [Edited by - Endar on October 2, 2005 9:27:44 AM]
[size="2"][size=2]Mort, Duke of Sto Helit: NON TIMETIS MESSOR -- Don't Fear The Reaper
Advertisement
bump
[size="2"][size=2]Mort, Duke of Sto Helit: NON TIMETIS MESSOR -- Don't Fear The Reaper
Well, if you can make your game core API independent (be it graphics API, audio API, platform API) then great. Note you don't have to put all the API specific stuff on a single file. They can be in lots of files, just logically independent from the core.

But really, you shouldn't worry about that unless you need to worry about it. It's the same famous words as with code optimization (and other topics): "you only have to worry about it when you have to worry about it". Now repeat with me. :)

Note that I'm assuming you're a good programmer, so your programming skills are enough to make good code, that won't need major overhaul if you have to port it.

Of course if you know that your game HAS to support both DirectX and OpenGL, then it's obvious you have to make it API independent (instead of making two games *g*). But if you're targeting just one specific platform/API just get the game done and don't worry too much about the porting issues. If you have to port it later, then it's probably because it was successful and you'll have the resources needed to do it.

Hope that helped.
- blew
Okay, I understand that, but I'm also wondering how it is actually done in the industry.

If a company is making a game just for xbox, will they just call directX functions wherever they need them, or will they be kept seperately from the core?
[size="2"][size=2]Mort, Duke of Sto Helit: NON TIMETIS MESSOR -- Don't Fear The Reaper
Quote:Original post by Endar
Okay, I understand that, but I'm also wondering how it is actually done in the industry.

If a company is making a game just for xbox, will they just call directX functions wherever they need them, or will they be kept seperately from the core?


It depends, quite often games are release on multiple platforms so it behoves them to seperate the api code from the rest of their engine code.

Some companies ( EA ) have their own graphics library which wraps whatever api the platform uses.

Cheers
Chris
CheersChris

This topic is closed to new replies.

Advertisement