No announcement yet.

Hurrican SDL Port

  • Filter
  • Time
  • Show
Clear All
new posts

  • Hurrican SDL Port

    Ive been working on porting a fan made game called Hurrican that is based on Turrican, which I think some here would enjoy since it now a native linux game.

    Hurrican was created by the group Poke53280:
    Hurrican was programmed by Eisewuxe(which a big thanks to for releasing the source code):

    Hurrican was made for windows and used directx (d3d) and FMOD. My port replaces directx with SDL/OpenGL and FMOD with SDL_mixer/modplug. Modplug is optional but i consider a better quality decoder than mikmod if your sdl_mixer is configured to use it.
    If your system supports these libraries then the game should run, although it might require some changes (like for macos).
    OpenGL code is also OpenGL-ES compatible so this should run on most mobile devices. For instance I have already completed a openpandora build.

    Where to Get
    I currently dont have any prebuilt packages for any PC builds, but it easy enough to build and run.
    The project page is here on sourceforge:
    Getting the source is easy as typing the command:
    svn checkout svn:// hurrican-code
    There is a makefile in the source directory, so a simple 'make' should be enough.

    There are a couple minor lingering bugs to clean up.
    I need to finish a few more functions to support the rar packaged data and test the included unrarlib support. For the moment only uncompressed data is supported.
    Create some install packages

    If anyone would like to help work on this project send a request through sourceforge and I will see about adding you to the project. For instance I wouldnt mind if someone came along to add and finish any bits needed for a macos port or any other platform.
    If anyone tries this out feel free to give any feedback, it is appreciated.

  • #2
    Hi Pickle,

    I would like to play your port, but when I try to compile it I get :

    gcc -g -Wall -O0 -c -I./SDLPort -Icml -I./unrarlib040/unrarlib -I/usr/include/SDL -I/usr/include/libmodplug -DPLATFORM_SDL -DENABLE_CONSOLE_COMMANDS -DUSE_MODPLUG Boss_BigFish.cpp -o Boss_BigFish.o
    In file included from DX8Sound.h:53:0,
                     from stdafx.h:8,
                     from Boss_BigFish.cpp:8:
    ./SDLPort/SDL_fmod.h:6:21: fatal error: modplug.h: No such file or directory
    compilation terminated.
    make: *** [Boss_BigFish.o] Error 1
    I checked and indeed modplug.h is nowhere on my system.

    I removed all references to modplug from the Makefile so :

    ifeq ($(TARGET),linux)
    EXE := ../hurricanlinux
    CCP := gcc
    CC  := gcc
    LD  := g++
    RM  := rm -f
    INCLUDES_OS := -I/usr/include/SDL -I/usr/include/libmodplug
    LDFLAGS := -g -lSDL -lGL -lSDL_mixer -lSDL_image -lmodplug
    Now looks like :

    ifeq ($(TARGET),linux)
    EXE := ../hurricanlinux
    CCP := gcc
    CC  := gcc
    LD  := g++
    RM  := rm -f
    INCLUDES_OS := -I/usr/include/SDL
    LDFLAGS := -g -lSDL -lGL -lSDL_mixer -lSDL_image
    But I still get the same error. Any ideas ?

    Last edited by protos; 07-21-2012, 10:25 AM.


    • #3
      The best option would be to install the libmodplug devel package for your distro.

      If its not available you should be able to not use the define USE_MODPLUG and the build should fallback to using SDL_mixer directly.


      • #4
        Got it working ! Just needed to remove the -DUSE_MODPLUG from the top line
        in Makefile to look like :

        Sound doesn't work, but I can live with that.

        Great job.



        • #5
          Recompiled with the libmodplug-dev package installed and it worked perfectly with sound on xubuntu 12.04.

          Great job again. Looking forward to getting stuck into it. I have fond memories of playing turrican and turrican 2
          on the c64 !



          • #6
            thanks for trying with libmodplug, there is an issue with libmikmod in sdl_mixer.


            • #7
              This is big Linux and retro gaming news!

              What do I say and just where to start? "Wow!" would be a minimal summary!

              First off though, how come nobody told me about this sooner? Hurrican SDL was quietly announced in this forum alone it would seem as I've not heard a word of its existence through Phoronix, slashdot, retro remakes.. poke didn't think to let me know and even pickle hasn't pointed me over here via the GP2X and Pandora forums.. is this some kind of conspiracy? What did I do wrong?

              Just to back up a little bit here, I feel kids and newbs need a quick potted history of home computing and videogaming as to why the release of Hurrican SDL is almost as important as say the release of the Doom/Quake source or the Steam Linux client to me. I know its safe to say that many Phoronix readers and long time Linux users and advocates such as myself were previously C64 and/or Amiga/Atari users and I can also safely say that the majority of those people will also tell you that one of the very best series of games ever released for those platforms was Turrican, which is of course the inspiration for Hurrican.

              I was amazed when I first discovered Hurrican - it was sadly Windows only at the time but at least it worked (works) perfectly under wine. Without doubt, Hurrican is the best retro remake / tribute full stop and it is also the best and most professional looking free game I have ever seen that doesn't have commercial origins - in contrast to the iD games for example. I had written to Hurrican's author about a Linux port and I knew he was open to it but at the time no-one with the skills to do it had stepped up so I'm VERY happy pickle took the challenge! Much respect and gratitude Mr pickle!!

              Now that I've told you my life story - what about Hurrican SDL? It compiles and runs fine on my Deb Wheezy amd64 laptop but I cannot get my USB gamepad to work with it so I presume joysticks aren't supported in the SDL port yet? I know this pad works fine with other Linux games, dmesg shows it and I have also used this pad to play Hurrican under wine - switching to joystick under the Hurrican Configure Controls menu just doesn't seem to be an option yet and indeed SDL doesn't mention anything about joysticks when you start Hurrican, which lots of SDL games do.

              The other big prob I have with Hurrican SDL atm is I've been unable to get it to compile with GLES support on my Pandaboard. I'm presuming that Pickle has got GLES working on his Pandora build of Hurrican but there is currently no support for GLES in the Makefile so I've tried guessing my way to a build and when compiling against the GLESv1 Panda libs I get very close so I'm presuming it only supports GLES v1?

              Panda Hurrican compile error with -lGLESv2 and -lEGL LDFLAGs

              Boss_Bratklops.o: In function `GegnerBratklops::DoDraw()':
              /home/dan/src/hurrican-code/Hurrican/src/Boss_Bratklops.cpp:152: undefined reference to `glLoadMatrixf'
              /home/dan/src/hurrican-code/Hurrican/src/Boss_Bratklops.cpp:170: undefined reference to `glLoadMatrixf'
              Boss_Golem.o: In function `GegnerGolem::DoDraw()':
              /home/dan/src/hurrican-code/Hurrican/src/Boss_Golem.cpp:155: undefined reference to `glLoadMatrixf'
              /home/dan/src/hurrican-code/Hurrican/src/Boss_Golem.cpp:172: undefined reference to `glLoadMatrixf'
              /home/dan/src/hurrican-code/Hurrican/src/Boss_Golem.cpp:208: undefined reference to `glLoadMatrixf'
              Boss_Golem.o:/home/dan/src/hurrican-code/Hurrican/src/Boss_Golem.cpp:221: more undefined references to `glLoadMatrixf' follow
              DX8Graphics.o: In function `DirectGraphicsClass::SetDeviceInfo()':
              /home/dan/src/hurrican-code/Hurrican/src/DX8Graphics.cpp:374: undefined reference to `glClearDepth'
              /home/dan/src/hurrican-code/Hurrican/src/DX8Graphics.cpp:388: undefined reference to `glLoadMatrixf'
              /home/dan/src/hurrican-code/Hurrican/src/DX8Graphics.cpp:391: undefined reference to `glLoadIdentity'
              /home/dan/src/hurrican-code/Hurrican/src/DX8Graphics.cpp:396: undefined reference to `glTexEnvi'
              DX8Graphics.o: In function `DirectGraphicsClass::RendertoBuffer(D3DPRIMITIVETYPE, unsigned int, void const*)':
              /home/dan/src/hurrican-code/Hurrican/src/DX8Graphics.cpp:601: undefined reference to `glEnableClientState'
              /home/dan/src/hurrican-code/Hurrican/src/DX8Graphics.cpp:602: undefined reference to `glEnableClientState'
              /home/dan/src/hurrican-code/Hurrican/src/DX8Graphics.cpp:605: undefined reference to `glEnableClientState'
              /home/dan/src/hurrican-code/Hurrican/src/DX8Graphics.cpp:606: undefined reference to `glTexCoordPointer'
              /home/dan/src/hurrican-code/Hurrican/src/DX8Graphics.cpp:609: undefined reference to `glVertexPointer'
              /home/dan/src/hurrican-code/Hurrican/src/DX8Graphics.cpp:610: undefined reference to `glColorPointer'
              /home/dan/src/hurrican-code/Hurrican/src/DX8Graphics.cpp:614: undefined reference to `glDisableClientState'
              /home/dan/src/hurrican-code/Hurrican/src/DX8Graphics.cpp:615: undefined reference to `glDisableClientState'
              /home/dan/src/hurrican-code/Hurrican/src/DX8Graphics.cpp:618: undefined reference to `glDisableClientState'
              DX8Sprite.o: In function `DirectGraphicsSprite::RenderSpriteRotated(float, float, float, unsigned int)':
              /home/dan/src/hurrican-code/Hurrican/src/DX8Sprite.cpp:996: undefined reference to `glLoadMatrixf'
              /home/dan/src/hurrican-code/Hurrican/src/DX8Sprite.cpp:1012: undefined reference to `glLoadMatrixf'
              DX8Sprite.o: In function `DirectGraphicsSprite::RenderSpriteRotated(float, float, float, int, unsigned int, bool)':
              /home/dan/src/hurrican-code/Hurrican/src/DX8Sprite.cpp:1132: undefined reference to `glLoadMatrixf'
              /home/dan/src/hurrican-code/Hurrican/src/DX8Sprite.cpp:1148: undefined reference to `glLoadMatrixf'
              DX8Sprite.o: In function `DirectGraphicsSprite::RenderSpriteRotatedOffset(float, float, float, float, float, unsigned int, bool)':
              /home/dan/src/hurrican-code/Hurrican/src/DX8Sprite.cpp:1246: undefined reference to `glLoadMatrixf'
              DX8Sprite.o:/home/dan/src/hurrican-code/Hurrican/src/DX8Sprite.cpp:1262: more undefined references to `glLoadMatrixf' follow
              SDLPort/SDL_port.o: In function `matrixmode(unsigned int)':
              /home/dan/src/hurrican-code/Hurrican/src/SDLPort/SDL_port.cpp:359: undefined reference to `glMatrixMode'
              collect2: ld returned 1 exit status
              make: *** [../hurricanlinux] Error 1
              Panda Hurrican compile error with -lGLESv1_CM and -lEGL LDFLAGs

              DX8Graphics.o: In function `DirectGraphicsClass::SetDeviceInfo()':
              /home/dan/src/hurrican-code/Hurrican/src/DX8Graphics.cpp:374: undefined reference to `glClearDepth'
              collect2: ld returned 1 exit status
              make: *** [../hurricanlinux] Error 1


              • #8
                I didnt use the makefile for the pandora build but doesnt mean you cant.

                You cant use GLESv2 since it support OpenGLES 2.0 and not 1.X which is what this uses (this is why you get undefined refs to thing like matrix operations, they are not supported)

                GLESv1_CM is the correct library to use, but your missing a define for GLES1 (see

                #define GL_GLEXT_PROTOTYPES 1
                #if defined(USE_GLES1)
                #include "GLES/gl.h"
                #include "GLES/glext.h"
                #define glClearDepth glClearDepthf
                #include "SDL_opengl.h"
                SDL joysticks should work, i will have to try this to see if something is going wrong.


                • #9
                  Hi Pickle!

                  Thanks for your quick response!

                  Where into which file should I add your code, which looks wrong as every line starts with a hash as you've pasted it above?

                  As for changing the Makefile, all I have to do is change the Linux LDFLAGS so -lGL is replaced with -lGLESv1_CM and add -lEGL , right?




                  • #10

                    Just noticed - you're currently just 1 Phoronix post ahead of me!


                    Just noticed your link so I'll adding that code to SDL_port.h but I suspect I'll need to change the Makefile somewhere too to enable GLES right?
                    Last edited by danboid; 07-28-2012, 11:39 AM.


                    • #11
                      Enable GLES?

                      I'm sorry Pickle but I don't quite understand what you want me to do to fix my compilation prob here.

                      I can see that the block of code you have highlighted is already present within the svn version I have here so my inexperienced guess was to try adding:


                      to the CFLAGS section on line 42 of the Makefile but that hasn't worked.



                      • #12
                        Adding -DUSE_GLES1 has to work, did you do a clean and rebuild?


                        • #13
                          Hurrican is compiling on Panda!

                          Very close now!

                          I did a clean build and I now have Hurrican SDL compiled against the TI GLES1 libs on my Pandaboard!

                          If you're lucky enough to own a Pandaboard and Pickle doesn't update the Makefile to support the Panda, you can compile Hurrican by simply adding -DUSE_GLES1 to the end of line 1 (ie the DEFINES section) and then replacing -lGL with

                          -lGLESv1_CM -lEGL

                          In the LDFLAGS section which is at line 36 of hurrican-code/Hurrican/src/Makefile

                          However, I've not actually seen the game run yet as there is a bug with the current TI Panda xorg server or GLES1 lib which causes a black screen for any GLES1 apps that try to start full screen like Hurrican currently does so is there a command line option to start in a window yet?
                          Last edited by danboid; 07-28-2012, 01:41 PM.


                          • #14
                            I cant remember if there was a fullscreen argument, but just for your testing you can just change SDL_FULLSCREEN


                            • #15

                              Hi Pickle!

                              I may manage to fluke fixing the odd build by messing with Makefiles but I'm not a programmer so please could you explain how I'd disable SDL fullscreen for Hurrican as SDL_FULLSCREEN seems to be a SDL function, not an environment variable I can easily set.