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 / DGK GUI: community Project

Author
Message
Timidon
19
Years of Service
User Offline
Joined: 26th Jun 2005
Location: Bakersfield, Ca. USA.
Posted: 26th Mar 2014 18:29 Edited at: 24th May 2014 09:43
I was thinking that maybe we could come up with a GUI system for C++ for DGK?

Trying to make something that could be used by the community.

? What would this GUI need to do? And how would it be implemented. I got a few ideas and partially done work on my own homebrew gui, that handles mouse clicks, basic box and graphic images.

Biggest issue I have is putting together a "list" type interface. the Gui turned into a game engine real quick (loading assets (game images) to the way it calls and checks the gui elements.... Something I think that could be useful.

Or is there something out there already? Here are few examples from our community.

1) Found this one on the CodeBase http://www.thegamecreators.com/?m=codebase_view_code&i=690dfeede1c152acc644220df44f9dc8

2) A Classic, my earlier work http://forum.thegamecreators.com/?m=forum_view&t=140085&b=22

3) This version is from Hawkblood. It's a DGK 2.0 version. http://forum.thegamecreators.com/?m=forum_view&t=198824&b=22

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: 28th Mar 2014 01:06 Edited at: 24th May 2014 10:03
< < < D A R K -@- E N G I N E > > >

version: 0.1.0

(Work In Progress)

by Timidon aka Donny Wilbanks


Introduction:
Well this is my community DGK project. It's a Gui system/engine. Feel free to use if you want, add to it maybe improve it. Whats my skill, better than I was a while ago. I done most of my computer learning out of books when I have had time, so there are allot of coding that can be improved. I have been looking for a GUI for a while, something I could understand and implement. Been working on a space sim game for a while. I end up breaking something somewhere and not able to fix it (memory leak), code to unwieldy for me to return to. Last couple of times, more and more bits have become cemented and working fairly stable. So I will share with all who are interested what I have done sofar.

What is it?

The Dark Engine (working title) has gone under a number of changes over the years, but the basic idea is still here. At its heart gui system. I want to be able to load assets (images, 3d objects, and audio files) to be placed and played in my game. A menu system to allow me to click on the screen and get some sort of feed back. A keyboard input system with customizational hot keys. At this point the DE is very Hard Coded, no nice editor to add groups or elements to. Yes this the re-invention of the wheel - again.

Requirements
DGK version 1.0, MS Visual C++ 2008, MS Windows 7

Whats done () and Whats left to do ()

Basic Frame Work (called Windows)
Primitive Elements Frame Work
Primitive Box
Primitive Line
Primitive Circle (some issue with this)
Primitive Text (font, size and standard color)
Primitive Wrapped Text
Camera Element (viewport for a camera)
Primitive Mouse Box and Click Return
Basic Live Element (update-able Element)
Basic ScanCode "Keyboard" input

Drag and Drop System
Text Field Entry (for Lists)
Config File
Asset Loading System
Image Elements
Audio Elements

List Box
Better Menu Setup
Menu Editor
Optimiization

Excellent Demo Module/Examples
Documentation.

From this point it develops more towards a game (where you start plugging in your own code calls at that point). If you got any suggestion please feel free to post them.

? Where can I see the Code

The code is downloadable from this forum, on this page. It is the most current up to date version. You will need to add all files to your project and compile. Should work. I have ran it both on debug and release with no crash's.

Version History


Version: 0.1.0 - 14/05/23

Released.

There are many answers but just one question&quot; ~ Jerilith the Mad

Attachments

Login to view attachments
Morcilla
21
Years of Service
User Offline
Joined: 1st Dec 2002
Location: Spain
Posted: 26th Apr 2014 21:55
@Timidon, nice to hear about this initiative.

A decent GUI framework is something that all DGDK projects have been wishing since the beggining.

I recall Hawkblood published the one used in his starflight game, and that there were another couple of them around.

