sdl vs gdi August 23, 2009, 07:58:29 pm Having just downloaded the all-in-one package, running it, noticing it feels a little slow (default map), then looking around at the 'how to get' post... Looks like there's only one Windows executable. Do I guess correctly that it's based on the GDI binary?If so, might there be a discussion about compiling an SDL-based binary?At least on my system, the SDL one offers me tons more speed. Like, I can run SDL full-screen 1600x1200 and scroll smoothly; but with GDI, even at initial smaller size, it's not smooth. That difference in speed means smaller games under GDI...Now, if I'm wrong and it's already using SDL, it just means on my machine, it's rather slow.Either way, I'm going not to find out what all was changed over the past few versions so I can try it all out now. Quote Selected
Re: sdl vs gdi Reply #1 – August 23, 2009, 08:37:05 pm Isaac,thank you for your feedback :-) There is an SDL version regularly compiled for Simutrans-Experimental: it is available with the binaries only package (see here for details). The complete package is designed for less experienced users, and so must be as simple to set up as possible. Having a choice between the GDI and SDL binaries would make things too complicated. I therefore had to decide which to use.I chose the GDI because (1) it matches the look and feel of Windows better; (2) it does not require its own libraries to be installed; (3) it has a proper icon in the top left hand corner, unlike the SDL version; and (4) for most people, it should be slightly faster, because it requires no extra libraries.I am not sure why, in your particular case, it is so much slower. However, all that you need to do is download the SDL version from the binaries only package and extract it into the Simutrans-Experimental directory :-) Quote Selected
Re: sdl vs gdi Reply #2 – August 24, 2009, 07:37:36 am Off-topic: How come roughly 50% of techies (including those on other forums) state SDL is faster, but another 50% says GDI is faster? On Isaac's system GDI doesn't work so well at all, but on my system I hardly see any difference... Quote Selected
Re: sdl vs gdi Reply #3 – August 24, 2009, 10:07:23 am Somewhere down under, both of them try to use hardware acceleration if available (I think, based on what other people said). That could be the difference... depending on how they go about it and what is available (OpenGL vs. DirectDraw). Maybe Quote Selected
Re: sdl vs gdi Reply #4 – August 24, 2009, 07:43:41 pm But there's no possibility to use hardware acceleration in Simutrans - there are no 3d graphics... Quote Selected
Re: sdl vs gdi Reply #5 – August 24, 2009, 08:50:51 pm Indeed there is: even blitting bitmaps can get a lot faster if done better - somehow Notice that eg. DirectX is a sort of umbrella name for a whole family of technologies (?) named DirectSomething (see Wikipedia entry) and handling 3D is only one component on that list.But all the libraries hide this aspect thoroughly so there is no telling how much that actually affects us. Quote Selected
Re: sdl vs gdi Reply #6 – September 02, 2009, 01:26:22 pm The actual reason is that simutrans uses 16Bit graphics which is slowly fading out (Vista dooes not offer them on the display setting dialog, even though it still supports them for fullscreen). Depending on the driver going via DirectX, OpenGL, or native may be faster because it still uses the blitter chip for 16bit mode. However, which method is faster is really unpredictable and depends on the graphics driver and OS. Quote Selected
Re: sdl vs gdi Reply #7 – September 02, 2009, 01:49:08 pm i'm sorry to ask you a silly question, but if 16bit is getting outdated, why don't we switch to a newer format? Quote Selected
Re: sdl vs gdi Reply #8 – September 02, 2009, 03:52:20 pm I'd list memory consumption and performance problems. At least the drawing routines of Simutrans will get slower with 32 bit images. These are one step earlier in the graphics pipeline than the routines that Prissi mentioned, which will actually display the pre-drawn screen buffer of Simutrans.It's hard to predict if 32 bit sprites will be faster, but I'd put my bet on "slower" unless Simutrans' drawing routines changed drastically since I worked on them. Quote Selected
Re: sdl vs gdi Reply #9 – September 05, 2009, 12:09:24 pm 32 Bit copying is not faster, but also not much slower. But it has double memory consumption for five lookup tables and main screen without any gain ... Quote Selected
Re: sdl vs gdi Reply #10 – September 05, 2009, 01:41:13 pm how far does the backward compatiblity to old hardware go? i mean that mostly regarding processing power and memory capacity. or are there (plans) for other platforms i overlooked yet.even with large maps, many cities and convoys it doesn't have any hit on my system, and it's fairly old and was definitely not highend at that time.ps.: after reading again i think it could be missunderstood, i ask out of interesst only. Quote Selected
Re: sdl vs gdi Reply #11 – September 05, 2009, 03:45:36 pm The graphics are 16Bit anyway, so there is no new detail to gain from going 24 bits (or 32 bit). Also thinking of I phone and similar gadgets, memory and speed are concerns there. Quote Selected