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.

Program Announcements / JGC Library Version 1.0 - DarkGDK C++ OOP Code Library - With GUI - Free!

Author
Message
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 18th May 2008 01:08 Edited at: 31st May 2008 04:51
VERSION 2.0 RELEASED!! Lights and Effects Classes revisited! Solution reorganized to compile MUCH MUCH faster!

Project Web Page: http://code.google.com/p/darkgdkoop/



1.25 Megs of Source, 100+ Source Files, 36000+ Lines of code, and there is even full source for a GUI that works in Full Screen Mode!

Thanks to all of you who helped me test and to all who paid their contributions in forum posts, media, shaders, Code, and ideas!

Special thanx To: DavidW, Visigoth, Green Gandalf, Lost In Thought, IanM, VanB, CuCumBer!

Make sure to read the doc folder's "readme" texts for each demo!

Attachments

Login to view attachments
Pixel Perfect
17
Years of Service
User Offline
Joined: 21st Feb 2007
Location: UK
Posted: 18th May 2008 01:19
Great piece of work Jason .. congratulations on getting this completed and released. I'm sure many people will benefit greatly from this

No matter how good your code is, someone will improve on it
Not_Maindric
17
Years of Service
User Offline
Joined: 10th Jul 2007
Location: Omaha, NE
Posted: 18th May 2008 03:01
Hm, looks interesting. Downloading now.

tobi453
19
Years of Service
User Offline
Joined: 28th Apr 2005
Location:
Posted: 18th May 2008 16:30 Edited at: 18th May 2008 16:44
I can't finish the download. Every time when it's close to completion the download aborts.

Can you upload it somewhere else?

FINAL VERSION RELEASED!!!!
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 18th May 2008 16:59 Edited at: 1st Jan 2009 16:19
Though this is LAST RESORT Download location! (Bandwidth not that high): ftp://jegas.com/Downloads/

Can't wait to hear what you think of this!

jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 19th May 2008 02:15
tobi453 and I were Talking in another thread and both times I didn't realize it was not the correct thread... so I'm moving the conversation here.

tobi453 Wrote:
Quote: "hi jason,

I counted your lines (FoundationClasses && Game Classes): 36943. Awesome. That's nearly twice my star wars game. It took me 10 minutes or so to compile all your example projects. I haven't looked at all the examples in detail yet, but it looks very good so far.
I noticed that the text input seems to lag a bit. Is this intended or a problem with my vista?

Keep up the good work!
"


Awesome! Input Lagging... Well.. there is a delay on the keyboard... see jgc_configuration.h but before changning note that for the GUI especially, I'm using native GDK to get those fancy keypresses like CNTL+C, CNTL+V, SHIFT+END, SHIFT+HOME etc.

I need to throttle those dbKeyState(??) functions' frequency so I don't get rthousands of messages going through the gui if you hold down shift key or something. However the text you type uses dbEntry, so that is a buffer that GDK (seems like) manages by getting window messages - in the REAL WinMain. So, this buffer gets filled even when I'm not polling, then when I do POLL - it snags the whole buffer and clears it for another go around.