Best luck with this and please post your progress, and don't get discouraged, someone is always reading you at the TGC forums

BN2 Productions
20
Years of Service
User Offline
Joined: 22nd Jan 2004
Location:
Posted: 27th Apr 2014 05:20
I don't have time to help, but you can look into the FLTK project (fltk.org). It's a pretty simple and easy to use gui system. It might be a good reference (within the bounds of not just copying someone else's work). Definitely good for figuring out if there are any components you haven't thought of yet.

Great Quote:
"Time...LINE??? Time isn't made out of lines...it is made out of circles. That is why clocks are round!" -Caboose
Timidon
19
Years of Service
User Offline
Joined: 26th Jun 2005
Location: Bakersfield, Ca. USA.
Posted: 22nd May 2014 05:16
Its been a while got caught up in real life. I having to rework some of the gui elements again... something broke so I have to track it down.. was working good for a bit to.

There are many answers but just one question&quot; ~ Jerilith the Mad
Timidon
19
Years of Service
User Offline
Joined: 26th Jun 2005
Location: Bakersfield, Ca. USA.
Posted: 24th May 2014 09:06
Dark Engine version 0.1.0 released! Well people poke and probe at it. Tell me whats you like and dislike.

There are many answers but just one question&quot; ~ Jerilith the Mad
WickedX
15
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 24th May 2014 09:49
Quote: "1>c:\users\owner\documents\visual studio 2008\projects\darkengine\de_class_includes.h(6) : fatal error C1083: Cannot open include file: 'dbGUI.h': No such file or directory"


Tried extracting the header from the codebase. Crash!
Timidon
19
Years of Service
User Offline
Joined: 26th Jun 2005
Location: Bakersfield, Ca. USA.
Posted: 24th May 2014 09:56
Should be gone out of that. Let me poke at it.

There are many answers but just one question&quot; ~ Jerilith the Mad
WickedX
15
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 24th May 2014 10:01
Also tried removing the reference in de_class_includes.h. Same result.
Timidon
19
Years of Service
User Offline
Joined: 26th Jun 2005
Location: Bakersfield, Ca. USA.
Posted: 24th May 2014 10:04
Interesting. I pulled it out. Created a fresh project and then compiled it. No problems. works as expected. Was not even in use really. Are you getting compiling errors?

There are many answers but just one question&quot; ~ Jerilith the Mad
WickedX
15
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 24th May 2014 10:09
Just that one. Compiles fine with dbGUI.h from the codebase or with the reference removed. But the executable crashes in both cases.
Timidon
19
Years of Service
User Offline
Joined: 26th Jun 2005
Location: Bakersfield, Ca. USA.
Posted: 24th May 2014 10:12
Wonder what my system is doing that yours is not. What version of DGK are you using? I am using the old DGK, before 2.0 from Minstrel.

There are many answers but just one question&quot; ~ Jerilith the Mad
Timidon
19
Years of Service
User Offline
Joined: 26th Jun 2005
Location: Bakersfield, Ca. USA.
Posted: 24th May 2014 10:31
Well here's the executable. Complied on my end. See if that works.

There are many answers but just one question&quot; ~ Jerilith the Mad

Attachments

Login to view attachments
WickedX
15
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 24th May 2014 21:21 Edited at: 24th May 2014 21:22
That is sad Looks like it's my system. Window7 Starter on a netbook.
WickedX
15
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 25th May 2014 07:20 Edited at: 25th May 2014 07:26
Thought I would check the main source for the only known Dark GDK function that could make the program fail on my system; dbSetShadowShadingOn(). Yap, that’s it. Works beautifully now.

Sorry, I worried you.

Edit: A windows app or game running in a window just doesn’t look right without the windows GUI. But a full screen game really needs the custom GUI touch.
Timidon
19
Years of Service
User Offline
Joined: 26th Jun 2005
Location: Bakersfield, Ca. USA.
Posted: 25th May 2014 10:00
Thanks. So what is the dbSetShadowShadingOn()? Good idea to be On or Off by default? Never used the command myself (just saw it in code- I pulled that off of the dgGUI one from the Code Base.

"Edit: A windows app or game running in a window just doesn’t look right without the windows GUI. But a full screen game really needs the custom GUI touch."

For the most part yes. But a pretty game gui is more ore less what I am aiming for. It still needs to be functional. Though I have seen a bit of Hawkbloods. He's got a Menu editor in his grouping which is nice. These Gui's quickly become a engine real quick. One thing I noticed is when I was adding bigger fonts, I got a fps drop. Hit the "okay" button and watch the fps drop. I usually myself use one font and text size.

So I will work a bit more on the "wheel" tonight. Start plugging the asset system again. It's not so much "new" but revamped a bit from what I been using.

A GUI editor is a good idea. Something to place elements onto the screen. Just more work and a text file to sort out.

There are many answers but just one question&quot; ~ Jerilith the Mad
WickedX
15
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 25th May 2014 21:24 Edited at: 25th May 2014 21:27
dbSetShadowShadingOn is for stencil shadowing. If your using my DarkGDK - Unofficial Update and put stencilshadow.fx in your executable folder. You will see the objects set with dbShadowShadingOn, cast a shadow. If not using my update it really doesn't matter the function doesn’t work anyway, but it should not cause your program to fail. Object shadow shading is off by default. Just to mention, it is somewhat a drain on the system.
Timidon
19
Years of Service
User Offline
Joined: 26th Jun 2005
Location: Bakersfield, Ca. USA.
Posted: 26th May 2014 04:16
Do agree, I popped it off and increased frame rate by 10... I think I used that on a planet orbit once (sun vrs planet vs moon type thing)..

Can't Imagine having a bunch load of objects with that on, on the screen at once.

There are many answers but just one question&quot; ~ Jerilith the Mad
WickedX
15
Years of Service
User Offline
Joined: 8th Feb 2009
Location: A Mile High
Posted: 26th May 2014 07:27
There are plenty of shaders on the forum that do a better job of shadowing, with very little frame loss.
Timidon
19
Years of Service
User Offline
Joined: 26th Jun 2005
Location: Bakersfield, Ca. USA.
Posted: 22nd Jun 2014 06:25 Edited at: 22nd Jun 2014 06:30
Progress is going! Here is a screen shot of the version 0.2.0 Developers Config...

Last night added "Text" input, took me two hours to figure it out. Learned a bit more about access strings and pointers, good excessive.

Though I need to simplify the experience by allowing the user to change directories inside the engine, as is you can cut and paste the directory in. Did not want to type in the long path.

The engine now builds the config directories if you don't have them. Still have to populate the directories with the files you will need. Images, sounds and 3d objects (though 3d objects are not the focus of the engine at this time, that I might just have to leave up to the user to define.).

Well later.

There are many answers but just one question&quot; ~ Jerilith the Mad

Attachments

Login to view attachments
Timidon
19
Years of Service
User Offline
Joined: 26th Jun 2005
Location: Bakersfield, Ca. USA.
Posted: 27th Jun 2014 23:15
Update:

Back to coding today. I have had to do some re-writing as to modify the class for the gui. Looks like the Gui Editor is coming a bit sooner. Working with inserting directories and inserting a some graphics into the engine. version 0.2.0 will a bit more features added into it, some more documentation and basic media for the graphics.

Watch "StarCrash" a 1979 epic film, make sure your not to sober..
Timidon
19
Years of Service
User Offline
Joined: 26th Jun 2005
Location: Bakersfield, Ca. USA.
Posted: 3rd Jul 2014 08:49
Ran into some serious memory leaks, had to restart... starting from scratch again.. Yeahh hhaa....

Watch "StarCrash" a 1979 epic film, make sure your not to sober..

Login to post a reply

Server time is: 2024-11-18 21:26:24
Your offset time is: 2024-11-18 21:26:24