Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / DarkGDK - Unofficial Updates

Author
Message
WickedX
15
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 5th Feb 2014 16:27 Edited at: 20th Nov 2014 20:19
DarkGDK - Unofficial r114 Update


I am building this update on top of The Tall Man's; DarkGDK Open Source - A Recent Working Version. The download reflects the current state of the update. Looking forward to your questions, comments, suggestions and bug reports.

Compiled With:
Windows 7
Visual C++ 2008 Express Edition
DirectX SDK (August 2007)

Download: Last updated 11.20.2014
DarkGDK - Unofficial r114 Update(full release)

ChangeLog:

Attachments

Login to view attachments
WickedX
15
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 5th Feb 2014 16:49 Edited at: 20th Nov 2014 20:21
DarkGDK - Unofficial r114 Update - Source Code


For those interested in compiling the libraries themselves, here is the complete source code.

Download: Last updated - 11.20.2014
DarkGDK - Unofficial r114 Update(full source)

Attachments

Login to view attachments
s_i
15
Years of Service
User Offline
Joined: 23rd May 2009
Location: Russia
Posted: 1st Mar 2014 20:33 Edited at: 19th Mar 2014 00:25
Downloads for those, who have ''Fatal error LNK1104: Can not open file atlthunk.lib'' (updated 19th Mar 2014): DarkGDK - Unofficial r114 (full)
This is compiled r113 (all release and debug libraries) plus WickedX's ''Unofficial r114'' over it, with fixed ''atlthunk.lib'' bug.
Compiled with: VS2008 Express, DirectX SDK (August 2007), Windows 7.
Drop into ''C:\\Program Files (x86)\\The Game Creators\\Dark GDK\\" and rejoice.

@WickedX
1) Please, post changed .cpp files too. (We need them to compile yourself.)
2) ChangeLog has error: dbAmientLight instead of dbAmbientLight.
3) Tested by me in r114:
. shadows -- OK
. dbOpenImageBlock(,0) -- OK
. dbOpenImageBlock(,1) -- OK
. dbCloseImageBlock() -- OK
. dbAmbientLight() -- OK
4) I use very-very useful ''Cloggy's D3D for DarkGDK and DBPro'' for colored text, 2d- and 3d-lines, making Pyramid and other objects, etc. You can find it here: http://www.dbdepot.co.uk/d3dfunc.html
5) Font functions will be very helpful. Now I use AddFontResourceEx("font\\myFont.ttf\\",FR_PRIVATE,0) and also this:

Attachments

Login to view attachments
Morcilla
21
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 14th Mar 2014 16:19
Very much appreciated.
Please keep on the good work. Looking forward to re-activate my DGDK project.
Many thanks.

WickedX
15
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 15th Mar 2014 04:47
Sorry for the delay. I’ve been reevaluating how I want to go about this(see op). I have come to the conclusion, to make the download a full release. The patch approach seems to be confusing me, causing mistakes and errors. In addition, I will not use the revision numbering system. The download will just reflect the current state of the update. Since my original post, I have removed the redundant, ink functions and the dbAddToImageBlock function.

@s_i

Thank you for evaluating the update.

1) In the second post, you can now download the full source.

2) ChangeLog has been corrected(hopefully without making additional errors). Thank you.

3) Thank you for testing the functions. I have made some corrections and added the text functions. Please, see the original post.

4) Thanks, have it. DarkGDK, has the function dbMakeObjectPyramid, I just need to reduce the vertex and index counts and properly texturemap it.

5) Font functions have been added. Please; Test.

@Morcilla

Thank you for the words of encouragement. Work has been a little slow but, this project, will continue. MPL3D Solar System; WOW! If there is anything I can do to help with your project, I would be honored. I am an astronomy enthusiast myself and looking forward to your continued work.

Again; Thank you.
Timidon
19
Years of Service
User Offline
Joined: 26th Jun 2005
Location: Bakersfield, Ca. USA.
Posted: 17th Mar 2014 03:27
Thanks for continuing on the work. I have been supporting Dark DGK for years (and through the burning Dark DGK 2.0 - which has become vapor ware..).

There are many answers but just one question" ~ Jerilith the Mad
gbison
13
Years of Service
User Offline
Joined: 15th Dec 2010
Location: USA
Posted: 17th Mar 2014 16:04
Hello all,

Finally got to go back to college now at 35 to become a professional software programmer (call it a mid life crisis). That said, much of my work will be in web based development for gaming via .NET; however, C++ is another language I've picked up along the way and have been looking for a solid multimedia library for it. Various folks had me seek out SFML, but DarkGDK seems much more powerful at first glance.

