For direct access use https://forums.oldunreal.com
It's been quite a while since oldunreal had an overhaul, but we are moving to another server which require some updates and changes. The biggest change is the migration of our old reliable YaBB forum to phpBB. This system expects you to login with your username and old password known from YaBB.
If you experience any problems there is also the usual "password forgotten" function. Don't forget to clear your browser cache!
If you have any further concerns feel free to contact me: Smirftsch@oldunreal.com

SDL2Drv & SDL2Launch

for Unreal & UnrealTournament
User avatar
Smirftsch
Administrator
Posts: 8999
Joined: Wed Apr 29, 1998 10:00 pm
Location: NaPali
Contact:

SDL2Drv & SDL2Launch

Post by Smirftsch »

Made a new launcher and window handler based on SDL2. Its an update and overhaul of the already known SDLDrv and SDLLaunch known from Linux and the public headers in Linux.
I made a Linux and a Windows version, while for Windows its probably of no interest (at least for 227), since it does not contain a logwindow or preferences window yet. Out of question entirely is UED. Maybe for other Windows UEngine1 games it could be of interest since it is using RawHID, but for 227 this is already implemented in WinDrv.

I updated the input system to fit SDL2, made some cleanups and also fixed the mousehandling, when using UMenu it has now accurate mousepointer position to navigate in windowed mode (non grabbed).

The next mindblowing ultraimportant and life essential feature is the ubercool Unreal Splashscreen:
[img]http://www.oldunreal.com/pics/splash.jpg[/img]

also some minor things like dialog windows with "ok" and "yes/no":
[img]http://www.oldunreal.com/pics/yesno.jpg[/img]

and some complete error history as already known from Windows:
[img]http://www.oldunreal.com/pics/error.jpg[/img]

still need to fix some execs and it also requires some more testing, but its already in a quite usable state.
Sometimes you have to lose a fight to win the war.
User avatar
スマイル・ドラゴン
OldUnreal Member
Posts: 1263
Joined: Sun Feb 10, 2008 9:07 pm

Re: SDL2Drv & SDL2Launch

Post by スマイル・ドラゴン »

Do you really need to make your debugging so polite?

Jokes aside, this is a amazing step forward Smirftsch. Default SDL for Unreal is extremely primitive.

Another thing I would like is native X11 implementation but as I understand it that would be a serious amount of work effort needed to properly port Unreal to a natural X11/GTK+ environment.
“I am the dragon without a name.”
Ðàrk-_¦_-Ñïght.: / κυνικός Δράκων / スマイル・ドラゴン / Draco Nihil
User avatar
Smirftsch
Administrator
Posts: 8999
Joined: Wed Apr 29, 1998 10:00 pm
Location: NaPali
Contact:

Re: SDL2Drv & SDL2Launch

Post by Smirftsch »

LOL, sorry :D

Well, SDL2 was a logical step, since SDL1 is already there and it didn't require to rewrite it from scratch. Also it has the advantage to have clear api and that it is cross platform, with X11 that's already somewhat limited.

However, for a log window SDL is not very handy already and a possible preferences window almost insane (from what I learned so far at least).
To make such things I need some kind of GUI toolkit and checked quite some, GTK, QT, wxwidgets, cegui... - some of these could be combined with SDL, some not and for some it would be of advantage to write drv & launch first (means yet to really restart again but then entirely from scratch with it).
I didn't find the "best" solution so far and I am not sure yet what to do now to continue, reading through all these, to understand how there api works and if its even feasible to combine with SDL is already quite some work.
Still it seems to be already better than what we had.
Last edited by Smirftsch on Thu Feb 19, 2015 7:40 pm, edited 1 time in total.
Sometimes you have to lose a fight to win the war.
User avatar
スマイル・ドラゴン
OldUnreal Member
Posts: 1263
Joined: Sun Feb 10, 2008 9:07 pm

Re: SDL2Drv & SDL2Launch

Post by スマイル・ドラゴン »

Yeah that's the headache with Linux. There's so many different widget toolkits with some catered more towards a specific desktop environment... atleast from what I can tell.

Don't let it all go to your head though, what you have now is already lightyears ahead of how even stock UT99 was ported to Linux years ago.
“I am the dragon without a name.”
Ðàrk-_¦_-Ñïght.: / κυνικός Δράκων / スマイル・ドラゴン / Draco Nihil
User avatar
Smirftsch
Administrator
Posts: 8999
Joined: Wed Apr 29, 1998 10:00 pm
Location: NaPali
Contact:

Re: SDL2Drv & SDL2Launch

Post by Smirftsch »

