logo
Main

Forums

Downloads

Unreal-Netiquette

Donate for Oldunreal:
Donate

borderline

Links to our wiki:
Wiki

Walkthrough

Links

Tutorials

Unreal Reference

Usermaps

borderline

Contact us:
Submit News
Page Index Toggle Pages: [1] 2 3  Send TopicPrint
Very Hot Topic (More than 25 Replies) SDL2Drv & SDL2Launch (Read 12117 times)
Smirftsch
Forum Administrator
*****
Offline



Posts: 7935
Location: at home
Joined: Apr 30th, 1998
Gender: Male
SDL2Drv & SDL2Launch
Feb 19th, 2015 at 6:36pm
Print Post  
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:


also some minor things like dialog windows with "ok" and "yes/no":


and some complete error history as already known from Windows:


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.
Back to top
WWWICQ  
IP Logged
 
スマイル・ドラゴン
Betatester
Offline


『smile。。。』

Posts: 1236
Location: Independence, KS
Joined: Feb 10th, 2008
Gender: Male
Re: SDL2Drv & SDL2Launch
Reply #1 - Feb 19th, 2015 at 7:23pm
Print Post  
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
Back to top
IP Logged
 
Smirftsch
Forum Administrator
*****
Offline



Posts: 7935
Location: at home
Joined: Apr 30th, 1998
Gender: Male
Re: SDL2Drv & SDL2Launch
Reply #2 - Feb 19th, 2015 at 7:35pm
Print Post  
LOL, sorry Cheesy

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.
  

Sometimes you have to lose a fight to win the war.
Back to top
WWWICQ  
IP Logged
 
スマイル・ドラゴン
Betatester
Offline


『smile。。。』

Posts: 1236
Location: Independence, KS
Joined: Feb 10th, 2008
Gender: Male
Re: SDL2Drv & SDL2Launch
Reply #3 - Feb 19th, 2015 at 7:44pm
Print Post  
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
Back to top
IP Logged
 
Smirftsch
Forum Administrator
*****
Offline



Posts: 7935
Location: at home
Joined: Apr 30th, 1998
Gender: Male
Re: SDL2Drv & SDL2Launch
Reply #4 - Feb 19th, 2015 at 7:57pm
Print Post  
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.
Back to top
WWWICQ  
IP Logged
 
han
Global Moderator
Unreal Rendering Guru
Developer Team
*****
Offline


Oldunreal member

Posts: 572
Location: Germany
Joined: Dec 10th, 2014
Gender: Male
Re: SDL2Drv & SDL2Launch
Reply #5 - Feb 19th, 2015 at 8:03pm
Print Post  
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. Smiley
  

HX on Mod DB. Revision on Steam. Lffels on Patreon.
Back to top
 
IP Logged
 
Smirftsch
Forum Administrator
*****
Offline



Posts: 7935
Location: at home
Joined: Apr 30th, 1998
Gender: Male
Re: SDL2Drv & SDL2Launch
Reply #6 - Feb 20th, 2015 at 12:35pm
Print Post  
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.
  

Sometimes you have to lose a fight to win the war.
Back to top
WWWICQ  
IP Logged
 
GreatEmerald
Oldunreal MasterPoster
*
Offline


The Great Emerald

Posts: 5361
Location: Vilnius, Lithuania
Joined: May 21st, 2007
Gender: Male
Re: SDL2Drv & SDL2Launch
Reply #7 - Mar 25th, 2015 at 8:35pm
Print Post  
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?
  
Back to top
WWW  
IP Logged
 
Smirftsch
Forum Administrator
*****
Offline



Posts: 7935
Location: at home
Joined: Apr 30th, 1998
Gender: Male
Re: SDL2Drv & SDL2Launch
Reply #8 - Mar 26th, 2015 at 6:37am
Print Post  
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.
Back to top
WWWICQ  
IP Logged
 
GreatEmerald
Oldunreal MasterPoster
*
Offline


The Great Emerald