I've been playing around with DBP for years, but I fear all its implementations may not be present, is that true and if so whats missing? Please forgive my ignorance on the topic, but Im interested in tool development as much as I am game development and thought DarkGDK may benefit from some kind, is that feasible? Do alot of folks still use the library, I know its kinda been tossed around over the years.

At any rate, looks you fellows are trying to revive it and I hope that be the case, because it looks like it could be a very nice library that could be used for engine development.



Timidon
19
Years of Service
User Offline
Joined: 26th Jun 2005
Location: Bakersfield, Ca. USA.
Posted: 17th Mar 2014 18:29
It's now free, the dev's have stopped working on the current version. There was a attempt to bring out a new version, but that has become vapor ware (no updates since 2012) <avoid the DKG 2.0 and it's early adapters 50% off trap>, the author has gone silent. Some in the community are still poking at working on updates (the gent who posted in this forum). It's workable library very good for prototyping I would say, if you know how to tweak it, it can be very cool (see MM Solar System, nice visuals) I have been poking at it for years off and on. Paid for the licensing fees... when they where charging for it. The Help file that is included does not include all of the functions, recommended that you poke into the headers to see all available function. There is still a few people able to answer questions about how things run..

There are many answers but just one question" ~ Jerilith the Mad
gbison
13
Years of Service
User Offline
Joined: 15th Dec 2010
Location: USA
Posted: 17th Mar 2014 20:45
Ah I see, wonder why the loss in interest from folks? Seemed like this would have picked up very well with all the C++ junkies out there. I'll play about with it just to see it in action, but you used the term, "Prototyping". That said, is the library buggy or unable to produce production capable material for some reason? Again, my apologies, I don't mean to question you; Im simply trying to understand, because I just don't know.

I assume many libraries like this are being dropped for today's engines such as Unity, UDK, Torque; For those looking to profit, its kind of hard to go any other route I imagine, albeit once you learn the engine. Personally, I'm looking to hone my C++ skills and thought it might be an interesting lib to play with.



WickedX
15
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 17th Mar 2014 22:39 Edited at: 10th Apr 2014 04:53
Back what, three or four years ago, when TGC release the source code. I had a feeling we would not be seeing much in updates. The Game Creators have moved on to greener pastures and I wish them the best of luck. They have left us with a couple of great products and the source code to build on. I find it a shame to see the number of users discouraged by the lack of updates. If your want to be cutting edge, use C++ with the Window API and the DirectX version of your choice, otherwise use DarkGDK.

I have no list of functions from DBPro that aren’t present in DarkGDK but, most are simple to fix by just declaring the function. There are several internal functions you can access by doing the same.

If I may tell you my story. I started out with a Commodore Vic-20 in 1983. In two weeks I was coding in Machine Language. No, I’m not bragging, let me tell you why. Understanding the C programming language has always given me trouble. I could look at C code and somewhat figure out what the functions did but, what all those symbols mean and how it actually worked confused me(maybe I‘m slow). In the five year's I've been a member of: The Game Creator's; community, I have learned so much. I now understand C++ programming, the DirectX API and the mathematics of 3D Graphics. If you get nothing more from DarkGDK, learn from the source. And have fun with it.

In my opinion, DarkGDK is very capable of producing professional quality applications. In DarkGDK you have access to the libraries core so, it’s quite easy to overcome any shortcoming .

Thank you, TGC
gbison
13
Years of Service
User Offline
Joined: 15th Dec 2010
Location: USA
Posted: 18th Mar 2014 03:30 Edited at: 18th Mar 2014 04:06
I seriously doubt your slow ....I couldn't program in assembly if my life depended on it, not to mention my short comings on 3D math.

I can tell you from that little excerpt you and I are not much different. I understand where you are coming from and hear you loud and clear and would be more than willing to play around with it, maybe even help with some updates to it and even more so some documentation.

Might need a little help from you and understanding the architecture a bit.

Technically, if its open source, is it not reasonable to make our own flavor of it? If anything just flesh it out like you said with all the functions and what not.

I have a college project coming up next year, sorta like a show me what you can do type thing, been thinking my work with this might suffice that.



Timidon
19
Years of Service
User Offline
Joined: 26th Jun 2005
Location: Bakersfield, Ca. USA.
Posted: 18th Mar 2014 17:12
I still use the library today. I do like it. I will have to learn to do some modifications to it. It does make some features simple to use. Just like any library, you get out what you put in. Working around and through some of the "bugs" or "behaviors" that a app will do.

