crystalspace? direct3d? opengl?

Started by
4 comments, last by Monder 18 years, 7 months ago
Im looking to make a space game in 3d. So it shouldnt be too complex, a few ships, a light source (sun) and a few spheres (planets) However I have never done anything in 3d before, not even just a cube. So what should I try to learn that will be fast (as far as fps), look good (at least 800x600x32 full window with pretty effects), work well with Code::Blocks and run on WindowsXP? I have tried to use Direct3D before, but it just seems 'hard'. I have looked at openGL and it seems simple enough as far as I can tell, but can it deliver the goods? I dloaded crystalspace and compiled it, ran the demos, and they all seem extreamly buggy, plus the interface looks compicated. So any advice will be most appreciated. Thanks
Advertisement
Quote:Original post by SelethD
but can it deliver the goods?


Of course it can. Use what you feel comfortable with.

If at first you don't succeed, redefine success.
OpenGL is certainly easier to use than Direct3D but the main complaint with it is that it only supplies hardware accelerated graphics. In order to get joystick and keyboard control you end up either using DirectX features or using SDL.

I personally recommend using SDL and OpenGL since it's simpler and may allow your code to be ported to the Macintosh and Linux without much if any modification.

Both work with the MingGW compiler used by code::blocks although I don't know how to implement the linking in the code::blocks IDE.
Thats just the problem im having. I decided to try openGL, but when I include the glut.h header, it needs the glut32.lib library.

And I cant seem to get it to work. I tell Code::Blocks to link it, but I keep getting errors like this...

Project : OpenGL Application
Compiler : GNU GCC Compiler (called directly)
Directory : C:\Projects--------------------------------------------------------------------------------
Switching to target: default
Linking executable: C:\Projects\OpenGL.exe
.objs\main.o:main.cpp:(.text+0x1c): undefined reference to `__glutInitWithExit@12'
.objs\main.o:main.cpp:(.text+0x3d): undefined reference to `__glutCreateWindowWithExit@8'
.objs\main.o:main.cpp:(.text+0x5d): undefined reference to `__glutCreateMenuWithExit@8'
collect2: ld returned 1 exit status
Process terminated with status 1 (0 minutes, 0 seconds)
0 errors, 0 warnings

So I dont know whats wrong. It works fine in my educational edition of Visual Studio.

So I tried to create the project in VS and use Code::Block's import project, but it still isnt working.

Any suggestions?
OpenGL and Direct3D are more than capable. Don't be too worried about openGL "delivering the goods". Both the Unreal Engine and DOOM 3 had the capability of using OpenGL as a renderer.

If you decide to go the OpenGL route, a good place to get started is the NeHe OpenGL tutorials.

You'll also need something to create a window and handle user input on top of OpenGL, GLUT is fine for small projects, but also take a look at SDL. The NeHe SDL/Linux code samples should compile with windows, but if not there is code for so many platforms at nehe that you should be able to get them up and running without too much difficulty.
Code::Blocks may not come with the GLUT library. Take a look in your library directory and see if it's there.

Using a prebuilt engine may be a better idea than using straight GL. This will allow you to get your game up and running far quicker (though you won't learn anywhere near as much about computer graphics). Take a look at <href="http://www.ogre3d.org/">Ogre3D and Irrlicht. I've got limited experience with CrystalSpace and haven't looked at it for a few years but from what I remember it's a bloated overengineered monstrosity so I'd recomend using something else.

This topic is closed to new replies.

Advertisement