forgot one thing: support to write unicode chars, including all combinations with alt/ctrl etc.
Sometimes you have to lose a fight to win the war.
User avatar
han
Global Moderator
Posts: 686
Joined: Wed Dec 10, 2014 12:38 am

Re: SDL2Drv & SDL2Launch

Post by han »

Minor suggestion:
You should replace text polite crash dialog text with some even more polite british english test.

Good work, it'll be nice to have for Klingon Honor Guard. :)
HX on Mod DB. Revision on Steam. Löffels on Patreon.
User avatar
Smirftsch
Administrator
Posts: 8999
Joined: Wed Apr 29, 1998 10:00 pm
Location: NaPali
Contact:

Re: SDL2Drv & SDL2Launch

Post by Smirftsch »

oh and just verified its working, you can set up to 8 mousebuttons now as well and added ability to resize the window (with mouse on windowframe).
Since I lack such a thing can't say how it works with joystick though.
Last edited by Smirftsch on Fri Feb 20, 2015 12:38 pm, edited 1 time in total.
Sometimes you have to lose a fight to win the war.
User avatar
GreatEmerald
OldUnreal Member
Posts: 5347
Joined: Mon May 21, 2007 2:30 pm

Re: SDL2Drv & SDL2Launch

Post by GreatEmerald »

This is pretty neat. But strange that it has buttons, but no other widgets. I guess it doesn't make much sense to use a separate toolkit just to get the preferences window working (and definitely not one that would require X). For UnrealEd it definitely would make sense, but just for one window that just edits the INI, I gues not.

Also, Smirf, did you get my PM?
User avatar
Smirftsch
Administrator
Posts: 8999
Joined: Wed Apr 29, 1998 10:00 pm
Location: NaPali
Contact:

Re: SDL2Drv & SDL2Launch

Post by Smirftsch »

yes, that pretty much sums it up.
Yeah got it, sorry, had a flu the last days and forgot about it. Will notify once I have a new complete build (this weekend at max).
Sometimes you have to lose a fight to win the war.
User avatar
GreatEmerald
OldUnreal Member
Posts: 5347
Joined: Mon May 21, 2007 2:30 pm

Re: SDL2Drv & SDL2Launch

Post by GreatEmerald »

Did a quick test of it, and it's pretty neat in windowed mode, but has issues in fullscreen, especially when using dual monitors.

In that scenario, I get two mouse pointers: the Win95-looking one from the game and the OS one. The Win95 one is what interacts with the game, but the OS one is what defines what the borders are. The game pointer moves faster than the OS pointer. If I move the mouse outside the window screen, the game stops receiving mouse input, which means that I can only ever rotate about 180 degrees.

The windowed mode is much better, there is only the OS pointer and

Also, there still seem to be issues with stability, I still get these errors when loading maps from time to time:

Code: Select all

Log: LoadStream
User avatar
Smirftsch
Administrator
Posts: 8999
Joined: Wed Apr 29, 1998 10:00 pm
Location: NaPali
Contact:

Re: SDL2Drv & SDL2Launch

Post by Smirftsch »

thanks for the feedback, will look into these things. Can't promise anything for dual screen though, I don't have such a setup...maybe can catch ya in messenger or irc or something for some quick tests?

A few questions regarding the crash when loading maps- I can't even remember when I've seen something like this the last time, is it some specific map(s) or plain random? Any way for force it?
Last edited by Smirftsch on Wed Apr 08, 2015 3:17 pm, edited 1 time in total.
Sometimes you have to lose a fight to win the war.
User avatar
GreatEmerald
OldUnreal Member
Posts: 5347
Joined: Mon May 21, 2007 2:30 pm

Re: SDL2Drv & SDL2Launch

Post by GreatEmerald »

Sure, I'm always on irc.globalgamers.net.

And it's random as far as I can tell. Earlier it was that maps using 227 features would tend to crash more, but now I got the crash on a stock map. I'll see if I can find a pattern, though.
User avatar
Smirftsch
Administrator
Posts: 8999
Joined: Wed Apr 29, 1998 10:00 pm
Location: NaPali
Contact:

Re: SDL2Drv & SDL2Launch

Post by Smirftsch »

any specific channel there? Otherwise you may want to come into #oldunreal @ quakenet :)

Then a few less important issues:
One, the mousewheel doesn't seem to be recognised, so I can only switch weapons via keyboard.
Would have helped to implement it...
Two, I managed to break my desktop completely when I first enabled fullscreen mode (my fault for not merging UnrealLinux.ini with DefaultLinux.ini earlier, so it defaulted to 0x0). Normally this would be expected, except not with SDL2.
Take a look at this:
https://wiki.libsdl.org/SDL_SetWindowFullscreen
https://wiki.libsdl.org/SDL_CreateWindow
SDL2 allows using SDL_WINDOW_FULLSCREEN_DESKTOP instead of SDL_WINDOW_FULLSCREEN, which guarantees that your desktop will never be broken, and the native resolution is used automatically. This is one of the most important features of SDL2!
I noticed this function but didn't take a deeper look into it. Changed :)