I just wished the documentation on the functions could of been a bit better.

I will continue to visit this site for some time to come, still got questions as I poke at my own game (which is in its 4th rewrite as I type). Some bits and parts can even be found on the forums, turret tests, multisync and darknet (mikenet) questions.

There are many answers but just one question" ~ Jerilith the Mad
gbison
13
Years of Service
User Offline
Joined: 15th Dec 2010
Location: USA
Posted: 18th Mar 2014 20:06 Edited at: 18th Mar 2014 20:13
Well again, Id be more than obliged to take a look at it and even build something to house proper documentation. In fact, that may well be the best place to start and then plow through the header files to see whats actually been declared rather than trying to code this or that for the moment. I guess no matter how good the API is if you can show someone how to use it...well you get the picture.

So I think I'll start on that, any advice? Would either of you object to me shooting you an email if need be?

Quick question, I believe you mentioned it but Im just clarifying, DarkGDK 2.0 is null correct? So any reference to it should be considered invalid, yes?

THanks



Timidon
19
Years of Service
User Offline
Joined: 26th Jun 2005
Location: Bakersfield, Ca. USA.
Posted: 18th Mar 2014 22:29 Edited at: 18th Mar 2014 22:30
Be my guest.

"Quick question, I believe you mentioned it but Im just clarifying, DarkGDK 2.0 is null correct? So any reference to it should be considered invalid, yes?"

DarkGDK 2.0, from what I can see. The author who took over has not posted anything in over a year. He got the licenses to work on that, got us hipped then went silent. He's not a team, but just one guy, figure he got overwhelmed with the project or took our money and ran. Either way he has not been very involved with the community.

The 2.0 changes a number of the ways things get rendered, some of the useful and basic functions are pulled from the library (I like text functions (dbStr, dbLen), all of which are now handled by the user's own functions.).

I think that when TGC gets most of the work done with FPS rebooted, they may release the dgk that they used to build it and then they will change the name and charge for it as well.

I think TGC more than likely will still answer questions on DGK 1.0 even though they don't actively support it anymore.

TGC has a number of good idea, like the model purchasing store, assets that you can use. It needs a bit more polishing, but its a great place to start. Any game or app is made up of a bunch of different parts, not all from the same source.

I know this if off topic even more so now. I was looking at the Oger rendering engine. 5 years ago I would not of understood a bit of it. Now because of working with Dark Dgk, I looked at it and was able to actually do something with it, understood a bit of the code. I like the C++ language, what it can do is nifty. Well off to figure out why my sprites counter decided to stop working...

There are many answers but just one question" ~ Jerilith the Mad
Timidon
19
Years of Service
User Offline
Joined: 26th Jun 2005
Location: Bakersfield, Ca. USA.
Posted: 18th Mar 2014 22:37
One thing I think we should add to the library is a .ogg audio format. or at least some good links to some library sites for it. mostly because .mp3 licensing has side effects later on (WHEN) you app becomes a major saler..

There are many answers but just one question" ~ Jerilith the Mad
s_i
15
Years of Service
User Offline
Joined: 23rd May 2009
Location: Russia
Posted: 19th Mar 2014 01:14 Edited at: 19th Mar 2014 21:37
@WickedX

I have ERROR when I compile my game with your Lib & Include from "Unofficial r114": 1>LINK : fatal error LNK1104: Can not open file ''atlthunk.lib''
I use Express version of VC2008, the atlbase is not included in it. So I use this method:
1) Download from attachment small folder with atlbase source, drop this folder somewhere, for example here: "C:\Program Files (x86)\The Game Creators\atl"
2) Go to "Configuration Properties -> VC++ directories". Choose "Include directories". Then select "edit" and add this folder (for example "C:\Program Files (x86)\The Game Creators\atl")
3) We need to modify atlbase.h to avoid error "Can not open file atlthunk.lib". The following code in atlbase.h

should be replaced with this code:

File atlbase.h in attachment already modified in such a way by me.
4) Now I compile new libraries of ''Unofficial r114 Full source'', with them I successfully compile my game. All work OK.

So now I ask you to test the functionality of libs compiled by me and attached in my last post
( http://forum.thegamecreators.com/?m=forum_view&t=209827&b=22&msg=2510707#m2510707 )
I can not use your libs for my game without compiling error, but if you can use my libs without compiling error, so I'll ask you to change your code and "VC Configuration Properties" as I described above. (To avoid future compiling errors of many other users.)

Other highlights:
A) dbFindFont() and dbLoadFont() -- tested, work OK.
B) Please, provide short description of your 3 new Font functions in your ''ChangeLog'' for novices. (Please, also write that dbUnloadFont() is not mandatory after using dbLoadFont().)
C) Please, use phrase ''Unofficial r114'' instead of ''Unofficial Update''. Please! (for a better understanding of inheritance of source code!)
D) Please, in your first post give link to r111 specification -- http://forum.thegamecreators.com/?m=forum_view&t=209001&b=22
instead of giving link to r111 libs ''DarkGDK - Open Source r111 - Compiled Release Libraries''. Because many users do not understand even changes r111 from original TGC release (they do not know fixed and new functions of r111).

Thank you, WickedX.

Attachments

Login to view attachments
gbison
13
Years of Service
User Offline
Joined: 15th Dec 2010
Location: USA
Posted: 19th Mar 2014 02:18 Edited at: 19th Mar 2014 02:45
I was having this and was working on a fix as well. It seemed to be because the express edition did not have the ATLBASE in the include files, this doesn't happen on the full version of visual studio as its included with the VS includes. In fact it wants all the atl files it seems.

The greatest trick the devil ever pulled was to convince the world he didn't exist.
WickedX
15
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 19th Mar 2014 10:24 Edited at: 19th Mar 2014 11:38
It was my hope when starting, that this would be a community effort. So yes, any help would be welcome. I will be happy to answer any questions you may have along the way. Proper and complete documentation would be a big help. Dark GDK 2.0, never used it. Looking at the code on the forum brought back, bad vibes.

Ogg audio support: I have downloaded libogg-1.3.1 from Vorbis.com and am looking through the documentation. Tested the sdl libraries, ogg sound functions. I guess it could work, if you only activate the audio subsystem. FMOD look really cool but again, you have the same licensing issue. I have looked into this before and it seems any library that makes it simple, will have the same licensing agreement. So the only solution, is to look into libogg-1.3.1.

@s_i

Thank you, I will look into this and get back to you latter. I have added the atl/mfc libraries to my Visual C++ 2008 Express Edition, my bad.

Edit: How, about just removing the atlbase.h include in CAnimation.h. Works for me, let me know if this works out for you.

Thanks
gbison
13
Years of Service
User Offline
Joined: 15th Dec 2010
Location: USA
Posted: 19th Mar 2014 15:42 Edited at: 19th Mar 2014 21:04
Quote: "this would be a community effort"


Works for me!


As for the atlbase.h, commenting it out does solve the errors. However, I re-installed VS 2008 last night and I can say for sure as I suspected, this solves all the issues. I was even able to compile the DBP SDK code without any errors as well. So I can say that all compiles 100% clean in the full version of VS 2008.