Now those settings in jgc_configuration.h can be changed, however its like balancing a ball trying to get the right balance of Frame Rates per Second and KeyBoard Poll Frequency (mostly due to the need to scan for special keys like CNTL and SHIFT.. I can't rely on the dbEntry() buffer alone.)

So its probably not your Vista so much as what I explained. I do think its certainly good enough for a game menu, game editors, utilities etc.

Morcilla answered a post I had made recently about this very subject. I was wondering if we could subclass or whatever without losing the control we haave for many key combinations with simulatanesous keypresses.

He didn't refer to losing or not losing that but he did point me to some code IanM wrote that seems to more or less use PeekMessage to get the OS messages without processing them. This would give the responsiveness I would need - as its not unlike interrupt programming in that I can process the keys in real time, withouth needing to adversely effect FPS .. at least that's the theory.

Have you checked out the Demo VMesh (Big Terrain) Demo Yet? USGS Data for an island in Hawaii (tweaked a bit to utilize the full heightmap bitmap "square") ... but... Curious what you or anyone else thought of that one!

Best Regards,
Jason P Sage


tobi453 Wrote Again:
Quote: "
Yes I checked it out. First I thought that it was only a plane but then I realized after moving around a bit that there are actually hills. Amazing.

I think you should definitely increase the moving speed ( the terrain is so huge, more than 1.3 million polys! ). I increased camera range and fog range and there were some strange clipping problems, but I think this is a directx problem.(Screenshot attached.)

I haven't looked at the code in detail. How have you done the terrain? With memblocks or is it advanced terrain or something else?
"


--------------
(BTW - thats the attached Pic in this post)
My Response Below
--------------

Quote: "Yes I checked it out."

LOL AWESOME!

Quote: "First I thought that it was only a plane but then I realized after moving around a bit that there are actually hills. Amazing."

Thanx! Yeah - That "plain" is just the black edges around the heightmap - it's pretty freaking huge! LOL)

Quote: "I think you should definitely increase the moving speed"
Well, you can hold SHIFT to go faster, and its inside the test_jgc_vmesh_bigterrain1.cpp file... near the bottom... (line 615 before changes) looks like:


Those Cam Control Values effect speed... its an advanced version of the camera command that moves with the arrows(dbControlCameraUsingArrowKeys() I think its called).

So you can speed it up.


Quote: "the terrain is so huge, more than 1.3 million polys!"
I presume you counted them by maxing out the camera LOL... yeah... Its big...

Quote: "I increased camera range and fog range and there were some strange clipping problems, but I think this is a directx problem.(Screenshot attached.)"


Never seen that before - I think it might of really pushed directX to the limit with the camera range out far enough to count 1.3 million POLY! Glad you're having fun with it!


Quote: "I haven't looked at the code in detail. How have you done the terrain? With memblocks or is it advanced terrain or something else?"


It starts in a memblock. That JGC_VMESH class is a multi-object, multi-limbed, "Matrix" on steroids It has Welded Verts and a poly layout (modeled after Visigoth's USGS terrains.) That mesh is created by FIRST making a single poly for a "root" object (due to anomalies with how root behaves a bit different than limbs - and can look awful... for example... working on the mesh - if root 0 seems to be whole object - same for uv.. ) So I then create a mesh CellsX x CellsY (per limb) in a memblock.. then make a mesh from it, and then carbon copy it to fill the rest of the requested mesh size asked for. Cells are per limb - and need to even numbers due to the poly arrangement... 2x2, 4x2, 4x4, 16x2... Whatever ya need just even numbers for the cells. You also pick how many limbs per object (x,y), and how many objects (x,y) .... So its pretty dynamic.

There is also command to control UV and reset UV (to stock) for individual cells, and naturally, per limb, and per object, and per ENTIRE MESH... so makinging a level where you recycle a textures... and just replace use detail textures where you need them.. well.. I suspect when I get to the level editor potion of all this for iron infantry - it'll be pretty neat.

Sorry to go on an on but you asked.

The reason the frame rates are so high with that mesh is because of the frustrum culling and that's BEFORE I added any quad or Oct tree processing to optimize it...however its using my frustrum "Regions" stuff ... which basically works like a 1 tiered Quadtree in that particular demo.

the Terrain (as far as frustrum is concerned) is broken into FOUR SQUARES... And these are each a region. if the REGION is not on the screen... then all the objects in the region are excluded - PERIOD, if the REGION is in the frustrum - then normal frustrum processing (Limb Frustrum culling in this case) is performed to see what (in that region) is really on the screen or not, hiding limbs that are not visible ...cuz it helps... and excluding objects that aren't visible... helps alot more LOL .

So I hope that at least gives you some idea of what I'm doing so when you read the code - you'll know where its heading before you start.

Thanx for the report!

Best Regards,
Jason P Sage

Attachments

Login to view attachments
draknir_
18
Years of Service
User Offline
Joined: 19th Oct 2006
Location: Netherlands
Posted: 19th May 2008 04:15
awesome Jason, thanks for releasing this Ill be checking it out tomorrow (need some sleep right now)
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 19th May 2008 05:01
Niels Henriksen
20
Years of Service
User Offline
Joined: 27th Sep 2004
Location: Behind you breathing heavely
Posted: 19th May 2008 16:50
this is just perfect....

But Jason... can you explain how I make a new project with your classes? do I need to add all files or to make ref. to them?

Niels Henriksen
www.tales-of-the-realms.com
if Microsoft can sell software with bugs, so can I.
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 19th May 2008 18:15
The latter.. This is what I do Neils - Note - IDEALLY a static lib would be used, so you don't need to recompile all the source for each project... but ... it was hinted that thier may be some gramlins with that... so I think I'm staying with the configuration because..well.. it seems to work.

1: I make a new project in that same solution.
2: I delete main.cpp (really DELETE LOL) and the readme.txt
3: I right click the project and add a new "Filter" and name it FoundationClassesRef (because its a reference and not COPIES of the source code)
4: I Right click this new filter, and select "Add Existing Item" and I navigate up a directory, and down into the FoundationClasses directory and select all the JFC_*.h and JFC_.cpp files. (NOT the TEST PROGRAM test_foundation_classes.cpp or whatever its called!)
5: I right click the project and add a new "Filter" and name it GameClassesRef (because it is also just a reference and not COPIES of the source code)
6: I Right click this new filter, and select "Add Existing Item" and I navigate up a directory, and down into the GamesClasses directory and select all the JFC_*.h and JFC_.cpp files. (NOT any TEST PROGRAMS Just the JGC_*.* files!)
7: Right click your new project in the tree view, select properties, and go to General->Additional Dependacies Area and enter: ..\FoundationClasses ; ..\GameClasses
8: Right Click your New Project in the Tree view and select Add New Item. (Could've just worked off the default main.cpp but...)
9: Start with this as your base code:



Good Luck Neils! Don't hesitate to ask questions... Any one!

Niels Henriksen
20
Years of Service
User Offline
Joined: 27th Sep 2004
Location: Behind you breathing heavely
Posted: 19th May 2008 20:51
Nice work jason..... I cant wait till you make it as a lib... it take so long time to compile

If you come to denmark/sweden, then tell me and I will give a dinner ... Your project has helped me a lot...

Niels Henriksen
www.tales-of-the-realms.com
if Microsoft can sell software with bugs, so can I.
david w
18
Years of Service
User Offline
Joined: 18th Dec 2005
Location: U.S.A. Michigan
Posted: 20th May 2008 03:49
@Jason Thanks for the contribution. Also the fact that its open source is really great. Also, great work. Best I've seen in GDK to-date.
Elspin
16
Years of Service
User Offline
Joined: 30th Mar 2008
Location:
Posted: 20th May 2008 04:42
(continuation of previous discussion) I honestly don't know what happened, but it's just compiling right now. Same version, same files, same compiler, no settings changed. It just works now. Or at least, the hello world I tried compiling. I'll see if everything else works... yup. Can't wait to try this out
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 20th May 2008 04:46
@Elspin (New person delayed... his message came to me via email)

I'm glad you got it working! Let me know how you make out!

Elspin
16
Years of Service
User Offline
Joined: 30th Mar 2008
Location:
Posted: 24th May 2008 05:23 Edited at: 24th May 2008 06:21
It was crashing again, and I figured out why. Was really stupid, I was just missing the media folder for my project. I guess that explains why it couldn't get the font sizes... there were none.
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 24th May 2008 06:41
Yes, and you'll notice that there is a log file that is "working" for anything that uses the JGC library - most importantly - for missing files.. loading an object that's not there... leaves a log file entry... now your program might crash as yours did because now there are pointers that ... well.. aren't what they were expected to be etc... but... that log file will help ya get that stuff sorted out

(Happens to me too... that's why I put it there!)

Elspin
16
Years of Service
User Offline
Joined: 30th Mar 2008
Location:
Posted: 24th May 2008 07:23 Edited at: 24th May 2008 07:23
Durrr, just found that logfile which would have saved a lot of confusion. Anyways, what exactly does JGC do to the screen? It wipes all my drawing operations off as I do them. And if I create a bitmap that is not in conflicting space with the GUI, it spazzes and everything goes invisible.
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 24th May 2008 15:21
Glad to see you released this open source. Keep it up man. Great work.

jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 24th May 2008 15:54
@Lost In Thought - Thank You VERY much! Your Frustrum code is embedded in there BTW - I ported it to DarkGDK! Thank You for your work as well!

@Elspin - JGC::Init() and JGC::Update effect the screen. Have you downloaded the Getting Started Guide? This covers some of the details but I'll summerize it for you.

I made a 2 step "start up process" - The first part you create the instance of JGC:addy like this:



Now the library is "ALMOST READY".. the two step process allows you to change a few defaults programmatically before you call JGC::Init() In vs2008, when you type JGC:addy-> intellisense shuold display a drop down list of functions and proerties. All the properties that start with D_ are the defaults you can change. Once you have things how you want them.. you call the JGC:addy->Init() and the library comes to life.

JGC::Update is supposed to be called in your main loop. I recommend using the vs2008 IDE to right click on the token "Update" and selecting "Go to Definition" to show you what its doing by bringing you to that location in the source file. Here's the snippet. I hope its self explainatory - at least as an overview of what's happening:



The try statement shouldn't be necessary - but its there for me to debug. But you can see... to sumamerize your answer: JGC:addy->Update(); calls dbSync();

I hope this helps. Let me know how you make out!

Elspin
16
Years of Service
User Offline
Joined: 30th Mar 2008
Location:
Posted: 24th May 2008 20:56 Edited at: 24th May 2008 21:55
Well, yes, I have gone through those functions and know what they do, but I mean aside from that something odd is happening that's preventing all bitmap operations from working.

I determined it's the camera backdrop, but turning it off totally screws the GUI over... God it's a nightmare getting anything to be compatible with the bitmaps in darkGDK.
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 24th May 2008 21:45
Can you elaborate? there really isn't much in the way of "Bitmaps" or anything using bitmaps in anyway. How about a detailed report of what's going on, posting your code, and perhaps media or media "stubs" that can show what's going on on. It's just hard to guess what is going on without some reference.

Let's Squash the "oddness".. help me help you on this - at least so myself or others can see what your code is doing. It may or may not be related to the lib at all. I won't know though until you post some details!

Elspin
16
Years of Service
User Offline
Joined: 30th Mar 2008
Location:
Posted: 24th May 2008 21:57
Alright, here's my plain and simple code, there's probably at least a hundred things wrong.



The reason it's such a mess right now with things in odd places is because I've been trying a lot of things to get it to work.
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 25th May 2008 00:11
I like what it appears you're developing ... Good Show. I'm looking at your code now to see if I can't ascertain how you expect it to work... and make it happen.

jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 25th May 2008 03:26 Edited at: 25th May 2008 03:38
How's This Elspin?



See Attached Pic

[edit] slight text edit in code, made comments reflect what code was doing better than initial post[/edit]

Attachments

Login to view attachments
Elspin
16
Years of Service
User Offline
Joined: 30th Mar 2008
Location:
Posted: 25th May 2008 04:12 Edited at: 25th May 2008 04:17
Thanks! gonna try this out now

EDIT:Great, exactly how it was intended.
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 25th May 2008 05:10
AWESOME! Glad you like it! Now remember, because of how mouse moves generally aren't read every pixel... for the "Pencil" you probably want to work in a "line" versus drawing with t a dot. You'll want to save that "last" mouse X,Y somewhere, and each new "pencil move - with mouse down" draw a line from the last position to the current position, then save those mouse x,y's for the next go around.

Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 26th May 2008 06:45
Looks cool, good job.

Your signature has been erased by a mod
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 27th May 2008 06:52
New Release Anouncement! Version 1.1!!! See the downloads area for this project on the project home page - Make sure to grab Version 1.1! http://code.google.com/p/darkgdkoop/


ENJOY!
--Jason P Sage

Here's the release notes:


jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 28th May 2008 04:33
VERSION 1.1 PATCH RELEASED!! Be sure to download the Version 1.1 PATCH if you haven't done so yet from:

Project Web Page: http://code.google.com/p/darkgdkoop/

I think you'll see why I bothered with this patch when you see the readme:


jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 31st May 2008 04:49
VERSION 2.0 RELEASED!! Lights and Effects Classes revisited!

Also the whole solution was reorganized to make compiling MUCH faster!

Any and all feed back appreciated! It's going to be awhile before there are any more releases because I'm starting a new project.

Have fun! Enjoy!
-- Jason

Zuka
16
Years of Service
User Offline
Joined: 21st Apr 2008
Location: They locked me in the insane asylum.
Posted: 22nd Jun 2008 08:26
Don't want to let this die!

If you can do any models for FW, reply to the FleetWars thread.

Click here!
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 22nd Jun 2008 16:13
LOL - Thanx for the post - I think its dying - but the occasional bump might be needed. I know there have been over 530 downloads of this library, and I haven't heard any complaints - so I can only guess that a number of people are in fact using the library, borrowing clips of code from it, learning from it, and maybe making games and things with it....

You don't always hear feedback from the people who are using these kinds of "programming leg ups" - in fact - its often the trend to strip out references to the "last person" and adopt it all and call it "original" - which is fine with me in this case - because this is a LEG UP to my fellow (and budding) game developers...

So again - Thank You Zuka for the bump!

BTW - I haven't abandoned this library - and I always try to answer posts - questions - etc. time permitting. I've been tryng my hand at other things - such as DirectX programming directly - but I'm still around - and I am still actively a TGC customer - albeit models, software whatever - so I'm around

Zuka
16
Years of Service
User Offline
Joined: 21st Apr 2008
Location: They locked me in the insane asylum.
Posted: 22nd Jun 2008 23:39
I'm having trouble with it, though. I posted in the Dark GDK subforum, check there, please.

If you can do any models for FW, reply to the FleetWars thread.

Click here!
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 3rd Jul 2008 17:17
Zuka - have you gotten this resolved? <bad form to send me on a hunt LOL... Link me! >

Login to post a reply

Server time is: 2024-11-23 05:34:56
Your offset time is: 2024-11-23 05:34:56