Three, the font looks very ugly because it's not using alpha blending. UFO:AI had a very similar problem when porting from SDL1 to SDL2, too.
I think this was a problem with a font import, if you are referring to UMenu

continuing with the other things :)
Last edited by Smirftsch on Thu Apr 09, 2015 9:17 am, edited 1 time in total.
Sometimes you have to lose a fight to win the war.
User avatar
GreatEmerald
OldUnreal Member
Posts: 5347
Joined: Mon May 21, 2007 2:30 pm

Re: SDL2Drv & SDL2Launch

Post by GreatEmerald »

any specific channel there? Otherwise you may want to come into #oldunreal @ quakenet :)
#beyondunreal, #unrealtournament, also #unrealtournament in FreeNode. But, of course, you can just /msg me, same nick everywhere.
User avatar
Smirftsch
Administrator
Posts: 8999
Joined: Wed Apr 29, 1998 10:00 pm
Location: NaPali
Contact:

Re: SDL2Drv & SDL2Launch

Post by Smirftsch »

ok :)

I tried some with mapchanges and I switched at least ~20 (stock) maps, no crash so far.
Sometimes you have to lose a fight to win the war.
User avatar
Smirftsch
Administrator
Posts: 8999
Joined: Wed Apr 29, 1998 10:00 pm
Location: NaPali
Contact:

Re: SDL2Drv & SDL2Launch

Post by Smirftsch »

after some tests and some more reading I see that there are quite some problems with SDL_WINDOW_FULLSCREEN_DESKTOP - it's only supposed to use the current desktop resolution, instead of using the pre-set fullscreen size (resizing it). I didn't get that at first when I read what you wrote.
I don't see a way to make proper use of that in this context since its not the expected behavior. Maybe it could use an additional setting for that purpose though, but that would be the only way it makes sense I think.

I also can't reproduce this mousepointer issue, I very much assume this is a dual monitor problem as well.
Last edited by Smirftsch on Thu Apr 09, 2015 11:39 am, edited 1 time in total.
Sometimes you have to lose a fight to win the war.
User avatar
GreatEmerald
OldUnreal Member
Posts: 5347
Joined: Mon May 21, 2007 2:30 pm

Re: SDL2Drv & SDL2Launch

Post by GreatEmerald »

Looks like the crash happens only on first map change. If you manage to mapchange once successfully, all the subsequent changes will be successful too. But for me, the very first map started (to test I just use Deathmatch, DmAriza, 4 skilled bots) crashes at about a 75% rate.

The error message can be a bit different each time, though. Here's a selection:

Code: Select all

Backtrace: LinkCleanup
Last edited by GreatEmerald on Thu Apr 09, 2015 2:24 pm, edited 1 time in total.
User avatar
GreatEmerald
OldUnreal Member
Posts: 5347
Joined: Mon May 21, 2007 2:30 pm

Re: SDL2Drv & SDL2Launch

Post by GreatEmerald »

Oh, and as for dual monitors, you can easily test it with VirtualBox, just set two monitors:
User avatar
GreatEmerald
OldUnreal Member
Posts: 5347
Joined: Mon May 21, 2007 2:30 pm

Re: SDL2Drv & SDL2Launch

Post by GreatEmerald »

Tested some more, and in network games from time to time I get a crash like this:

Code: Select all

OpenAL: alGenBuffers failed Invalid Name
OpenAL: playing fourth hub 4 (Impulse Tracker 2.14v3 S3M)
Backtrace: UALAudioSubsystem::RegisterMusic
Last edited by GreatEmerald on Thu Apr 09, 2015 7:23 pm, edited 1 time in total.
User avatar
Smirftsch
Administrator
Posts: 8999
Joined: Wed Apr 29, 1998 10:00 pm
Location: NaPali
Contact:

Re: SDL2Drv & SDL2Launch

Post by Smirftsch »

Oh, and as for dual monitors, you can easily test it with VirtualBox, just set two monitors:
Thats indeed a good idea :)
Tested some more, and in network games from time to time I get a crash like this:

Code: Select all