As for media , what about ffmpeg (http://www.ffmpeg.org/)? Not sure if it would work in this situation, but it sure can do about anything you throw at it.

I am beginning to create better example material (using old and new), starting with the extreme newb forward. I have collected several resources and now Im working to design a program to encapsulate them as well as demo material, possibly a .NET driven web interface or actual reference program.

Side note:
I have many services (paid) at my disposal, everything from websites to project management, to svn systems with backups and 98.9% up-time SLA. Just food for thought.

The greatest trick the devil ever pulled was to convince the world he didn't exist.
Timidon
19
Years of Service
User Offline
Joined: 26th Jun 2005
Location: Bakersfield, Ca. USA.
Posted: 19th Mar 2014 16:39
Excellent, a good discussion on DKG, been a while... Well back to doing some coding on my day off. Going to be doing clean and coding today. Working on re-assembling my gui. Just keeping the memory leaks out is entertaining, at least I know WHAT causes them...

There are many answers but just one question" ~ Jerilith the Mad
gbison
13
Years of Service
User Offline
Joined: 15th Dec 2010
Location: USA
Posted: 19th Mar 2014 16:51 Edited at: 19th Mar 2014 17:01
Quote: "Just keeping the memory leaks out is entertaining"


haha I know right

On another topic, I found something interesting but it looks incomplete. Under Dark Basic Pro SDK > Dark SDK there is a WinGUI directory. It would seem someone has started to implement the Win32 GUI controls. Whats the status on this?

The greatest trick the devil ever pulled was to convince the world he didn't exist.
Timidon
19
Years of Service
User Offline
Joined: 26th Jun 2005
Location: Bakersfield, Ca. USA.
Posted: 19th Mar 2014 18:00
Unfortunate Don't know. Don't play to much with the Dark Basic end of things (mostly because I have a bad time of mixing my variables up (type o's) so I keep more to the C++ side of things (where the compiler has a fit if it change the variable name a tad bit). Prevents me look for hours wondering WHY? something is not working because I said IK instead of iK for the variable name in one line of code...



There are many answers but just one question" ~ Jerilith the Mad
s_i
15
Years of Service
User Offline
Joined: 23rd May 2009
Location: Russia
Posted: 19th Mar 2014 21:33 Edited at: 19th Mar 2014 21:43
@ WickedX

As for the atlbase.h in file CAnimation.h, commenting it out

gives me 14 errors in compiling this file: ...\Dark Basic Pro SDK\Shared\Animation\CAnimation.cpp

So now adding folder with atl files (as I described above in my last post) is the only way for me to compile DarkGDK source without errors in my VC++ 2008 Express Edition. Please, add atl and use atl in future compilations of DarkGDK. Thanks!

P.S. I found #include "atlbase.h" in this two files too:
...\Dark Basic Pro SDK\DarkSDK\WinGUI\GUIControls.cpp
...\Dark Basic Pro SDK\DarkSDKMore\WinGUI\GUIControls.cpp
If somebody in future will resurrect this piece of code (WinGUI), he will need atl too.
gbison
13
Years of Service
User Offline
Joined: 15th Dec 2010
Location: USA
Posted: 21st Mar 2014 15:50
Wicked

Sent you mail...

The greatest trick the devil ever pulled was to convince the world he didn't exist.
The Tall Man
11
Years of Service
User Offline
Joined: 16th Nov 2013
Location: Earth
Posted: 1st Apr 2014 03:29
Well the moderators never did delete my account. And I've decided what the hell! I'll come back and revisit from time to time.

It's wonderful to see what's happened with the continuation of the Dark GDK source code! I see Lee hasn't added you, WickedX, as a repository contributor yet though. Kinda surprised there, since how much has happened here.

My second computer was a Commodore 64. And I learned assembly language on it too, before learning C on a PC years later (and C++ years after that). The C64 was a great (and efficient) computer! So much better (and reliable) than a PC!
WickedX
15
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 10th Apr 2014 03:11 Edited at: 12th Apr 2014 03:32
I solved the atl issue by using s_i's; modified atlbase header and modifying the other required atl headers. I then put the headers in a folder located in the shared folder and change the include directive in the CAnimation header to reflect this.

I have added ogg sound file support. If you have not installed the 04.09.2014 DarkGDK release then you need to put these files in the Dark GDK Lib folders to compile the source. These libs are located in the; Dark Basic Pro SDK\Shared\Sound\vorbis\lib folder.

Dark GDK\Lib\vs9
----------------
ogg_static.lib
vorbis_static.lib
vorbisenc_static.lib
vorbisfile_static.lib

Dark GDK\Lib\VS9Debug
---------------------
ogg_static_d.lib
vorbis_static_d.lib
vorbisenc_static_d.lib
vorbisfile_static_d.lib

@gbison

I haven’t been able to concentrate the last several weeks. But, I will be getting back with you soon. Thanks.

@The Tall Man

Nothing I've done so far should affect the Dark Basic Professional dll’s. Due to this concern I have not approached Lee about this. But, now I’m thinking more about doing so. Good to see you still popping in. Thank you.
s_i
15
Years of Service
User Offline
Joined: 23rd May 2009
Location: Russia
Posted: 11th Apr 2014 21:41 Edited at: 11th Apr 2014 22:07
@WickedX

Thank you for your work!
Tested by me -- from "unofficial r114 release" (09 March 2014):
1) atl -- OK.
2) dbLoadSound (LPSTR szFilename, int iID) -- OK for ogg.

ERRORS in ChangeLog:
1) Look at the picture from attachment -- only 2 sound commands instead of 4 in ChangeLog.
2) You forgot name of the file, i.e. "LPSTR szFilename" in description of dbLoadSound(Sound Number) etc.
3) Please edit the "Light module" description:


Thanks, ogg works now! But this is only half of the problem, second half is:
DarkGDK can not load sound files from MEMORY, so we can not protect our purchased commercial sound files against copying
For example, now I am planning to unpack music into memory from password-protected archive (with freeware Zip-Utils), then to use commercial irrKlang sound engine for loading ogg-music from memory into game. And what are the other possible variants?

