[Mono-list] Writing a 3d game?

Simon Waite simon@psionics.demon.co.uk
Wed, 23 Apr 2003 02:20:24 +0100

----- Original Message ----- 
From: "Maurizio Colucci" <seguso.forever@tin.it>
To: "mono-list" <mono-list@ximian.com>
Sent: Tuesday, April 22, 2003 7:00 PM
Subject: [Mono-list] Writing a 3d game?

> Hello again!
> I am currently writing a 3d game, in my spare time, under Windows, in
> C#, with the aid of CsGl (a C# port of opengl).  I am not using
> DirectX and there's no sound so far.
> I would like to have my game run on linux. I am willing to rewrite all
> there is to rewrite (for example, I could drop CsGL and use DirectX).
> is it possible, and if so, what technologies should I use? SDL?
> DirectX? OpenGL? CsGL?
> I need suggestions about the input API, the sound AP, and of course
> the 3d primitive API.

okay, for your game try this:

Break each section up into modules, eg

Game Logic, Player control, Scene Graph, Renderer, etc

Specify interfaces and implement them as stubs to begin with.

Moving between DirectX and OpenGL for example, is a matter of
processing the scenegraph by the renderer, and sending polygons
to the target api. This way you only write minimal changes for
different destination apis. So assuming at some point someone
ports mono to the playstation/xbox/whatever you can easily 
port the modules that interface with the hardware with a minimum
of effort, and keep all that game control code intact :)