Slashdot Mirror


Win32 to X11 Migration?

Hos writes "I had a good, original idea for a game that I wanted to write for X11. Unfortunately I know nothing about X programming, so I decided to write a prototype version using the Win32 API. Now that this works, I would like to port it to X11 and complete it. Can anyone recommend any good references for beginning X programming? I've seen the Xlib and Motif O'Reilly books at the book store. Should I get these? Are there any libraries I should avoid? Any good websites? " As near as I can understand it, moving between X and Win32 isn't exactly a direct affair. Would you all suggest this? Or would porting first to GTK for Win32 and then moving that code to the Unix make more sense?

1 of 7 comments (clear)

  1. Use OpenGL and a suitable toolkit by Tet · · Score: 2
    Use OpenGL for the game itself. That's fully portable between Win32 and X11, as well as having many other advantages (speed, simplicity, flexibility, etc.) For the surrounding bits (if there are any) such as menus etc., either use glut if your needs are relatively simple, or one of the newer toolkits like Gtk+ or Qt otherwise. Avoid Xlib/Xt/Motif like the plague. As you say, Gtk already has a Win32 version available, although it wasn't fully stable last time I looked at it. Qt also has a Win32 version, but you may need a $1500 development license (has this changed with the new license? I haven't checked). Qt also limits you to using C++.

    Oh yeah, don't be put off OpenGL if you're doing a 2D game -- although it excels at 3D, it's just as good in 2 dimensions, too!

    --
    "The invisible and the non-existent look very much alike." -- Delos B. McKown