Attachments

Login to view attachments
WickedX
15
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 12th Apr 2014 04:28 Edited at: 12th Apr 2014 04:29
@s-i

Thank you, for testing the update. I really appreciate your input. I have made the corrections to the changelog. Thank you.

Quote: "DarkGDK can not load sound files from MEMORY, so we can not protect our purchased commercial sound files against copying."


This is pretty much an issue with all media types. I am currently looking at adding a function or two and adding Windows GUI functions. The WinGUI code that’s in the source looks like its for a DBP plug-in and uses MFC code. I think we can do better for Dark GDK. But, I will look into adding general functions for media archiving. My mind it flooding with ideas already.
s_i
15
Years of Service
User Offline
Joined: 23rd May 2009
Location: Russia
Posted: 12th Apr 2014 15:08 Edited at: 12th Apr 2014 15:11
@WickedX
Hello! I give you (in attachment) my project (little but entire) with my testing "Zip-Utils" zipping + unzipping into memory, and "irrKlang" loading music from memory. I think: maybe it will be interesting for you as example.

Notes:
Zip-Utils: http://www.codeproject.com/Articles/7530/Zip-Utils-clean-elegant-simple-C-Win
-- Good example of password-protected archiving.
-- very easy for use and for including into projects.
-- On the site in comments users write about bug "12 bytes". I fixed this bug, and use fixed Zip-Utils files in my project. Now all work OK, tested. You can use this fixed files as you want.
-- Autor of Zip-Utils write: all files are Public Domain, but he uses source code of Info-ZIP, so maybe Info-ZIP license is needed, so I include it in my project.
irrKlang: commercial sound engine. Good example of loading music from memory.
Pictures: tests of level of compression with Zip-Utils and other archivers.

Attachments

Login to view attachments
WickedX
15
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 15th Apr 2014 07:50
@s_i

Great find that Zip-Utils. Its been a long time since I visited the CodeProject website. irrKlang works fine for playing ogg files from memory. But I don’t think it can be incorporated into DarkGDK’s sound functions. I found some code on the site for loading files from memory that may work. Although I believe DarkGDK may already be set up for this.

I was just looking at the code you posted on the SPARK 3D Engine wrapper thread. You do not have to run the executable in compatibility mode if you delete the particle system before you exit the program.

s_i
15
Years of Service
User Offline
Joined: 23rd May 2009
Location: Russia
Posted: 15th Apr 2014 19:33
@WickedX

YES!!! SP_DeleteSystem(sys) works!!!
Thank you very-very-very much!!! You helped me greatly.
WickedX
15
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 19th Apr 2014 03:38 Edited at: 20th Apr 2014 20:12
You are welcome. I was excited when I discovered that it worked, too.

I have attached a little demo of a 2D paint function. The function is using a fast scanline floodfill algorithm. The function is not implemented in the source yet. For comparison, I have included a demo of the floodfill code found in TGC's codebase and a demo using IanM’s Matrix1util fill function. The lower the speed the faster the function. IanM’s fill function is faster, but is bugged. The Dark GDK demo also has my prototype for media archiving. If this demo works for everyone, I will be adding it to Dark GDK. These routines can be optimized more in the source and the stack class will be replaced with vectors. Surprisingly, the hardest part will be coming up with names for the functions.

Cheers.

Attachments

Login to view attachments
s_i
15
Years of Service
User Offline
Joined: 23rd May 2009
Location: Russia
Posted: 20th Apr 2014 18:47 Edited at: 20th Apr 2014 18:51
Playing music and filling -- both work on my computer. All 3 games work.
Your music archiv with password -- it is cool! But I do not see the use of primitive drawing/filling in real games -- as for me, this is too primitive.
WickedX
15
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 20th Apr 2014 19:59 Edited at: 20th Apr 2014 20:14
Quote: "But I do not see the use of primitive drawing/filling in real games -- as for me, this is too primitive. "


As with all text and 2D functions, it is to be used to build images before the real game starts (if need be), if you want your game optimized. Personally I agree with you, I would just build the images in a graphics program. Optimization really depends on the game and what a particular routine is used for. The trick is, knowing the difference. Look at my game "Looper", the menu routine is totally un-optimized. But for how it is used it works well enough.

Please, try hard to see if you can crack the ogg file.

Thanks.

