The Dink Network

Re: direct draw

April 19th 2006, 07:19 PM
anon.gif
Aardwolf
Ghost They/Them
 
Appearantly the Dink Spallwood source code uses Direct Draw and many other MS windows functions.

To someone who has experience working with the source code:

Would it be easy to remove the dependence on the library Direct Draw, and all other MS Windows libraries to use SDL instead (maybe with OpenGL added to draw tiles and sprites faster)? Or does the code depend too much on windows and dd calls everywhere, making it too hard to convert everything?
April 20th 2006, 12:31 AM
wizard.gif
Chrispy
Peasant He/Him Canada
I'm a man, but I can change, if I have to.I guess. 
The code is bad. If you can think of a bad coding practice, it's probably in there. Let's wait untill the codes has been cleared up before we start thinking about portability.
April 20th 2006, 03:10 AM
wizardb.gif
Phoenix
Peasant He/Him Norway
Back from the ashes 
I think merlin and some others tried this, but they didn't make it, so, I'd say it's not easy.
April 20th 2006, 06:39 AM
fish.gif
Simeon
Peasant He/Him Netherlands
Any fool can use a computer. Many do. 
It depends. Using the original source code is not a good idea. Don't use it You can use it as a reference to see how certain things are done (like the exact damage calculation or so).

It's probably easier to start from scratch using other libraries, provided you know what you're doing. In the category of unfinished projects, I did have a half running Dink engine with green grass land and statusbars so it is possible to get it running from scratch without too much hassle.

The good thing about beginning from scratch though it that you can configure certain things right from the beginning
April 20th 2006, 07:47 AM
custom_king.png
redink1
King He/Him United States bloop
A mother ducking wizard 
It is never easier to start from scratch. Never. Never. Never.

Anyway, as someone else already said, yeah, Merlin and some others already ported the Dink engine to SDL, but there was an issue that caused the game to crash consistently.
April 20th 2006, 08:22 AM
fish.gif
Simeon
Peasant He/Him Netherlands
Any fool can use a computer. Many do. 
Well, the idea of "build one to throw away" is true; if you start again you'll be making the same bugs that others have fixed in that previous project. But I dunno, in this case I'd rewrite the drawing code and re-use the other existing code by 'connecting' it to that code.

But I don't know enough about software engineering yet so be kind with me, I'm only a first year student
April 22nd 2006, 04:35 AM
anon.gif
Aardwolf
Ghost They/Them
 
have they released the code of the sdl port somewhere? who knows that someone manages to fix the crash
April 22nd 2006, 10:01 AM
custom_king.png
redink1
King He/Him United States bloop
A mother ducking wizard 
I believe you can get the source here.
April 25th 2006, 01:40 AM
anon.gif
Aardwolf
Ghost They/Them
 
That works great! At least the part that I tried... this looks promising.

http://img263.imageshack.us/img263/6885/gnudink9ub.png
May 28th 2006, 06:46 PM
old.gif
Woot, I'll test this thing tomorrow
May 29th 2006, 04:36 PM
anon.gif
Quicke022
Ghost They/Them
 
Sooo since Dink has been upgraded to SDL does that mean that when I install Dink it will be able to use decent colors? (e.g. 24-bit) or will the installer remove my computer's ability to render thins in 24-bit+ color like it used to do?

If anyone needs help coding i'm here: c/c++ / VC++ / java the rest of the languages are teh fabulous
May 29th 2006, 04:55 PM
bonca.gif
Christiaan
Bard They/Them Netherlands
Lazy bum 
Dink supports 24 bit color now, yes.
May 30th 2006, 08:12 AM
slimeb.gif
DaVince
Peasant He/Him Netherlands
Olde Time Dinkere 
The original Dink 1.08 isn't done with SDL. But it does support 16/24-bit colours now.

Hope you'll manage to fix the crashes and bugs in that FreeDink thingy.