Page 1 of 8 123 ... LastLast
Results 1 to 10 of 76

Thread: Hurrican SDL Port

  1. #1
    Join Date
    Jun 2008
    Posts
    74

    Default 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.



    About
    Hurrican was created by the group Poke53280: http://www.poke53280.de
    Hurrican was programmed by Eisewuxe(which a big thanks to for releasing the source code): http://www.eiswuxe.de

    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: http://sourceforge.net/projects/hurrican/
    Getting the source is easy as typing the command:
    Code:
    svn checkout svn://svn.code.sf.net/p/hurrican/code/trunk hurrican-code
    There is a makefile in the source directory, so a simple 'make' should be enough.

    Todo
    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. #2
    Join Date
    Jul 2012
    Posts
    3

    Default

    Hi Pickle,

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

    Code:
    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 :

    Code:
    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
    
    endif
    Now looks like :

    Code:
    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
    
    endif
    But I still get the same error. Any ideas ?

    Cheers.
    Colm
    Last edited by protos; 07-21-2012 at 10:25 AM.

  3. #3
    Join Date
    Jun 2008
    Posts
    74

    Default

    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. #4
    Join Date
    Jul 2012
    Posts
    3

    Default

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

    Code:
    DEFINES := -DPLATFORM_SDL -DENABLE_CONSOLE_COMMANDS
    Sound doesn't work, but I can live with that.

    Great job.

    Colm

  5. #5
    Join Date
    Jul 2012
    Posts
    3

    Default

    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 !

    Cheers,
    Colm

  6. #6
    Join Date
    Jun 2008
    Posts
    74

    Default

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

  7. #7
    Join Date
    Jan 2009
    Location
    England
    Posts
    101

    Exclamation 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

    Code:
    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

    Code:
    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. #8
    Join Date
    Jun 2008
    Posts
    74

    Default

    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 http://sourceforge.net/p/hurrican/co...ort/SDL_port.h)

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

  9. #9
    Join Date
    Jan 2009
    Location
    England
    Posts
    101

    Default

    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?

    Thanks!

    Dan

  10. #10
    Join Date
    Jan 2009
    Location
    England
    Posts
    101

    Default +1

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

    EDIT

    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 at 11:39 AM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •