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 / How can I make Multiple Projects SHARE Library of Code? Never Links right :(

Author
Message
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 18th May 2008 23:07
Hi,
You might have seen my JGC Library v1.0, and for my next round of code, I'd like to set up my projects so Each DEMO doesn't require compiling the ENTIRE "FoundationClasses" and "GameClasses" Project Folders.

Isn't there a way I can make the intermediate *.obj files used by any project in the solution in vs2008? Its probably simple - yet escapes me! Please let me know if you know how to do this!

Thanx in Advance
Best Regards,
Jason P Sage

tobi453
19
Years of Service
User Offline
Joined: 28th Apr 2005
Location:
Posted: 18th May 2008 23:52
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!

Tobi

FINAL VERSION RELEASED!!!!
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 19th May 2008 00:13
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

jinzai
18
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 19th May 2008 00:18
Create a new project that makes a static link library. That's the best way. Then, you only need provide the lib files, and an include file.
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 19th May 2008 00:19
THANX JINZAI! (I guess thats what DarkGDK and Sparky's is ultimately)

thank You.

tobi453
19
Years of Service
User Offline
Joined: 28th Apr 2005
Location:
Posted: 19th May 2008 00:59
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?

FINAL VERSION RELEASED!!!!

Attachments

Login to view attachments
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 19th May 2008 02:07
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

jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 19th May 2008 02:16
Tobi - let's move this to [href]http://forum.thegamecreators.com/?m=forum_view&t=129759&b=5&p=0[/quote] if thats ok - I moved our four back and forth posts as its germain to the program announcement thread and not this one so much.


Thanx for the feed back - I hope to hear more! LOL Fun Stuff.

jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 19th May 2008 02:50
JinZai - How? LOL - I tried and couldn't see an option in the vs2008 Express New Project Dialog. Is it because its express?

jinzai
18
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 19th May 2008 03:04 Edited at: 19th May 2008 03:04
Just select Win32 App...type the project name, and go to the next screen. Select Application Settings, and this should come up:

jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 19th May 2008 03:08
jinzai
18
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 19th May 2008 03:11
Not so sure you'll be thanking me later, but...okay.
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 19th May 2008 14:08
hmmm... maybe thats a warning - to not go that route - becuase its hardenough making as much code as I have compile and link in a way where circular references and unresolved linking errors are happening. LOL

jinzai
18
Years of Service
User Offline
Joined: 19th Aug 2006
Location: USA
Posted: 19th May 2008 17:29 Edited at: 19th May 2008 17:30
Sort of that....its best to start out with the notion of creating a static link library. Converting is a little dodgy sometimes because when you program with the project's end use in mind, you will often create dependencies that don't work well in a static library...

...and if you are using another 3rd party library that you don't have redistribution rights for...you're sunk.

Back to your idea of using .obj files...the same issues apply, but you can add them to a project, too...as linker input.
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 19th May 2008 18:27
Quote: "using .obj files...the same issues apply, but you can add them to a project, too...as linker input"
this sounds the least impact (except compile speed) solution... though A LOT of linker entries - I think you can't just point to the DIR, you need to fully define each path+ filename.

thanx again.
Jason

Login to post a reply

Server time is: 2024-09-29 21:16:43
Your offset time is: 2024-09-29 21:16:43