Edit: Anyway, I have updated the demo, it is now using the stl stack.
s_i
15
Years of Service
User Offline
Joined: 23rd May 2009
Location: Russia
Posted: 21st Apr 2014 20:41
I can not crack archive, it asks password.
WickedX
15
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 26th Apr 2014 02:05
Well there doesn’t seem to be much interest in Dark GDK. So I will be devoting most of my time to other projects. One of the things I had in mind when I started updating Dark GDK was adding the most useful features of all the add-ons (paid or otherwise) directly to the library. With just a few more of the DirectX 3D-Math functions and EZRotate becomes obsolete. I have nothing to spare in my budget for the paid add-ons. So mostly out of curiosity I searched Google, TGC forum and referenced the DirectX API. The SPARK Particle Engine can be integrated without having to include a dll in the project folder. Its ridicules what can be done with this library.

All that and more is still my plan. I will still release updates as they become available. But they will be less frequent.
Mr Bigglesworth
16
Years of Service
User Offline
Joined: 4th Mar 2008
Location:
Posted: 26th Apr 2014 21:47 Edited at: 26th Apr 2014 21:48
I greatly appreciate what you have been doing with DarkGDK, although there isn't much interest in it nowadays, I still use it frequently for my hobby projects. Although GDK isn't the best for many reasons, it has an ease of use while still being powerful enough with its access to its internal functions, which is enough to keep me around
Morcilla
21
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 26th Apr 2014 22:09
As said, all this is very much appreciated.

WickedX
15
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 27th Apr 2014 07:37 Edited at: 27th Apr 2014 07:43
Thanks guys, it is nice to know my work is not for nothing. With the talent on this forum I would expect more help. I’m not asking anyone to help with coding but, I wouldn’t oppose it someone wanted too. What I really need is bug reports as I don’t have time to check every function. It would be greatly appreciated if someone could compile the libraries with updated version of Visual C++.

Besides adding the functions mentioned above, I have found a few discrepancies in the source. The 2D primitive functions dbCircle and dbEllipse will lock the surface regardless if dbLockPixels has been called, making batch operations with these functions impossible. dbCreateAnimatedSprite should replace the sprite if it exists instead of returning an error. It should also work with an existing image. If anyone has an opinion on this, please let me know.

Thanks again.
The Tall Man
11
Years of Service
User Offline
Joined: 16th Nov 2013
Location: Earth
Posted: 27th Apr 2014 16:31 Edited at: 27th Apr 2014 16:42
The dbCircle and dbEllipse functions, I think, were meant to be high level functions, thus wouldn't require the user to involve the lower level command of dbLockPixels. I have noticed how slow they are. Perhaps you could add a version of those commands that doesn't automatically lock/unlock the pixels.

Remember, any changes made should be backward compatible with existing softwares that use the GDK.

For dbCreateAnimatedSprite, I would think an error for trying to re-create an already existing sprite would be beneficial in helping to point out bugs to the programmer - rather than leaving them scratching their heads wondering why a bunch of their other sprites were suddenly overwritten on the screen. If the programmer really does wish to change an existing sprite using that command, they can call the dbDeleteSprite command first.
WickedX
15
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 27th Apr 2014 21:12 Edited at: 30th Apr 2014 05:41
Quote: "The dbCircle and dbEllipse functions, I think, were meant to be high level functions, thus wouldn't require the user to involve the lower level command of dbLockPixels. I have noticed how slow they are. Perhaps you could add a version of those commands that doesn't automatically lock/unlock the pixels.

Remember, any changes made should be backward compatible with existing softwares that use the GDK."


These functions will still lock the surface if the user has not called dbLockPixels, thus preserving backward compatibility.


Quote: "For dbCreateAnimatedSprite, I would think an error for trying to re-create an already existing sprite would be beneficial in helping to point out bugs to the programmer - rather than leaving them scratching their heads wondering why a bunch of their other sprites were suddenly overwritten on the screen. If the programmer really does wish to change an existing sprite using that command, they can call the dbDeleteSprite command first."


There are other functions that by design work that way. dbGetImage and dbSetCameraToImage are just two such functions, both will replace the image if it already exists. If nobody has anymore to say on this matter, I will leave it as is.
WickedX
15
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 30th Apr 2014 05:47
Here is a header file to take control over your initial GDK window setup by IanM. I have used this for awhile now and thought I would share. Add this to your Dark GDK Include directory. To use, replace the #include "DarkGDK.h" with this header. Now add darksdk.lib to Ignore Specific Library in the Linker/Input Project Properties. I will include this header in future updates. Attached is a source code demo using IanM's header.

DarkGDKWindow.h


I will not be announcing every update. So please monitor the release date on the first post.