OpenAL: alGenBuffers failed Invalid Name
OpenAL: playing fourth hub 4 (Impulse Tracker 2.14v3 S3M)
Backtrace: UALAudioSubsystem::RegisterMusic
Last edited by Smirftsch on Fri Apr 10, 2015 6:00 am, edited 1 time in total.
Sometimes you have to lose a fight to win the war.
User avatar
GreatEmerald
OldUnreal Member
Posts: 5347
Joined: Mon May 21, 2007 2:30 pm

Re: SDL2Drv & SDL2Launch

Post by GreatEmerald »

Really doesn't look like a redirect issue, this seems to be some hash problem in the tree hash, doubt it's related. Could be originated somewhere completely else, could you test a bit with -nomusic parameter or with anything else than ALAudio? A lot of this above smells a bit like a threading problem to me.
This always happens when I try to connect to a server like HyperCoop: first, the packages to download are shown, the percentages go up, but as it hits 100% I can briefly see "download failed". It still goes on to the next package and so on until it finishes, and then tries to load the game, and then crashes with that error.

I could try it with different settings, but I doubt it would help downloading packages...
User avatar
Smirftsch
Administrator
Posts: 8999
Joined: Wed Apr 29, 1998 10:00 pm
Location: NaPali
Contact:

Re: SDL2Drv & SDL2Launch

Post by Smirftsch »

Oh, don't get that wrong, I never said it wouldn't be the cause or wouldn't be happening when downloading from a redirect, but I doubt it is the origin of the problem :)

Unfortunately I can't reproduce this here either, it downloads without any crashes.

So, did you try without music?

Edit: After some messing around with my old ini I noticed the same behavior, it tried to connect, said connection failed, then continued without redirect.
Using a fresh clean ini solved that behavior and it downloaded from the redirect just fine. It seems that redirect download itself is working, however, I have no idea what setting in the old ini caused that behavior.
You can verify that when starting up Unreal with -log parameter from a console, it should look like this:
using HTTPDownload
Resolving bobisunreal.ddns.net...
Resolved bobisunreal.ddns.net (69.142.171.8)
No real luck with the crashes so far, it crashed once (with the old ini) after downloading ~90 packages from various servers.
Last edited by Smirftsch on Fri Apr 10, 2015 12:34 pm, edited 1 time in total.
Sometimes you have to lose a fight to win the war.
User avatar
GreatEmerald
OldUnreal Member
Posts: 5347
Joined: Mon May 21, 2007 2:30 pm

Re: SDL2Drv & SDL2Launch

Post by GreatEmerald »

Hmm, interesting. For reference, here's a diff of what I have now: https://bpaste.net/show/5bd78d7694ad
I'll try clearing and recreating it anew, and see about the audio.

EDIT: Cleared it, set to SWFMOD, so far so good, but got another crash when pressing F5 in the server browser:

Code: Select all

FThreadingBase::~FThreadingBase
Last edited by GreatEmerald on Fri Apr 10, 2015 9:14 pm, edited 1 time in total.
User avatar
Smirftsch
Administrator
Posts: 8999
Joined: Wed Apr 29, 1998 10:00 pm
Location: NaPali
Contact:

Re: SDL2Drv & SDL2Launch

Post by Smirftsch »

yeah, can't see anything obvious in your ini either, will try with the F5 now, but it really looks like there is a threading problem remaining as suspected initially...

Edit: The annoying thing with such problems is, that different systems behave differently, I don't have any crashes like this either. Nevertheless it gives me a good indication where to look and well..I'm afraid you have to be guinea pig :P
Last edited by Smirftsch on Sat Apr 11, 2015 5:46 am, edited 1 time in total.
Sometimes you have to lose a fight to win the war.
User avatar
Smirftsch
Administrator
Posts: 8999
Joined: Wed Apr 29, 1998 10:00 pm
Location: NaPali
Contact:

Re: SDL2Drv & SDL2Launch

Post by Smirftsch »

I am really not happy with SDL_WINDOW_FULLSCREEN_DESKTOP - it won't stretch anything and setting it with SDL_RenderSetLogicalSize(Renderer,NewX,NewY); doesn't help either, the docs about this are not very helpful. I assume it's because of being an OpenGL window, while the stretch is supposed to be working only with SDL rendering functions.
Next problem is, that GetRes always returns desktop resolution then instead of the really set up resolution (using SDL_GetDisplayMode) and I didn't find a corresponding function yet to give the proper resolution back for SDL_WINDOW_FULLSCREEN_DESKTOP.
Granted- I could pass the values instead of retrieving it, but that wouldn't be the idea of it either.
Currently this doesn't seem to be a useful fix for multi desktop environments.
Last edited by Smirftsch on Sat Apr 11, 2015 7:27 am, edited 1 time in total.
Sometimes you have to lose a fight to win the war.
Post Reply

Return to “Linux-Board”