Monday, May 9, 2016

Abuse 1996 - SDL port 0.9a



When I released my Quake 2D demo back in 2012 many people compared it to Abuse, a game by Crack dot Com released in 1996. While I was waiting for my new PC to get fixed(it took months!) I was stuck with a PC bought in 2005. I already played everything I could on it and my gaming options were limited. I found out Abuse was available for free, so I wanted to check it out. It ran in DOSBox at 320x200 resolution and felt like playing a FPS game with very low FOV. Aiming with the mouse was very difficult, because even in fullscreen the mouse was still behaving like it was 320x200 resolution and was too sensitive.

Reading the included readme file I saw there was a high resolution option, but it seemed to be only available in the shareware version or in editor mode, and the game would automatically turn off the in-game lights, because it would be too demanding for the PCs in 1996 on high resolutions. Not to mention a bug would cause the entire screen to go black the second time a level was loaded. While looking for a fix I found out the original source code was released and there were several source ports released during the years, mostly for Linux. Finally Xenoveritas SDL2 port from 2014 showed up in the search results and was exactly what I needed; a working Windows port, plus it had instructions how to build it.

After I enabled custom resolutions and fixed the light, I also wanted to extract the textures, so I can use them in my own engine. Then I saw Xenoveritas never finished adding Xbox controller support, so I did it instead... it didn't stop there, and here is the final result in motion:


As you can see the game gets pretty intense. It's a classic design where you need to find switches to open new areas, and you need to cleverly use security turrets and destructible walls to fight the enemies. It takes 2-3 hours to beat the game.

 Here is the list of updates in Abuse SDL 0.9a compared to Xenoveritas version from 2014:

- Enabled custom resolutions and enabled lights on high resolutions
- Re-enabled OpenGL rendering to enable vsync
- Game screen scaling in window and fullscreen mode using F11 and F12
- Enabled some high resolution images from the 1997 Mac OS release
- Fixed level music not being played correctly, added "victory" music in the end game screen
- Fixed the health power image, fixed mouse image when choosing initial gamma
- Added or re-enabled various settings in the config file (borderless window, grab input, editor mode, high resolution images...)
- Local save game files and configuration files
- Quick load using F9, quick save using F5 on save consoles
- Added cheats via chat console: bullettime, god, giveall, flypower, sneakypower, fastpower, healthpower, nopower
- XBox360 controller support with rebindable buttons
- Updated abuse-tool so it can extract the images in Abuse SPEC files to modern image formats as individual images, tilemaps or a texture atlas with information about image, tile and animation frame sizes and positions


I only tested the game on my old 2005 PC and the new one, running Windows 32bit and 64bit. I would really appreciate some feedback, so I know it works or not. I would also like to know how playing with the Xbox controller feels, since I plan to use the same controls in my own engine. Please read the included README file for more information, controls and links to previous port releases and other stuff. (NOTE: Since changing sound volume doesn't work, if you don't want music just delete the music folder). You can download the game from this link or on ModDB:

md5: 16E116B753A2142E4AE2BB63C2A4A351


I already mentioned I wanted to extract the images, so here is an archive that contains all the extracted Abuse images in PNG format, together with information about image name, size and positions of individual frames of animation: 
 Aliens addon

md5: 5A2D1E65A2D76C6C0D340F600E2F7B5B

I also used a HMI to MIDI converter to convert the music to MIDI. I didn't convert them to wav or mp3, because different soundfonts give different results when playing MIDI music. You can download the MIDI files here:
md5: 5FC937F71DB047DA9E46961F83016CDA

The source code for Abuse SDL port 0.9a is available on my GitHub page. As I said the game is not fully tested and there are few issues which are described in the README file. The game physics are locked at 15 FPS, and the rendering is a bit slow, those are two major things I would like to eventually fix. Multiplayer doesn't work, but that is way out of my league:


Thank you for playing Abuse!

