1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Two Factor Authentication is now available on BeyondUnreal Forums. To configure it, visit your Profile and look for the "Two Step Verification" option on the left side. We can send codes via email (may be slower) or you can set up any TOTP Authenticator app on your phone (Authy, Google Authenticator, etc) to deliver codes. It is highly recommended that you configure this to keep your account safe.

Reviving the engine, looking for C++ hackers!

Discussion in 'Original Unreal Tournament' started by G-Lite, Mar 9, 2010.

  1. G-Lite

    G-Lite ftw

    Joined:
    Jul 25, 2000
    Messages:
    1,777
    Likes Received:
    0
    Hi everyone!

    I'm tinkering with what source code we have of the engine behind the venerable UT'99. And I'm looking for partners in crime! The goal is to get things running smoothly on modern systems. The work I'm doing lives on Github. Note that there are no executables or binaries yet, just source code. You can find it at: http://github.com/stephank/surreal

    My background is in open-source software, so I'm hoping to collaborate in a bit of an open-source fashion. If you're familiar with git and Github, then feel free to clone/fork and hack away.

    The code is scavenged from the parts of version 432 that Epic released, parts of OpenUT, Chris Dohnal's work and my own. So this is not the complete engine, but significant parts are there that can be improved.

    Note that I'm working from Linux, but that's exactly where I need help the most: getting a Windows build environment going!

    Some of the things I'm working on:

    • The out-of-whack game speed on laptops, dual cores, etc. Whereas the game originally ran extremely fast on my laptop, builds I've produced run fine.
    • Chris Dohnal's modified OpenGLDrv is there, and with some minor touch-ups is working just fine on Linux. (D3D9Drv is there too, but that's just a code import, untested.)
    • With some modifications, and a single-byte binary patch to Core.so, I've upped the SDL dependency (from 1.1) to 1.2. This didn't change much for me, but might improve things for others in general.
    • I've rewritten the audio output using OpenAL 1.1, and already have working sound and music.
    • I've purged the code of old obsolete packages (XLaunch, XMesaGL, SDLAudio, etc.) and Playstation 2 support. (But it's still in the version control history.)

    I'm still thinking about how to release binaries for this. What with versioning and cheat detection. Some ideas/discussion regarding this is appreciated too!

    Besides posting here, I also hang out (again) on IRC, in #beyondunreal and #fragbu. Or tweet along with hashtag #ut99. (Also on identi.ca.)

    Hoping to garner some interest here. Discuss!
     
  2. Skillz

    Skillz ut-files.com

    Joined:
    Nov 29, 2003
    Messages:
    680
    Likes Received:
    0
    There are a lot of programmers on www.unrealadmin.org not sure if any of them would be interested in helping, but they do have knowledge.
     
  3. Kerr Avon

    Kerr Avon Member

    Joined:
    Jan 22, 2008
    Messages:
    195
    Likes Received:
    0
    I know I'm just dreaming here, but when you release the source code to this, would it be possible for it to be compiled for non-PC machines, such as the XBox 1 or the PS2 (as the XBox never had a commercial version, and the PS2 port was so disappointing)? If so then that would be beyond fantastic!

    Playing UT on an XBox... Brilliant!
     
  4. Skillz

    Skillz ut-files.com

    Joined:
    Nov 29, 2003
    Messages:
    680
    Likes Received:
    0
    That will not be possible. The entire source code of UT has not been released.
     
  5. Kerr Avon

    Kerr Avon Member

    Joined:
    Jan 22, 2008
    Messages:
    195
    Likes Received:
    0
    A real pity, thanks.
     
  6. FXD|Shadow

    FXD|Shadow Mad Man, really

    Joined:
    Feb 11, 2006
    Messages:
    148
    Likes Received:
    0
    What exactly do you want to improve, except the things already mentioned ?
     
  7. G-Lite

    G-Lite ftw

    Joined:
    Jul 25, 2000
    Messages:
    1,777
    Likes Received:
    0
    Well, there are a couple of things I need to get out of the way that are not really improvements. They are simply missing from the source code I have, but are in UT 436 for example.

    Even of the packages that I have source to, some of it seems to be old. For example, the way UT accesses configuration in Linux is by looking in the user's home directory. But that code is completely missing, and my build actually just looks in the application directory. That might've been acceptable in Windows 98, but it's troublesome on Linux and modern Windows versions too.

    I just finished a lot of polish in the OpenAL audio output. There are a couple of minor issues still, but nothing you are likely to notice during normal play.

    SDLDrv looks fairly broken in windowed mode. There's no mouse capture, and the menu pointer with absolute positioning simply doesn't work. Fullscreen works fine, though.

    I also need to figure out how to bring this to the man, in an official or semi-official way. It would need support from cheat prevention systems. And I wouldn't want it to break people's existing installs, regardless of whether they use 436 or UTPG's updates. And then there's the custom Setup system UT uses on Windows that I'm totally unfamiliar with.

    Besides that, there are some subtle improvements that could be made. From tinkering with the audio driver, I noticed I get fed the WAVs that live in the UAX packages directly. And that applies to the tracker files in UMXes as well. So there might be an opening for support of other audio formats, like Vorbis or FLAC. I haven't checked (in OpenGLDrv), but maybe this applies to other parts as well, think textures and models.

    There's a lot of unexplored code, still.
     
  8. G-Lite

    G-Lite ftw

    Joined:
    Jul 25, 2000
    Messages:
    1,777
    Likes Received:
    0
    I've uploaded some experimental binaries of the rewritten OpenAL audio driver.

    http://github.com/stephank/surreal/downloads

    This includes all the dependencies you should need. Exception is `libstdc++.so.6`, but it shouldn't be too hard to install that on modern distributions. (For Ubuntu, install the package `libstdc++6`.)

    I'll see if I can upload an updated UTGLR (Chris' OpenGLDrv) too, that works with standard UT99 installs.
     
  9. G-Lite

    G-Lite ftw

    Joined:
    Jul 25, 2000
    Messages:
    1,777
    Likes Received:
    0
  10. IronMonkey

    IronMonkey Moi?

    Joined:
    Apr 23, 2005
    Messages:
    1,746
    Likes Received:
    0
    I was about to post this as an answer to FXD|Shadow's question - a Linux build of UTGLR but you beat me to it.

    Nice work. I'll see if I can try it out tonight.
     
  11. FXD|Shadow

    FXD|Shadow Mad Man, really

    Joined:
    Feb 11, 2006
    Messages:
    148
    Likes Received:
    0
    Ah! An improved build of UT for Linux, good Idea

    Forget about UEngine Setup System, In my opinion this is crap

    Regarding Audio Files, there're indeed possibilities loading/streaming and playing other formats than Unreal's native package formats, just use external 3rd Party APIs (FMod, SDL) and imbed them into your native code, unfortunately Linux Native Coding seems to be completely undocumented..
     
  12. GreatEmerald

    GreatEmerald Khnumhotep

    Joined:
    Jan 20, 2008
    Messages:
    4,042
    Likes Received:
    1
    Not sure about EXEs, but I personally like UMODs. Once you set it up correctly (which takes like, oh, a minute to do?), it becomes a nice way of installing mods since you have the uninstall option and UMODs can manipulate INI settings without any user interaction and with an ability to undo the changes - the same way Git works nowadays.
    Is there UMOD support on Linux, by the way?
     
  13. IronMonkey

    IronMonkey Moi?

    Joined:
    Apr 23, 2005
    Messages:
    1,746
    Likes Received:
    0
    No. Which is why UMOD is a bit of a pain (but not as bad as EXE). ZIP is best from the Linux perspective otherwise one ends up using tools like umodunpack.
     
  14. Sir_Brizz

    Sir_Brizz Administrator Staff Member

    Joined:
    Feb 3, 2000
    Messages:
    25,995
    Likes Received:
    75
    No... there was a tool at some point that could unpack them though.
     
  15. IronMonkey

    IronMonkey Moi?

    Joined:
    Apr 23, 2005
    Messages:
    1,746
    Likes Received:
    0
    Last edited: Mar 10, 2010
  16. G-Lite

    G-Lite ftw

    Joined:
    Jul 25, 2000
    Messages:
    1,777
    Likes Received:
    0
    I couldn't get umodunpack to work for the life of me. It's old and dead.

    However...

    Source code to UCC is there, and it looks a lot more complete than what UT (for Linux) ships with. For example:

    Code:
    $ ./ucc help updateumod
    =======================================
    ucc.exe: UnrealOS execution environment
    Copyright 1999 Epic Games Inc
    =======================================
    
    Usage:
       ucc updateumod UmodFile Command [Filename]
    
    Parameters:
       UmodFile         The umod file to change or view
       Command          One of EXTRACT, ADD, DELETE, REPLACE or LIST
       Filename         The file to EXTRACT, ADD, DELETE or REPLACE
    
     
  17. IronMonkey

    IronMonkey Moi?

    Joined:
    Apr 23, 2005
    Messages:
    1,746
    Likes Received:
    0
    It's OK here.

    Just ran this (Fedora 12 x64):

    Code:
    [im@margrave01 Documents]$ ./umodunpack.pl -h 
    Usage: ./umodunpack.pl [--base <base_dir>] --list|--info|--unpack <umod_file>
    
      Unpack a Umod file for Unreal our Unreal Tournament.
    
        -h|--help             : this help
        -v|--version          : display version info
        -i|--info             : info on umod file
        -l|--list             : list files in Umod
        -b|--base <base_dir>  : base directory for Unreal install, default
                                is .
        -u|--unpack           : extract the files to the UT basedir (default)
        -e|--extract <file>   : extract specific file
        -r|--readme           : view ReadMe file, if any, in umod
    
      Use 'perldoc ./umodunpack.pl' for more info.
    
    [im@margrave01 Documents]$ ./umodunpack.pl -i BUFPackMutator.umod 
    
     Mod Name: BUF Bonuspack 1 (http://cogworks.beyondunreal.com/bufbp1/index.html)
      Version: 110 (http://cogworks.beyondunreal.com/bufbp1/index.html)
    Developer: CogWorks (http://cogworks.beyondunreal.com/)
    
    [im@margrave01 Documents]$ ./umodunpack.pl -u BUFPackMutator.umod 
    extracting file: Help\BUFPackMutator-ReadMe.txt
    extracting file: Help\bufbplogo-a.bmp
    extracting file: System\EnhancedItems.u
    extracting file: System\EnhancedItems.int
    extracting file: System\WeaponPriority.u
    extracting file: System\WeaponPriority.int
    extracting file: System\BUFPack1.u
    extracting file: System\BUFPack1.int
    extracting file: System\BUFFlameThrower.u
    extracting file: System\BUFFlameThrower.int
    extracting file: System\BUFMarbleGun.u
    extracting file: System\BUFMarbleGun.int
    [im@margrave01 Documents]$ ls ./System/
    BUFFlameThrower.int  BUFMarbleGun.int  BUFPack1.int  EnhancedItems.int  WeaponPriority.int
    BUFFlameThrower.u    BUFMarbleGun.u    BUFPack1.u    EnhancedItems.u    WeaponPriority.u
    [im@margrave01 Documents]$ 
    
     
  18. G-Lite

    G-Lite ftw

    Joined:
    Jul 25, 2000
    Messages:
    1,777
    Likes Received:
    0
    Ah, okay! It must be a Debian/Ubuntu problem then. I got tied up in odd Perl dependencies that neither Synaptic nor CPAN could install for me.

    There's another option, btw. And that is to use the alternate installer at: http://www.liflg.org/?catid=6&gameid=51
     
  19. IronMonkey

    IronMonkey Moi?

    Joined:
    Apr 23, 2005
    Messages:
    1,746
    Likes Received:
    0
  20. G-Lite

    G-Lite ftw

    Joined:
    Jul 25, 2000
    Messages:
    1,777
    Likes Received:
    0
    So I now have a Windows build environment in place. With Visual Studio Express 2008, it is now possible to build SDLLaunch, SDLDrv, OpenGLDrv, ALAudio and UCC. This is nice, because there's also a whole lot of code sharing between the two platforms. :D

    However, I know I broke some things which originally had Windows specific code. Like FrameRateLimit. And the whole input system now runs on SDL, so that might feel different.

    D3DDrv doesn't build, because I can't find the necessary development files in the latest DirectX SDK. However, Chris' D3D9Drv does build, but I'm not sure it works out of the box on top of SDLDrv. (But it can, in theory.)

    Aside from building, it doesn't really run yet. A lot of initialization works fine. For example, I see the splash screen, so SDL is initialized, and it also switches to the final display resolution. But then it disappears with minimal crash info.

    I believe MikMod, the MOD music player I use, is ruining things for me. It works peachy on Linux, but perhaps I'm doing something stupid on Windows.

    Who volunteers to take a look? ;)

    Edit: Definitely MikMod. I commented out the pieces related to music, and the game runs peachy otherwise. Woot!
     
    Last edited: Mar 12, 2010

Share This Page