Warning

 

Close
Confirm Action

Are you sure you wish to do this?

Cancel Confirm
AR15.COM
5/23/2009 9:05:55 PM EDT
Does anyone here have any experience writing games for their computer? I am working on a project that will eventually end up with me needing to write a FPS game (on the level of Quake of Counter-Strike). I do have experience with programming but have never needed to do anything with 3D graphics. What's the best way to begin?



MAX
5/23/2009 9:08:17 PM EDT
[#1]
Quake is open source now.

I suggest you take a look at how Carmack built that.

There's also a slew of books on the topic.

Start with your basic D3D / OpenGL renderer first, then your worldspace structure (BSP, subtractive solid geometry, importer mesh, etc), and only add the gameplay stuff after you have visuals and a world running like clockwork.

You're kind of diving into the deep end to start with.  Do you have any 3D or interactive programming experience already?
5/23/2009 9:11:16 PM EDT
[#2]
How's your math?
5/23/2009 9:13:02 PM EDT
[#3]



Quoted:


How's your math?


1+1=3




 
5/23/2009 9:14:22 PM EDT
[#4]



Quoted:


Quake is open source now.



I suggest you take a look at how Carmack built that.



There's also a slew of books on the topic.



Start with your basic D3D / OpenGL renderer first, then your worldspace structure (BSP, subtractive solid geometry, importer mesh, etc), and only add the gameplay stuff after you have visuals and a world running like clockwork.



You're kind of diving into the deep end to start with.  Do you have any 3D or interactive programming experience already?


I do have interactive programming experience but have never worked with 3D. At least not yet!




Do you have any idea where to get the source files for Quake?



 
5/23/2009 9:15:53 PM EDT
[#5]
Let me preface this by stating that I am a full-time Software Engineer, specializing in soft-realtime simulation with an emphasis on graphics.

Writing an engine by yourself will take many years of work. Hell, the best engines still take a couple of years with a team of programmers.

I have been working on a D3D-based realtime (soft) engine for the past several years. Most of it is being scrapped in a major refactor I am undertaking to provide a far greater degree of flexability, modularity, and forward-support.
5/23/2009 9:15:53 PM EDT
[#6]
Quoted:

Quoted:
Quake is open source now.

I suggest you take a look at how Carmack built that.

There's also a slew of books on the topic.

Start with your basic D3D / OpenGL renderer first, then your worldspace structure (BSP, subtractive solid geometry, importer mesh, etc), and only add the gameplay stuff after you have visuals and a world running like clockwork.

You're kind of diving into the deep end to start with.  Do you have any 3D or interactive programming experience already?

I do have interactive programming experience but have never worked with 3D. At least not yet!

Do you have any idea where to get the source files for Quake?
 


http://www.idsoftware.com/business/techdownloads/
5/23/2009 9:21:35 PM EDT
[#7]



Quoted:


Let me preface this by stating that I am a full-time Software Engineer, specializing in soft-realtime simulation with an emphasis on graphics.



Writing an engine by yourself will take many years of work. Hell, the best engines still take a couple of years with a team of programmers.



I have been working on a D3D-based realtime (soft) engine for the past several years. Most of it is being scrapped in a major refactor I am undertaking to provide a far greater degree of flexability, modularity, and forward-support.


So you're saying that you'd be surprised if I could learn this from scratch, reinvent the wheel, and get the project finished by the end of the month?




Seriously though, I am not expecting to get this completed quickly nor am I working on it alone. I have a piece of custom hardware that I am working on completing. It will need its own software programmed. That software will need to behave VERY similarly to that of a 3D interactive computer game.



 
5/23/2009 9:28:36 PM EDT
[#8]
Quoted:

Quoted:
Let me preface this by stating that I am a full-time Software Engineer, specializing in soft-realtime simulation with an emphasis on graphics.

Writing an engine by yourself will take many years of work. Hell, the best engines still take a couple of years with a team of programmers.

I have been working on a D3D-based realtime (soft) engine for the past several years. Most of it is being scrapped in a major refactor I am undertaking to provide a far greater degree of flexability, modularity, and forward-support.

So you're saying that you'd be surprised if I could learn this from scratch, reinvent the wheel, and get the project finished by the end of the month?

Seriously though, I am not expecting to get this completed quickly nor am I working on it alone. I have a piece of custom hardware that I am working on completing. It will need its own software programmed. That software will need to behave VERY similarly to that of a 3D interactive computer game.
 


It'd be FAR easier for you to grab something like Quake and create either a wrapper or firmware that uses the quake engine to do what you need.  Unless there's a very specific reason to do so, writing your own D3D engine just for that piece of hardware would truly be reinventing the wheel.
5/23/2009 9:29:15 PM EDT
[#9]
Quoted:
Seriously though, I am not expecting to get this completed quickly nor am I working on it alone. I have a piece of custom hardware that I am working on completing. It will need its own software programmed. That software will need to behave VERY similarly to that of a 3D interactive computer game.
 


Oh shit. Are we talking embedded software here? That's even more complicated.

If this is completely new proprietary hardware, you won't be able to use an off-the-shelf renderer, but will have to write a completely new one from absolute scratch. Which will add even further complications.
5/23/2009 9:30:08 PM EDT
[#10]



Quoted:



Quoted:


Quoted:

Let me preface this by stating that I am a full-time Software Engineer, specializing in soft-realtime simulation with an emphasis on graphics.



Writing an engine by yourself will take many years of work. Hell, the best engines still take a couple of years with a team of programmers.



I have been working on a D3D-based realtime (soft) engine for the past several years. Most of it is being scrapped in a major refactor I am undertaking to provide a far greater degree of flexability, modularity, and forward-support.
So you're saying that you'd be surprised if I could learn this from scratch, reinvent the wheel, and get the project finished by the end of the month?




Seriously though, I am not expecting to get this completed quickly nor am I working on it alone. I have a piece of custom hardware that I am working on completing. It will need its own software programmed. That software will need to behave VERY similarly to that of a 3D interactive computer game.

 
It'd be FAR easier for you to grab something like Quake and create either a wrapper or firmware that uses the quake engine to do what you need.  Unless there's a very specific reason to do so, writing your own D3D engine just for that piece of hardware would truly be reinventing the wheel.


I will look into this as an option as well. I am all for limiting the required work!




 
5/23/2009 9:30:49 PM EDT
[#11]



Quoted:



Quoted:

Seriously though, I am not expecting to get this completed quickly nor am I working on it alone. I have a piece of custom hardware that I am working on completing. It will need its own software programmed. That software will need to behave VERY similarly to that of a 3D interactive computer game.

 
Oh shit. Are we talking embedded software here? That's even more complicated.



If this is completely new proprietary hardware, you won't be able to use an off-the-shelf renderer, but will have to write a completely new one from absolute scratch. Which will add even further complications.







 
5/23/2009 9:34:18 PM EDT
[#12]
Quoted:
It'd be FAR easier for you to grab something like Quake and create either a wrapper or firmware that uses the quake engine to do what you need.  Unless there's a very specific reason to do so, writing your own D3D engine just for that piece of hardware would truly be reinventing the wheel.


Except that, depending on the hardware, that might be even more work, or produce unacceptable results. Consider porting 32-bit code down to a 16-bit architecture or similar. This would entail not only writing new drivers for a common rendering API, but also creating an entirely new implementation of that API for access by the actual engine (which itself would also have to be converted to properly run on the new architecture).

Depending on the specific requirements, this may actually take longer than just writing a renderer for the new hardware (i.e., if you don't need 50% of the functionality of some current renderer, why bother coding up all of the necessary support - even if they are stub no-op functions - if you don't have to?)

ETA - So, OP, what are we talking here? Is it at least running on a common hardware base? (e.g., an x86, x86-64, x64 or even IA64 core? ATI/AMD or nVidia GPU-derivative? etc...)
5/23/2009 9:40:50 PM EDT
[#13]



Quoted:



Quoted:

It'd be FAR easier for you to grab something like Quake and create either a wrapper or firmware that uses the quake engine to do what you need.  Unless there's a very specific reason to do so, writing your own D3D engine just for that piece of hardware would truly be reinventing the wheel.
Except that, depending on the hardware, that might be even more work, or produce unacceptable results. Consider porting 32-bit code down to a 16-bit architecture or similar. This would entail not only writing new drivers for a common rendering API, but also creating an entirely new implementation of that API for access by the actual engine (which itself would also have to be converted to properly run on the new architecture).



Depending on the specific requirements, this may actually take longer than just writing a renderer for the new hardware (i.e., if you don't need 50% of the functionality of some current renderer, why bother coding up all of the necessary support - even if they are stub no-op functions - if you don't have to?)



ETA - So, OP, what are we talking here? Is it at least running on a common hardware base? (e.g., an x86, x86-64, x64 or even IA64 core? ATI/AMD or nVidia GPU-derivative? etc...)


Thus the reason for the discussion... Better to look before you leap!


 
5/23/2009 9:50:20 PM EDT
[#14]
The computer itself will be running XP Pro 64 bit edition.

It will also be running 4 video cards (dual output).



They run a series eight displays. The trick is that the "game" will need to render and output to each display. The monitors will be arranged in a circle around the operator. The environment needs to be viewable continuously in all 360 degrees. I am not sure if there is currently a solution available to make this possible, thus the willingness to begin on my own. Of course if you know of one... all the better!

5/23/2009 9:55:29 PM EDT
[#15]



Quoted:


The computer itself will be running XP Pro 64 bit edition.

It will also be running 4 video cards (dual output).



They run a series eight displays. The trick is that the "game" will need to render and output to each display. The monitors will be arranged in a circle around the operator. The environment needs to be viewable continuously in all 360 degrees. I am not sure if there is currently a solution available to make this possible, thus the willingness to begin on my own. Of course if you know of one... all the better!
I saw a helicopter simulator at IGUG in 2001 that was very similar to this.  Had some pretty serious hardware behind it for the time, and the graphics weren't anywhere near the state of the art.



I hope you have a serious budget if you're talking about running 8 high-res displays off one box.





 
5/23/2009 10:00:57 PM EDT
[#16]
Quoted:
The computer itself will be running XP Pro 64 bit edition.
It will also be running 4 video cards (dual output).

They run a series eight displays. The trick is that the "game" will need to render and output to each display. The monitors will be arranged in a circle around the operator. The environment needs to be viewable continuously in all 360 degrees. I am not sure if there is currently a solution available to make this possible, thus the willingness to begin on my own. Of course if you know of one... all the better!


Uh, yeah. That's nothing super-special in the sim industry (though going a full-360 is not typical... normally, it will be >180 and <360 in horizontal swath around the simulator). Partial and full domes have been around for a long time.

When you said you had "custom hardware" that needed software written specifically for it, I assumed that you meant this was new hardware that required embedded software (e.g., a video game console, portable device, etc). Just running a bunch of displays isn't hard.

Repurposing an existing engine for multi-display usage would be almost trivial. Well-written modern engines already have this support.
5/23/2009 10:08:29 PM EDT
[#17]
Quoted:
I saw a helicopter simulator at IGUG in 2001 that was very similar to this.  Had some pretty serious hardware behind it for the time, and the graphics weren't anywhere near the state of the art.

I hope you have a serious budget if you're talking about running 8 high-res displays off one box.

 


Graphics in *real* sims (not this so-called "sim" bullshit that's really just a game) are rarely, if ever, anywhere near the cutting edge. The reason is that the bulk of the hardware is tied up doing the necessary simulation components. In addition to the many, many rack mounts being utilized for simulation, the visual systems do typically have several boxes as well. However, due to the emphasis on performance and simulation over graphical prowess, producing high-end graphics is one of the lowest priorities. Additionally, the big players farm out most of the core graphics work, as it is considered to be prohibitively expensive to have it developed in-house (due to the higher-on-average wages of engineers working for these firms compared to those received by the coding monkeys working at the places they farm out the work to) - though I keep telling them how much better (in both graphical perfomance and $$) it would be in the very-long run for us to do it ourselves.

Running 8 displays off of a single box will indeed be taxing. I hope that there is at least a quad-core CPU in there to help delegating the work between the four GPU cards - and it would likely be best to utilize dual-GPU cards if at all possible, if you are really powering high-resolution displays (1900+). Also, if this is a canned scene (i.e., portions are prerendered or at least heavily optimized), then you won't need to worry as much.
5/23/2009 10:10:00 PM EDT
[#18]



Quoted:


Let me preface this by stating that I am a full-time Software Engineer, specializing in soft-realtime simulation with an emphasis on graphics.



OT: You sound like a really smart guy. Why did you pick such a ghey user name?





 
5/23/2009 10:14:41 PM EDT
[#19]
Quoted:

Quoted:
Let me preface this by stating that I am a full-time Software Engineer, specializing in soft-realtime simulation with an emphasis on graphics.

OT: You sound like a really smart guy. Why did you pick such a ghey user name?

 


How exactly are the winged warrior maidens of norse mythology - those who carry the slain to valhalla - "ghey"?

ETA - Not to mention the awesomeness of the XB-70, and the fictional awesomess of the VF-1 (whose name was chosen due to the awesomeness of the real XB-70).
5/23/2009 10:15:35 PM EDT
[#20]





Quoted:
Quoted:


Let me preface this by stating that I am a full-time Software Engineer, specializing in soft-realtime simulation with an emphasis on graphics.





OT: You sound like a really smart guy. Why did you pick such a ghey user name?





 
Uhh... Walkure is german for Valkyrie, the Norse hotties that pick out who dies on the battlefield.  They also bring the warriors mead and sammiches when they're not training for Ragnarok.  Kinda like a badass Viking version of the 72 virgins.






You just wish your name was as cool as his :)
 

ETA: too slow :(

 
5/23/2009 10:17:15 PM EDT
[#21]



Quoted:



Quoted:




Quoted:

Let me preface this by stating that I am a full-time Software Engineer, specializing in soft-realtime simulation with an emphasis on graphics.



OT: You sound like a really smart guy. Why did you pick such a ghey user name?



 




How exactly are the winged warrior maidens of norse mythology - those who carry the slain to valhalla - "ghey"?



The lack of diaeresis threw me off. I guess it's not that ghey after all.




 
5/23/2009 10:22:14 PM EDT
[#22]
Quoted:

Quoted:
Quoted:

Quoted:
Let me preface this by stating that I am a full-time Software Engineer, specializing in soft-realtime simulation with an emphasis on graphics.

OT: You sound like a really smart guy. Why did you pick such a ghey user name?

 


How exactly are the winged warrior maidens of norse mythology - those who carry the slain to valhalla - "ghey"?

The lack of diaeresis threw me off. I guess it's not that ghey after all.
 


Yeah, ARFCOM doesn't allow for unicode characters in user names, so I had to go with Walkure instead of Walküre. And even though I know it should thus be properly rendered Walkuere, that just looks funny.
5/23/2009 10:25:05 PM EDT
[#23]



Quoted:



Quoted:

The computer itself will be running XP Pro 64 bit edition.

It will also be running 4 video cards (dual output).



They run a series eight displays. The trick is that the "game" will need to render and output to each display. The monitors will be arranged in a circle around the operator. The environment needs to be viewable continuously in all 360 degrees. I am not sure if there is currently a solution available to make this possible, thus the willingness to begin on my own. Of course if you know of one... all the better!
Uh, yeah. That's nothing super-special in the sim industry (though going a full-360 is not typical... normally, it will be >180 and <360 in horizontal swath around the simulator). Partial and full domes have been around for a long time.



When you said you had "custom hardware" that needed software written specifically for it, I assumed that you meant this was new hardware that required embedded software (e.g., a video game console, portable device, etc). Just running a bunch of displays isn't hard.



Repurposing an existing engine for multi-display usage would be almost trivial. Well-written modern engines already have this support.


It's good to hear that this will not be as difficult as I had originally imagined! In the realm of "custom hardware" this is admittedly rather lame (or at least this aspect of the project). I have had to build some hardware literally from the ground up one circuit component at a time... Then I had to write drivers for it!




 
5/23/2009 10:30:50 PM EDT
[#24]



Quoted:



Quoted:

I saw a helicopter simulator at IGUG in 2001 that was very similar to this.  Had some pretty serious hardware behind it for the time, and the graphics weren't anywhere near the state of the art.



I hope you have a serious budget if you're talking about running 8 high-res displays off one box.

 
Graphics in *real* sims (not this so-called "sim" bullshit that's really just a game) are rarely, if ever, anywhere near the cutting edge. The reason is that the bulk of the hardware is tied up doing the necessary simulation components. In addition to the many, many rack mounts being utilized for simulation, the visual systems do typically have several boxes as well. However, due to the emphasis on performance and simulation over graphical prowess, producing high-end graphics is one of the lowest priorities. Additionally, the big players farm out most of the core graphics work, as it is considered to be prohibitively expensive to have it developed in-house (due to the higher-on-average wages of engineers working for these firms compared to those received by the coding monkeys working at the places they farm out the work to) - though I keep telling them how much better (in both graphical performance and $$) it would be in the very-long run for us to do it ourselves.




Running 8 displays off of a single box will indeed be taxing. I hope that there is at least a quad-core CPU in there to help delegating the work between the four GPU cards - and it would likely be best to utilize dual-GPU cards if at all possible, if you are really powering high-resolution displays (1900+). Also, if this is a canned scene (i.e., portions are prerendered or at least heavily optimized), then you won't need to worry as much.


The program will need to contain a dynamic 3D environment and will need to be rendered on the fly. The computer will also need to be running a couple of other resource intensive programs. It will need to be a pretty serious machine! I am thinking about using several other computers to do calculations and networking them the computer running the graphics application. I will look into dual GPU cards as well.



MAX