Writing game using QNX

Hi everyone, I am a student studying Computer Engineering in the Chinese University in Hong Kong.

I am now doing a Final Year Project based on QNX. I have to write a big game using QNX 's special feature : Message passing. (fun?)

We have to write a 3D game. However, seems no openGL library for QNX…( I can’t search for it…). Then today I found that “photon 3D” which has the description : “Photon 3d Runtime and Developement”

is it useful to me…? if so, can anyone tell me how it can be used?

at the same time, I need to write a program which gets the keyboard input from users. After getting the input, a message will be sent to another process. However, I get no idea on how to detect what keys are being pressed.

Actually, we have used the SDL library to due with the GUI. SDL also provide us a way to get input from users. However, no multiuple key is allowed if we use SDL. So it will be very stupid if we use it for the input of the game.

Can anyone kindly help us on the above problems?? Thx!!! :slight_smile:

check here. and also look into QNXGL library.





thx very much
i have installed photon3d and i find the gl.h, glu.h and glut.h
but when i compile the code
what argument should i type?
i have googled and tried
gcc hello.c -o hello -lGL -lGLU -lGLUT
however, it said cannot find -lGLUT
(i am sure -lGL and -lGLU are available)
i also tried -lMesaGlut, -lMesa-Glut…
still fail…
anyone knows the correct argument?
or how can i check what argument available to me now in the systme??

it seems like you have not set the “extra path” for your linker. Make sure you give the path to the linker which has GLUT.so or GlUT.a
I haven’t installed those packages my self so I wouldn’t know where they are located.
Try /x86/usr/lib or /usr/lib/ or opt/lib etc… with some kind of sub directory like glut. For example, if you will to install libxml2 package, you will see the shared library located at /x86/usr/lib/lilbxml2/
hope this helps.

Just out of curiousity, why pick QNX to write a game, or why pick a game to write on QNX ? ;-)

we are forced to listen to professor…~

he want to use QNX’s special feature : message passing and fast context switch to write a game, which is a multiple user, real-time game…~

Strange teacher ;)

actually the aim is not to make a game gei…
but through writingthe game
we can learn various of things~

I understand that, I just find that’s it’s not really suited for the task. For example writting a process that just handle key event is bad design for a game, however the concept is interesting in an OS like QNX (you can see it as a modular input program), it will reduce game performace. Hence you maybe learning interesting QNX concept but you are actually learning to wrong way to make a game IMHO. I feel the two dont mix, game and QNX.

I guess if the goal is not to learn about game design then it’s ok.

right…i also doubt the performace of the game since we have to divide a game into quite many modules

but this design has the advantage in developing the game (or program)
for example, if i want to make more beautiful graphic, i can simply change the code for display, but not to write the whole game again

game is only a way for us to learn, as professor want us to learn with fun