Announcement

Collapse
No announcement yet.

Hurrican SDL Port

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Pickle
    started a topic Hurrican SDL Port

    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.

  • danboid
    replied
    Hurrican on Banana Pi

    I thought some of you would be interested to know that I've got Hurrican running under Arch on the Banana Pi.

    Maybe its a limitation or bug with my Mali drivers but is there no way to force Hurrican to run full screen Pickle? Well, it does run 'full screen' but the display doesn't fill the screen. The only other issue I have is that there is a tiled effect on the waterfalls.

    To get Hurrican to compile I had to replace SDL_fmod.h with the older version as noted by Naquatis so could you fix this in svn please Pickle?

    It would also be nice to see an extra build option for generic Linux/GLES added to the Makefile. You could have the library path set up for the popular Mali libs/GPU and that might be the only thing users of GLES with other GPUs (Tegra, Adreno etc) may have to adjust to get it to build.

    Here's the modified Makefile I used to build for Arch/Mali:

    Code:
    DEFINES := -DPLATFORM_SDL -DENABLE_CONSOLE_COMMANDS -DUSE_MODPLUG -DUSE_GLES2 -DUSE_EGL_SDL 
    
    TARGET = linux
    
    ifeq ($(TARGET),aros)
    
    EXE := ../hurricanaros
    CCP := i386-aros-gcc
    CC  := i386-aros-gcc
    LD  := i386-aros-g++
    RM  := rm -f
    
    USE_EGL := no
    
    INCLUDES_OS := -I/usr/local/arosv0/AROS/bin/linux-i386/AROS/Development/include/SDL/ \
                   -I/usr/local/arosv0/AROS/bin/linux-i386/AROS/Development/include/libmodplug
    
    #LDFLAGS := -g -lSDL_mixer -lvorbisfile -lvorbis -logg -lSDL_image -lpng -larosz -ljpeg -lSDL -lGL
    #
    #SDL_mixer in AROS contrib does not have support for MODs compiled in, so use one from archives.aros-exec.org
    #LDFLAGS := -g /usr/local/arosv0/AROS/bin/linux-i386/AROS/Development/SDL_mixer-1.2.6/Development/lib/libSDL_mixer.a \
    #           -lmodplug -lvorbisfile -lvorbis -logg -lSDL_image -lpng -larosz -ljpeg -lSDL -lGL
    LDFLAGS := -g -lSDL_mixer \
               -lmodplug -lvorbisfile -lvorbis -logg -lSDL_image -lpng -larosz -ljpeg -lSDL -lGL
    
    endif
    
    ifeq ($(TARGET),rpi)
    
    EXE := ../hurrican
    CCP := g++
    CC  := gcc
    LD  := g++
    RM  := rm -f
    
    USE_EGL := yes
    USE_GL2 := yes
    
    DEFINES += -DRPI -DUSE_GL2 -DUSE_GLES2 -DUSE_EGL_RPI -DRGBA_5551
    
    INCLUDES_OS := -ISDL_port \
                   -I/usr/include/SDL/ \
                   -I/usr/include/libmodplug \
                   -I/opt/vc/include -I/opt/vc/include/interface/vcos/pthreads -I/opt/vc/include/GLES2 -I/opt/vc/include/EGL
    
    LDFLAGS := -L/usr/lib -L/opt/vc/lib -g -lmodplug -lSDL_mixer -lSDL_image -lSDL -lGLESv2
    
    endif
    
    ifeq ($(TARGET),gcw)
    
    EXE := ../hurrican
    CCP := $(GCWSDK)/bin/mipsel-gcw0-linux-uclibc-g++
    CC  := $(GCWSDK)/bin/mipsel-gcw0-linux-uclibc-gcc
    LD  := $(GCWSDK)/bin/mipsel-gcw0-linux-uclibc-g++
    RM  := rm -f
    
    USE_EGL := yes
    USE_GL2 := yes
    
    DEFINES += -DGCW -DUSE_GL2 -DUSE_GLES2 -DRGBA_5551 -DUSE_EGL_RAW -DUSE_320_240
    
    INCLUDES_OS := -ISDL_port \
                   -I$(GCWSDK)/mipsel-gcw0-linux-uclibc/sysroot/usr/include/SDL \
                   -I$(GCWSDK)/mipsel-gcw0-linux-uclibc/sysroot/usr/include/libmodplug \
                   -I$(GCWSDK)/mipsel-gcw0-linux-uclibc/sysroot/usr/include/GLES2 -I$(GCWSDK)/include/mipsel-gcw0-linux-uclibc/sysroot/usr/include/EGL
    
    LDFLAGS := -L$(GCWSDK)/lib -g -lpthread -lmodplug -lSDL_mixer -lSDL_image -lSDL -lGLESv2 -lEGL
    
    endif
    
    
    ifeq ($(TARGET),linux)
    
    EXE := ../hurricanlinux
    CCP := g++
    CC  := gcc
    LD  := g++
    RM  := rm -f
    
    USE_EGL := yes
    USE_GL2 := yes
    
    DEFINES += -DLINUX -DUSE_GLES2 -DUSE_EGL_SDL -DRGBA_5551 -DUSE_GL2
    
    INCLUDES_OS := -I/usr/include -I/usr/include/SDL -I/usr/include/GLES2 -I/usr/include/libmodplug -I/usr/include/EGL
    
    LDFLAGS := -L/usr/lib/mali -g -lSDL -lGLESv2 -lSDL_mixer -lSDL_image -lmodplug -lX11 -lEGL
    
    endif
    
    INCLUDES := -I. -I./SDLPort -Icml -I./unrarlib040/unrarlib $(INCLUDES_OS)
    
    CFLAGS := -g -Wall -Wno-unused-local-typedefs -O0 -c $(INCLUDES) $(DEFINES)
    
    SDL_FILES := SDLPort/SDL_fmod \
                 SDLPort/SDL_port \
                 SDLPort/texture
    
    EGL_FILES := SDLPort/eglport
    
    GL2_FILES := SDLPort/cshader
    
    #SDLPort/cshader
    
    UNRAR_FILES := unrarlib040/unrarlib/unrarlib
    
    FILES :=Boss_BigFish \
            Boss_Bratklops \
            Boss_Drache \
            Boss_EisFaust \
            Boss_EvilHurri \
            Boss_FahrstuhlBoss \
            Boss_FlugBoss \
            Boss_Golem \
            Boss_MetalHead \
            Boss_PharaoKopf \
            Boss_RiesenPiranha \
            Boss_RiesenQualle \
            Boss_RiesenRaupe \
            Boss_RiesenSpinne \
            Boss_RiesenWespe \
            Boss_Rollmops \
            Boss_SchmidtOrgie \
            Boss_Schneekoenig \
            Boss_Skeletor \
            Boss_Skull \
            Boss_Spinnenmaschine \
            Boss_Stahlfaust \
            Boss_TheWall \
            Boss_Ufo \
            Boss_WuxeSpinnen \
            CCracktro \
            CCutScene \
            CDragonHack \
            Console \
            DX8Enum \
            DX8Font \
            DX8Graphics \
            DX8Input \
            DX8Joystick \
            DX8Sound \
            DX8Sprite \
            GUISystem \
            Gameplay \
            GegnerClass \
            Gegner_Auge \
            Gegner_BallerDrone \
            Gegner_BigRocket \
            Gegner_BlueBoulder \
            Gegner_BrockelRock \
            Gegner_Climber \
            Gegner_DeckenKrabbe \
            Gegner_Deckenturm \
            Gegner_Diamant \
            Gegner_Drone \
            Gegner_EierMann \
            Gegner_EisStachel \
            Gegner_Eiszapfen \
            Gegner_Extras \
            Gegner_FallBombe \
            Gegner_FallingRock \
            Gegner_FetteRakete \
            Gegner_FetteSpinne \
            Gegner_FieseDrone \
            Gegner_FieserFireWalker \
            Gegner_FieserWalker \
            Gegner_FireSpider \
            Gegner_Fledermaus \
            Gegner_FlugKanone \
            Gegner_Flugsack \
            Gegner_Geschuetz \
            Gegner_GunTower \
            Gegner_Helper \
            Gegner_Jaeger \
            Gegner_Kettenglied \
            Gegner_KrabblerLinks \
            Gegner_KrabblerOben \
            Gegner_KrabblerRechts \
            Gegner_KugelGross \
            Gegner_KugelKlein \
            Gegner_KugelMedium \
            Gegner_KugelRiesig \
            Gegner_LaFass \
            Gegner_LavaBall \
            Gegner_LavaBallSpawner \
            Gegner_LavaKrabbe \
            Gegner_Lavamann \
            Gegner_Made \
            Gegner_MiniRocket \
            Gegner_Minidragon \
            Gegner_MittelSpinne \
            Gegner_Mutant \
            Gegner_Nest \
            Gegner_NeuFisch \
            Gegner_OneUp \
            Gegner_PFlanze \
            Gegner_Piranha \
            Gegner_PokeNuke \
            Gegner_PowerBlock \
            Gegner_Punisher \
            Gegner_Qualle \
            Gegner_Raketenwerfer \
            Gegner_ReitFlugsack \
            Gegner_RoboMan1 \
            Gegner_RoboRaupe \
            Gegner_Rotzpott \
            Gegner_Schabe \
            Gegner_SchienenViech \
            Gegner_SchleimAlien \
            Gegner_SchleimBoller \
            Gegner_SchleimMaul \
            Gegner_Schneekoppe \
            Gegner_Schwabbel \
            Gegner_SideRocket \
            Gegner_SkiWalker \
            Gegner_SmallWespe \
            Gegner_SnowBomb \
            Gegner_SpiderBomb \
            Gegner_Spitter \
            Gegner_Spitterbombe \
            Gegner_Stachelbeere \
            Gegner_Stahlmuecke \
            Gegner_Stalagtit \
            Gegner_StarBig \
            Gegner_StarSmall \
            Gegner_StelzSack \
            Gegner_SwimWalker \
            Gegner_Walker \
            Gegner_WandKannone \
            Gegner_WandKrabbe \
            Gegner_WasserMine \
            Gegner_Zitrone \
            GetKeyName \
            HUD \
            Intro \
            Logdatei \
            Main \
            Menu \
            Outtro \
            Partikelsystem \
            Player \
            Projectiles \
            Texts \
            Tileengine \
            Timer \
            Trigger_Bruecke \
            Trigger_Column \
            Trigger_Column2 \
            Trigger_EndLevel \
            Trigger_FadeMusic \
            Trigger_FahrStuhl \
            Trigger_Fass \
            Trigger_Feuerspucker \
            Trigger_Floating \
            Trigger_Floating2 \
            Trigger_Floating3 \
            Trigger_Glubschi \
            Trigger_Glubschi2 \
            Trigger_LaFassSpawner \
            Trigger_Lift \
            Trigger_LightFlare \
            Trigger_LuefterGross \
            Trigger_LuefterKlein \
            Trigger_LuefterKlein2 \
            Trigger_Mushroom \
            Trigger_PartikelSpawner \
            Trigger_Plattform \
            Trigger_Presse \
            Trigger_Presswurst \
            Trigger_SchleuseH \
            Trigger_SchleuseV \
            Trigger_Secret \
            Trigger_ShootButton \
            Trigger_ShootPlattform \
            Trigger_Shrine \
            Trigger_SoundTrigger \
            Trigger_Spikelift \
            Trigger_Stampfstein \
            Trigger_SurfBrett \
            Trigger_Switch \
            Trigger_Tube \
            Trigger_TutorialText \
            Trigger_Warning \
            lightmap \
            stdafx \
            tracealloc
    
    ALL_FILES := $(FILES) $(SDL_FILES) $(UNRAR_FILES)
    
    ifeq ($(USE_EGL),yes)
    ALL_FILES += $(EGL_FILES)
    endif
    
    ifeq ($(USE_GL2),yes)
    ALL_FILES += $(GL2_FILES)
    endif
    
    ALL_OBJS := $(addsuffix .o, $(ALL_FILES))
    
    $(EXE) : $(ALL_OBJS)
    	$(LD) $^ $(LDFLAGS) -o $@
    	
    %.o : %.cpp
    	$(CCP) $(CFLAGS) $< -o $@
    	
    %.o : %.c
    	$(CC) $(CFLAGS) $< -o $@
    
    .PHONY : clean
    
    clean :
    	$(RM) $(ALL_OBJS) $(EXE)

    Leave a comment:


  • Naquatis
    replied
    d-pad

    Originally posted by PooshhMao View Post
    I suppose I could use a tool such as QJoypad and use digital controls that way, but I'd rather not, it would be better if Hurrican could just recognise (and use) every control on my joypad correctly.
    I use QJoyPad to remap the keyboard control of Hurrican to the gamepad and it works really nice this way.

    Leave a comment:


  • Naquatis
    replied
    SDL_fmod.h replacement

    The problem while compiling Hurrican could be solved by replacing the new SDL_fmod.h with the old SDL_fmod.h in Hurrican/src/SDLPort/

    Thanx again for this wonderful piece of software!

    Leave a comment:


  • Naquatis
    replied
    Fixed Hurrican graphic glitches on Linux

    Originally posted by Pickle View Post
    All the changes are commited, give it a try and see if it works for you.
    Yes! This is like xmas before xmas!

    Thank you very much! This fix all my Hurrican graphic glitches on Linux.

    For the compilation I need to copy the SDL_fmod.o from the old compiled svn repository,
    because while compiling the new svn repository I got the following error:

    In file included from SDLPort/SDL_fmod.h:30:0,
    from SDLPort/SDL_fmod.c:25:
    SDLPort/SDL_port.h:29:20: fatal error: iostream: file or directory not found
    #include <iostream>

    Leave a comment:


  • Pickle
    replied
    Originally posted by PooshhMao View Post
    Hi,

    but Hurrican does not recognise the d-pad controls

    I'm also interested in the level editor, can I compile that too for Linux? I'm guessing not, because of the heavy reliance on DirectX?

    Thanks for your time, and kudos for making this cool game natively available to us Linux gamers.
    Maybe because its a generating SDL hat events rather than joystick buttons...

    I had no real interest in porting the editor. Maybe if it builds with visual studio it could run under wine.

    thanks for the interest and comments.

    Leave a comment:


  • Pickle
    replied
    Originally posted by Naquatis View Post
    That sounds great! Is it possible to give us a hint where we need to edit the sourcecode to alter the rounding of the texture coordinates? Or maybe a patch to do that?
    All the changes are commited, give it a try and see if it works for you.

    Leave a comment:


  • PooshhMao
    replied
    Hi,

    I managed to compile a working version for my own Ubuntu derivative, and it works pretty well. There's some graphic glitches here and there, but nothing serious, and I have them in other games too, so that's probably a driver issue.

    I would like to use my Logitech FZ10 gamepad (which works perfectly everywhere else), but Hurrican does not recognise the d-pad controls, forcing me to use the analogue thumbstick, which doesn't work that well because of (I suspect) calibration issues. It tends to get stuck in certain directions (mostly up) which makes playing difficult. I have tried both joypad and joystick modes (what's the difference except for the amount of fire buttons recognized?) and adjusting the sensitivity, but no dice. I suppose I could use a tool such as QJoypad and use digital controls that way, but I'd rather not, it would be better if Hurrican could just recognise (and use) every control on my joypad correctly.

    I'm also interested in the level editor, can I compile that too for Linux? I'm guessing not, because of the heavy reliance on DirectX?

    Thanks for your time, and kudos for making this cool game natively available to us Linux gamers.

    Leave a comment:


  • Naquatis
    replied
    Texture rounding

    I tried to get a little bit deeper into this texture thing.
    I searched after round in the SDLPort directory with:

    Code:
    grep -r -i round ./
    The only file that contains a round in there is texture.cpp in the following function:

    Code:
    int nextPowerOfTwo(int x)
    {
        double logbase2 = log(x) / log(2);
        return (int)round(pow(2,ceil(logbase2)));
    }
    If this function get a value e.g. 198 it will calculate the next power by two value. In this case 256.
    Using round() is not needed because ceil() already raise the value to the next integer without anything after the decimal point.

    So even if you remove round() you will end up with the same result.

    Maybe I took rounding to much by the word.

    Next I will create a diff over the src directory to get an idea of what was changed in here.

    Leave a comment:


  • Naquatis
    replied
    Fix

    Originally posted by Pickle View Post
    I have a fix that i just havnt put in the source control. The texcoords are rounding wrong for some hardware.
    That sounds great! Is it possible to give us a hint where we need to edit the sourcecode to alter the rounding of the texture coordinates? Or maybe a patch to do that?

    Leave a comment:

Working...
X