57 comments:

  1. Thank you very much for updating this game. It means a lot. I hope you continue working on it in your spare time. So are you a software developer/engineer or some type of experienced programmer?

    ReplyDelete
    Replies
    1. Thank you for taking the time to write. There are still some things I would like to do with it, but I can't promise anything. I do have a masters degree in computer science, but I never managed to get a job in the field, and eventually quit trying. What you see on this blog is my only connection with software development and programming that is left.

      Delete
  2. Thanks for polishing this gem for us.

    ReplyDelete
  3. It looks very nice, I'll give it a try because I like the way it moves and plays. Thanks for your work.

    ReplyDelete
  4. Hi there, good to see this game hasn't been forgotten.
    Is it still possible to compile it for Linux?

    ReplyDelete
    Replies
    1. Hello. Yes it is possible and few people have done it (see my Abuse GitHub page->pull requests for more info), but I have very little experience with Linux, so I haven't tried it myself and don't have the compiled game to share. It should also work on Mac.

      Delete
  5. Amazing job! If there's a community for Abuse, I'd sure love to join it! This game is incredible, and your work is too! <3

    ReplyDelete
    Replies
    1. I think Abuse communities died 15 years ago. Only thing keeping the game alive are random people like me who discover the code after several years and mess around with it.

      Delete
  6. Thank you so much for this build. it runs great on win7!
    my strongest desire is for netplay. looking at the source on git it looks like you still had some stuff about multiplayer in there but when I launch the netplay button is not on the main menu?
    Also this is one of the only versions I could find that allows custom resolutions without being in edit mode. I have a few versions from dos that I can run in dosbox and multiplayer works with the ipx tunneling but no high resolution unless in edit mode. Im looking for a good version i can just zip up and move or give to friends and play multiplay wth no fiddling.

    ReplyDelete
    Replies
    1. Glad to hear. As for the multiplayer it would crash my PC so I disabled the button in the menu and replaced it with the credits button instead. If you read the TODO file on git the people who previously worked on this port never fixed it and I simply lack the knowledge to do it.

      Delete
    2. Thanks for the reply back. And So quick! Its a shame it crashes.

      Delete
    3. If I understand correctly, the multiplayer part of the game uses IPX instead of TCP-IP, so it means the only way to make mp working is to rewrite the whole mp code. Maybe it's easy if using special mp libraries around the web. I've seen some, but can't remember any.
      Who strongly wants mp use dosbox netplay emulation.

      Delete
  7. awww yeah. let's give it a go :D
    o/

    ReplyDelete
  8. Thank you very much for keeping this game alive!!!!

    ReplyDelete
  9. still playing this game in 2018.. thanks to YOU!

    ReplyDelete
    Replies
    1. Nice to hear. Don't forget all the others who worked on this before me :)

      Delete
  10. I am really really grateful to you for updating this game and making it playable on Windows. I played this game many years ago when it first came out. It is so scary--I don't think I was ever as scared playing any other game. I loved the ambience--what a creepy, surreal feeling.

    In the shareware version that I originally played, there was no music, only the sound and some occasionally repeated background effects. These really added to the ambience and mood, and in my opinion were a really important part of making the game so spooky and great.

    In all honesty, I find that the music (which I'm hearing for the first time with this version) really detract from the overall feel that the game originally had for me. The music covers up the sound. Further, the original game had such a great feel because you'd be walking along in silence for a while, then suddenly--RRAAAAWWW!!--some kind of creepy scream would give you a real jolt!

    Anyway, I noticed all the problems that you mentioned in the Readme regarding deactivating the music and how it automatically deactivates the sound. I tried what you suggested, re-enabling sound, then deactivating and starting the program again. It didn't work at all. I even tried removing the music files from their folder entirely while keeping the music setting activated. That also didn't work.

    Solution: But then I removed all the files from the music folder AND deactivated the music in the config file, per your instructions in the Readme. That worked!!

    So if anybody's looking for this solution, try my method. Maybe you can add this to a future Readme.

    Thanks again!

    ReplyDelete
    Replies
    1. Thanks. I agree about the atmosphere and music. I had the exact same experience playing Quake 2. I didn't have the CD, so music didn't play. Without the music that game was really scary. Basically, if you want to play these games as horror games, play on hard difficulty and turn off music. If you want to play as an action game, turn on the music. Two very different experiences.

      Delete
  11. Having played the multiplayer for this game back in a high school computer class during free time and the single player at home, it's great to see it still being improved.

    ReplyDelete
    Replies
    1. We played Half Life and Counter Strike in computer class :) Unfortunately I never played Abuse multiplayer and it doesn't work in this version. I wish someone with more experience would pick it up and bring MP back.

      Delete
    2. That would be great if someone did. I remember the multiplayer being fun as hell. I used this username, Predator, back when we played, and before people found out who was playing on it, this would be typical reactions:
      *Player dies* "Who's Predator? He's pretty good."
      *Player dies again* "Seriously, who the f*** is Predator?"
      *Player dies yet again* "Predator killed me again?!"
      "Predator's kicking our asses!"
      "Predator has to be cheating!"
      It wasn't long before they all tried ganging up on me, but they still couldn't win lol. In a different computer class we played multiplayer on Quake.

      Delete
  12. My son broke his left arm and asked me to look for a game he could play with his mouse. I remembered this from my childhood and figured asdf was manageable with a broken arm. Thanks so much for keeping it alive so I could share something from my childhood with my kids!

    ReplyDelete
  13. Hi

    Can you look for Ultrawide (21:9) Support ?

    The Main Menu HUD , will be show correct Screen Filled for 21:9 , but not the main Game.

    i think a good Res. is 1280x540 , i did play it with 2560x1080 , but all is so tiny , and i can see every Enemy before.

    And there is a Bug . over Resoultion like 960x540 , the Game will Crash , when look up with the Mouse , til the end of the Screen.

    ReplyDelete
    Replies
    1. I guess you are right. The game was originally made for 320x200 resolution that is 1.6 aspect ratio and adds black bars left and right if aspect ratio is larger. Since I have a normal widescreen monitor I didn't care about that when I worked on it. I haven't touched the code in 3 years, I might look into it some day, but not soon.

      If your monitor is 2560x1080, you can set the game to 1280x540 with scale set to 2, then run the game in borderless window or fullscreen. Then it will not be tiny and image will be sharp.

      Delete
  14. I loved playing this in school. However, I just tried edit mode, and it crashes.

    ReplyDelete
    Replies
    1. When does it crash, right at launch or later ? What operating system are you using ?

      Delete
    2. I'm using windows 10. It crashes as soon as the editor comes up.

      Delete
    3. I am using Windows 7, so I never tested it on Windows 10. Will have to look it up one day, but can't do anything now.

      Delete
  15. I see just downloading the game and the files aren't enough! How can I make my game look like yours in video?

    ReplyDelete
  16. I mean I copy/paste the file from here and there, made some changes in config file but it doesn't seem to work at all! A step by step instructions will be tremendously helpful.

    ReplyDelete
    Replies
    1. Send me an email at antonior.software@gmail.com and explain what exactly you wish to do.

      Delete
  17. Just wanted to tell that it is 2020 and game is still remembered
    Thank you.

    ReplyDelete
  18. I can't get it to work on a 1366x768 monitor: I have the crash problem when the mouse moves to the top of the screen as mentioned by TP555June 13, 2019 at 4:21 PM. Any suggestions? It happens in windowed mode too: move mouse to top most of screen and crash. Windows 10.

    ReplyDelete
    Replies
    1. Sorry, but I can't recreate the problem, it doesn't crash for me. Also I am still on Windows 7.

      Delete
    2. Thanks so much for getting back to me!

      If it's easy for you to do, would you give my settings a try?
      Windows 10 at 1366x768:
      fullscreen=2
      borderless=0
      vsync=0
      screen_width=640
      screen_height=360
      scale=2
      hires=1
      big_font=1
      linear_filter=1
      mouse_scale=1

      It works as long as I keep the cursor from the edges of the screen, but still crashes regardless after level 1 is completed.
      I don't even have to start a game for it to happen: I press space to get to the main menu, then move the cursor to the top of the screen and it hangs for a moment then crashes.

      I'll have to experiment with different monitors and on Windows 7, but it would be nice to know whether you can duplicate it.

      Thanks again!

      Delete
    3. I tried again with your settings, tried in window, fullscreen or borderless and it does not crash. I repeat this is on Windows 7, I don't have a Windows 10 computer to try it there.

      Delete
    4. Thanks so much, it's clearly a Windows 10 compatibility issue.

      This fixed it for me:
      Right click abuse.exe -> Properties -> Compatibility tab -> Run this program in compatibility mode for: Windows 7

      I made it to level two without any issues, thanks again!

      Delete
    5. Thanks for writing the solution.

      Delete
    6. I've still been having trouble.
      I was really hoping to be able to post back with a specific way to duplicate the problem, but the crashing seems just random at times. It happens sometimes even when the cursor isn't at the extent of the screen. The best way I've found to duplicate the crash is to play a new game to the first save point, open the save menu and start bouncing the cursor to the left of the screen with the save menu open. It happens even with Windows 7 compatibility enabled. Without Windows 7 compatibility enabled, bouncing the cursor at the top of the screen immediately after starting a new game will do it.

      I've messed a lot with the configuration settings trying to find something that would make it solid. I found that setting hires=0 brings a new level of stability, but sadly, it still happens.

      I tested on someone else's Windows 10 laptop just to be sure it wasn't me and got the same results.

      Again, the best stability I've achieved in Win 10 is to enabled Windows 7 compatibility and set hires=0 in user/config.txt.

      Delete
    7. I just had a chance to test this on my sister's Windows 10 laptop and I couldn't make it crash no matter what I did. It worked fine even without Windows 7 compatibility.

      Delete
  19. Hi

    I did Test that before with 1280x540 , when move the Mouse UP over the Screen , Crash !

    1024x432 with Scale x2 , Fix the Problem , but is even not in the correct 21:9 Aspect !

    16:9 is too not fully Patched , some small Blackbars Left and Right , same as 21:9 !

    Do you plan , or have soon a new Version Finish to Release ?

    The Game runs just with 18FPS in 2560x1080 , with 1024x432 Scale X2 , i have over 300FPS :D
    Ok i think , the very Huge View , breaks the Perf alot , and is too much for the Engine or SDL/OpenGL !!
    Do Please too add a Texture Filtering Option !

    ReplyDelete
  20. Re

    Or does something show up on the Left and Right Blackbars ?

    Then the Aspect Ratio will be ok

    I did play Abuse in MS-Dos very short , and i don't know the Complette Gameplay !

    ReplyDelete
    Replies
    1. I have no current plans for new version. The game is made for 320x200 resolution which is 16:10 and has black bars, I didn't try to figure out how to change that. The game runs slow at higher resolutions because the processor is rendering the game, not the graphics card. You can enable filtering in the config file, but it makes everything look blurry.

      Delete
  21. Re

    ah , 16:10 , yes i did Tested with 1680x1050 , there was the Screen complette Filled , but the Main Menu has a Correct Aspect Ratio or 16:9 and 21:9 Native Res. !

    Hmm processor is rendering the Game ?
    Your Port use OpenGL !

    Yes you have right
    linear_filter=1 , yes looks a bit Blury , but i can optimize that a bit with Reshade !

    Hmm you sure 320x200 is 16:10 ?
    More 4:3 :D
    Im look for a common 16:10 Downscale Res which fill the Screen . and looks simlair like the Original MS-Dos Res. !

    ReplyDelete
    Replies
    1. OpenGL is only used for final step. First the processor renders all the game entities on a off-screen buffer in the memory pixel by pixel, bit by bit. Then that result is converted to OpenGL texture which is then rendered to screen. Only that uses OpenGL and GPU. The advantage is we can enable vsync, filtering and scale the result to fit the screen. CPU rendering part is very complicated, code is not explained and I don't know how to change aspect ratio or remove black bars, we are lucky to be able to change resolution.

      Delete
  22. Re

    ok the Best Result , was 1680x1050 , but the Game still Crashed !
    320x200 to , but i does just fill the Screen when the Windows Base Resoultion is 1680x1050 ! also a General 16:10 Res. !

    we need a Fix , which ignore this , in Real Full Screen !!

    ReplyDelete
  23. Re

    i have Fix the Aspect with Reshade :D

    The Main Problem , is the Shooting Distance , is very limited , so it gives no better way . to play it in 320x200 Fill Screen fix with Reshade.

    An Correct Aspect Ratio will be fine yes , but not even with this very Limited Shooting Distance !!

    ReplyDelete
  24. Hi

    I have publish my Video , with all Fixes

    And now it looks better with Reshade , not anymore so Blury ?
    ah and not wonder because too high GPU Usage , Reahde Filters needs alot :D

    https://www.youtube.com/watch?v=Fljkoy65UfE

    ReplyDelete
  25. Strange you couldn't get it to act up. Did you try it without Compatibility Mode enabled? I'm not quite following TP555.
    I've tried it on a lot of VERY different computers (old, new, laptop, desktop: all Win10) with the same results.

    The first save point never fails and seems the most consistent test case: open the save-point keypad and start moving the mouse quickly left and right, up and down and all around in circles being careful to go past the extent of the screen (it can sometimes take a while). I've tried many different screen resolutions, but currently I'm at 1920x1080. I also tried locking the exe to just one CPU core in the task manager (which didn't help at all).

    Enabling Windows 7 Compatibility is the only thing I've found that helps. But it doesn't always work. On one desktop pc I tried, it made no difference at all. But in general, it does really help a lot.

    In case you're interested, this is the full configuration I'm using. I press F11 when the game first starts to go fullscreen:

    ; Abuse-SDL configuration file (v0.9a)

    ; SCREEN SETTINGS

    ;0 - window, 1 - fullscreen window, 2 - fullscreen
    fullscreen=2
    borderless=1
    vsync=1

    ; Game screen size (original 320x200)
    screen_width=640
    screen_height=360

    ; Scale window
    scale=3

    ; Enable high resolution screens, buttons and font
    ;Setting this to zero seems a bit more stable on Win10
    hires=0
    big_font=1

    ; Use linear texture filter (nearest is default)
    linear_filter=1

    ; SOUND SETTINGS

    ; Volume (0-127)
    volume_sound=127
    volume_music=127

    ; Disable music and sound effects
    no_music=0
    no_sound=0

    ; Use mono audio only
    mono=0

    ; RANDOM SETTINGS

    ; Enable editor mode
    editor=0

    ; Grab the mouse and keyboard to the window
    grab_input=1

    ; Fullscreen mouse scaling (0 - match desktop, 1 - match game screen)
    mouse_scale=1

    ; Physics update time in ms (65ms/15FPS original)
    physics_update=65

    ; Bullet time (%)
    bullet_time=120

    local_save=1

    ; PLAYER CONTROLS

    ; Key mappings
    left=a
    right=d
    up=w
    down=s
    special=SHIFT_L
    fire=f
    weapon_prev=q
    weapon_next=e
    special2=CTRL_L

    ; Alternative key mappings (only the following controls can have two keyboard bindings)
    left_2=LEFT
    right_2=RIGHT
    up_2=UP
    down_2=DOWN

    ; CONTROLLER SETTINGS

    ; Enable aiming
    ctr_aim=0

    ; Correct crosshair position (x)
    ctr_aim_x=0

    ; Crosshair distance from player
    ctr_cd=100

    ; Right stick/aiming sensitivity
    ctr_rst_s=10

    ; Right stick/aiming dead zone
    ctr_rst_dz=5000

    ; Left stick/movement dead zones
    ctr_lst_dzx=10000
    ctr_lst_dzy=25000

    ; Button mappings (don't use buttons for left/right movement)
    up=ctr_a
    down=ctr_b
    special=ctr_left_shoulder
    special=ctr_left_stick
    special2=ctr_left_trigger
    fire=ctr_right_shoulder
    fire=ctr_right_trigger
    fire=ctr_right_stick
    weapon_prev=ctr_x
    weapon_next=ctr_y
    quick_save=ctr_left_stick
    quick_load=ctr_right_stick

    ReplyDelete
  26. Hello, I have a few questions to ask:

    Do I need a copy of the game in order to compile the source code? If so, where can I buy the game?

    Are there any incompatibilities when compiling for Linux?

    ReplyDelete
    Replies
    1. You don't need game files to compile it. Game is freeware, just download the files from Github, ModDB or wherever you like. For Linux look at "Pull requests" section on Gitbub.

      Delete
  27. Hi! I just discovered this, thank you for your work on updating Abuse! I tried playing it but when I do the screen has green lines going across it. I tried in Windows 7 compatibility and that didn't work. I'm using Windows 10. Game seems to run fine except for the green lines.

    ReplyDelete
    Replies
    1. Sorry, but I never heard of such problem, I have no idea what could be wrong.

      Delete
  28. Hi

    @Unknown

    I did not test this under Win8.1 !

    What you can try under Win10 , is Disable the Full Screen Optimize , is there where you find the Compabitbly Modes. !

    Get the latest SDL2 Library DDL's and the extract them ,where abusesdl.exe or so is located. !
    https://www.libsdl.org/download-2.0.php
    For me i did , Works with the included SDL2. !

    Try with Reshade , mayby you have a OpenGL Problem , Reshade include a new Opengl32.dll after install it as OpenGL.

    When you have or use the German Text File , get my German Fix.
    Without that i had alot of Crashes , the problem was , AbuseSDL can't show ßäöü , and produces Random Crashes. !

    ReplyDelete