Posts: 5361
Location: Vilnius, Lithuania
Joined: May 21st, 2007
Gender: Male
Re: SDL2Drv & SDL2Launch
Reply #9 - Apr 8th, 2015 at 3:09pm
Print Post  
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 <- UStruct::SerializeTaggedProperties <- UClass::Serialize <- LoadObject <- ULinkerLoad::Preload <- ULinkerLoad::Preload <- ULinkerLoad::CreateExport <- IndexToObject <- ULinkerLoad<<UObject <- ULevelBase::Serialize <- ULevel::Serialize <- LoadObject <- ULinkerLoad::Preload <- PreLoadObjects <- UObject::EndLoad <- UObject::StaticLoadObject <- LoadLevel <- UGameEngine::LoadMap <- LocalMapURL <- UGameEngine::Browse <- ClientTravel <- UGameEngine::Tick <- UpdateWorld <- MainL 



Then a few less important issues:
One, the mousewheel doesn't seem to be recognised, so I can only switch weapons via keyboard.

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!

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.

Four, using libssr-glinject.so instead of libGL.so.1 for recording now breaks the game and gives a GPF:
Code
Select All
UOpenGLRenderDevice::Init <- USDL2Viewport::TryRenderDevice <- USDL2Viewport::OpenWindow <- UGameEngine::Init <- InitEngine <- main 

  
Back to top
WWW  
IP Logged
 
Smirftsch
Forum Administrator
*****
Offline



Posts: 7935
Location: at home
Joined: Apr 30th, 1998
Gender: Male
Re: SDL2Drv & SDL2Launch
Reply #10 - Apr 8th, 2015 at 3:16pm
Print Post  
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?
  

Sometimes you have to lose a fight to win the war.
Back to top
WWWICQ  
IP Logged
 
GreatEmerald
Oldunreal MasterPoster
*
Offline


The Great Emerald

Posts: 5361
Location: Vilnius, Lithuania
Joined: May 21st, 2007
Gender: Male
Re: SDL2Drv & SDL2Launch
Reply #11 - Apr 8th, 2015 at 4:46pm
Print Post  
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.
  
Back to top
WWW  
IP Logged
 
Smirftsch
Forum Administrator
*****
Offline



Posts: 7935
Location: at home
Joined: Apr 30th, 1998
Gender: Male
Re: SDL2Drv & SDL2Launch
Reply #12 - Apr 9th, 2015 at 9:17am
Print Post  
any specific channel there? Otherwise you may want to come into #oldunreal @ quakenet Smiley

GreatEmerald wrote on Apr 8th, 2015 at 3:09pm:
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...

GreatEmerald wrote on Apr 8th, 2015 at 3:09pm:
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 Smiley


GreatEmerald wrote on Apr 8th, 2015 at 3:09pm:
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 Smiley
  

Sometimes you have to lose a fight to win the war.
Back to top
WWWICQ  
IP Logged
 
GreatEmerald
Oldunreal MasterPoster
*
Offline


The Great Emerald

Posts: 5361
Location: Vilnius, Lithuania
Joined: May 21st, 2007
Gender: Male
Re: SDL2Drv & SDL2Launch
Reply #13 - Apr 9th, 2015 at 10:19am
Print Post  
Smirftsch wrote on Apr 9th, 2015 at 9:17am:
any specific channel there? Otherwise you may want to come into #oldunreal @ quakenet Smiley


#beyondunreal, #unrealtournament, also #unrealtournament in FreeNode. But, of course, you can just /msg me, same nick everywhere.
  
Back to top
WWW  
IP Logged
 
Smirftsch
Forum Administrator
*****
Offline



Posts: 7935
Location: at home
Joined: Apr 30th, 1998
Gender: Male
Re: SDL2Drv & SDL2Launch
Reply #14 - Apr 9th, 2015 at 10:23am
Print Post  
ok Smiley

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.
Back to top
WWWICQ  
IP Logged
 
Page Index Toggle Pages: [1] 2 3 
Send TopicPrint
Bookmarks: del.icio.us Digg Facebook Google Google+ Linked in reddit StumbleUpon Twitter Yahoo