SDL* and GL bindings

Bruno Medeiros brunodomedeirosATgmail at SPAM.com
Sun May 21 04:51:17 PDT 2006


Mike Parker wrote:
> Bruno Medeiros wrote:
> 
>>
>> Derelict:
>> I'm really not into Derelict's runtime lib loading. I think the 
>> advantages presented by this method (see at Static Import Issues at 
>> http://svn.dsource.org/projects/derelict/trunk/docs/index.html ) 
>> matter very little. The first issue can be solved by a one person, one 
>> time operation, who can then distribute the lib to other people. In 
>> fact, for dmd it amounts to "coffimplib <foobar.lib>", which hardly is 
>> a nuisance.
> 
> It's a nuisance to me. I started Derelict for my own use because I 
> wasn't happy with the absence of runtime loading in existing bindings. I 
> just happened to make it available for others to use as a small 
> contribution to the D community. One man's trash is another man's 
> treasure, as they say.
> 
> 

Yes, I understand it is a nuisance to you. But you wrote about the 
static linking disadvantages as if it were somewhat universally 
disadvantageous to anyone. :o (I just wanted to point it wasn't)

>>
>> As for the second issue, c'mon, what more than displaying an error 
>> message can a program do when an /essential/ dll is not found? Indeed, 
>> how many games (or any application for that matter) do you know that 
>> have a different behavior when a dll is missing than the standard 
>> system error message?
>>
> 
> The problem is that when you consider the Windows environment, which is 
> the platform most commercial games target, the average user is not all 
> that tech savvy. A message that an application can't be launched because 
> a DLL is missing is going to be meaningless to most people. The user 
> will immediately blame the developer for releasing a 'faulty' program. 
> The chain of consequences from that point on can go in any direction, 
> with the best result being a tech support request and the worst being a 
> lost sale or negative word of mouth. From a AAA, retail, boxed game 
> perspective, no big deal. In the downloadable games space, it's a very 
> big deal. Particularly for casual games developers. That's my primary 
> area of interest.
> 
> Being able to control the type of error message displayed gives the 
> developer the ability to provide more detailed information. Popping up a 
> message box with instructions on how to solve the problem, or perhaps 
> with the URL of a web page that contains such instructions, is much more 
> user-friendly. It reduces the chance that the user will go ballistic and 
> makes a much more professional presentation. That's the motivation 
> behind that design decision. It's influenced by Windows, because that's 
> my primary development environment. The Linux interface is the same for 
> consistency.
> 

But since dll's are usually packaged with the game/app itself, isn't a 
missing dll something so rare that it is exaggerated to worry about it 
so much? How can it happen at all, it seems so far-fetched.

>> Meanwhile, I believe that the disadvantages, such as Derelict being 
>> harder/longer to maintain/develop than a regular binding have much 
>> more impact. For instance Derelict currently *still* doesn't support 
>> MacOS. (Not that I use (or even like) Macs, but it's quite an 
>> important platform that should be supported)
>>
>> This seems a shame to me, since Derelict is clearly the binding with 
>> the most commitment, exposure, and work done on it.
> 
> 
> Derelict really isn't difficult or time consuming to maintain. I just 

It's more work than a pure static-link binding, no?

> don't spend much time on it because I have a lot going on. From the 
> beginning it's been a hobby. Derelict doesn't support Mac because I 
> don't own a Mac. I would dearly love to get Mac support into the trunk. 
> The only reason Linux is supported is because two of the maintainers 

Wouldn't a pure header conversion work in all platforms that the 
original header works in?...
It doesn't work on Mac, and it didn't work before in Linux because you 
need to add the code to the dynamic binding, right?

(Note: I'm not demanding or asking that you should work on static-link 
binding, as I'm fully aware this is your hobby project and you do 
whatever you want with it. I'm (mostly) just giving my take on the 
static vs. dynamic binding issue.)

> 
> For what it's worth, one of the future additions to Derelict is going to 
> be the ability to link statically with an import library and bypass the 
> runtime loading mechanism. 

That would be great!

-- 
Bruno Medeiros - CS/E student
http://www.prowiki.org/wiki4d/wiki.cgi?BrunoMedeiros#D



More information about the Digitalmars-d mailing list