Attachments

Login to view attachments
JDforce
20
Years of Service
User Offline
Joined: 27th Jul 2004
Location: Sea of Tranquility
Posted: 28th May 2014 05:26 Edited at: 28th May 2014 05:54
WickedX,
hi, thanks for the hard work! I see we are from the same era, since I started in 1980 with a Tandy and then with an Ohio Scientific C4P. My main area is hardware but started programming at the machine level with eeproms and slow processors back then, assembler of course.

Want to ask a question:
I have been fiddling with the source (the one that contains your changes, U114) and successfully have done some changes to DBPro, hope to share as soon as the features are stable. The main reason is to revive some programs, and because I have a lot of working plugins for darkbasic.

Then I decided to apply and test some of the features with DarkGDK, but when I open the visual studio solution, it references and opens the sources inside the dark basic pro sdk folder, not referencing nor opening at all the ones inside the DarkGDK/code/source.
So, before going further would like to ask which one is the project/solution for editing darkGDK, and how it relates to the dark basic sdk branch instead of the GDK source.
As I understand now, it uses the same sources to generate the .lib files.

I am thinking of cloning the whole open source package, one for using with GDK and the other with DBpro, but maybe there is a more efficient way. Also would like to not touch the changes done to dbpro.

Thanks in advance!

May the 3d force B with U
WickedX
15
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 28th May 2014 06:51 Edited at: 28th May 2014 06:52
What's in the "DarkGDK/code/source" folder, I believe is either a remnant or unfinished reorganization of the code. The only file I'm aware of so far, that's called from here is DarkSDKCore.cpp. The "DarkGDK\Code\Compiler - Visual Studio 9" folder is the solution folder, with the project files in each subfolder. The rest of the Dark GDK files are shared with DBPro in the "Dark Basic Pro SDK\Shared" folder.

When you look at like this, maybe I should separate the Dark GDK project before I start breaking DBPro compatibility.

Hope this helps and thank you!
JDforce
20
Years of Service
User Offline
Joined: 27th Jul 2004
Location: Sea of Tranquility
Posted: 28th May 2014 07:06 Edited at: 28th May 2014 07:08
Great, if it is like that, I think will do separate folders for dbpro and gdk so they do not break each other. (cloning the whole trunk)

Thanks to you

May the 3d force B with U
WickedX
15
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 28th May 2014 11:06
I hope you don’t mind. I have taken the liberty of isolating the Dark GDK source. See the source download, second post.
JDforce
20
Years of Service
User Offline
Joined: 27th Jul 2004
Location: Sea of Tranquility
Posted: 28th May 2014 18:14
On the contrary, it is a time saver, thanks a lot.
Last night I couldn´t resist and cloned the whole trunk (well, since is not on SVN, I mean the whole folder), and applied some changes to GDK, so now I have separate dev folders for both products.

Will download right away.

Thanks again!

May the 3d force B with U
The Tall Man
11
Years of Service
User Offline
Joined: 16th Nov 2013
Location: Earth
Posted: 28th May 2014 19:39 Edited at: 28th May 2014 19:43
On my local copy of the source (based on r113 in the repository), I extracted only what I needed for DarkGDK and gave it a new directory structure. I then created a new project & solution from scratch, and it produces one .lib file now instead of a whole directory of them

I made the DarkGDK project friendly to add to the solution that focuses on another project, so I can debug and step through the DarkGDK source code (with edit & resume), from my other projects that are making use of it.

Judging what we see is the greatest blinder and self-limiter in the universe.

What we perceive is never reality. It is only a story we tell ourselves based on our current perspective, which has far more to do with our beliefs about ourselves than with anything else.
WickedX
15
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 28th May 2014 20:04 Edited at: 28th May 2014 20:12
Very wise move, thinking about doing the same.

JDforce: Not a problem. If you have anything you would care to share, I can add it to the update. Thanks you.
The Tall Man
11
Years of Service
User Offline
Joined: 16th Nov 2013
Location: Earth
Posted: 28th May 2014 20:10
I actually had to create a new template project for it, for "new projects". What's also nice about that is that a new project already has the basic code within it, and out of the way, so I can get right to business!

Judging what we see is the greatest blinder and self-limiter in the universe.

What we perceive is never reality. It is only a story we tell ourselves based on our current perspective, which has far more to do with our beliefs about ourselves than with anything else.

Login to post a reply

Server time is: 2024-11-18 21:34:58
Your offset time is: 2024-11-18 21:34:58