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 C++ VS Express 2005 - Terrain - I'm Baffled! Really Baffled.

Author
Message
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 22nd Sep 2007 05:40
The picture says it all. . The media is there. Can someone with eyes other than my own tell me where I may have completely messed this up? I'm confused and a bit shaken. Thank You in Advance. I am so close to the game coding part - but Terrain just doesn't seem to be working.

Attachments

Login to view attachments
Red Ocktober
20
Years of Service
User Offline
Joined: 6th Dec 2003
Location:
Posted: 22nd Sep 2007 12:16 Edited at: 22nd Sep 2007 12:19
the directory string in line 165 of the editor shot...

shouldn't it read "D:\\Files\\Code\\DarkBasicPro\\Infantrymen\\TMedia\\Terrain" ... with the reverse fwd slashes as opposed to the single back slashes...

that's the first thing that jumped out... probably because i've spent over a half hour on two occasions wonder why some code wouldn't run, simply to discover it was for the same reasons...

--Mike
APEXnow
Retired Moderator
21
Years of Service
User Offline
Joined: 15th Apr 2003
Location: On a park bench
Posted: 22nd Sep 2007 13:48
Can I assume that both 'Level1Texture.bmp' and 'Level1Terrain.bmp' are completely separate images?

And I'm unsure if the error is either occuring in the terrain functions, or whether it's a problem with that last call to mGFILE at the end of the function.

I'd suggest breakpointing the function and stepping through to see which line it fails on.

Paul.

jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 22nd Sep 2007 15:50 Edited at: 22nd Sep 2007 16:15
Red - I'll Scope that as tip #1

APEXNow - You may have missed that the Screen Shot shows the offending line being the dbBuildTerrain call.

Images Assumptions add a wild card to this - Good point ApeX - let me explain. The Main texture is 2048x2048 24bit bitmap currently (to big to post) the Height Map is 1024x1024 24bit also. Detail.png is a 512x512 png (Gray shades - the one that came with the AT demof ro DBPro)

The media is pretty plain - not ready any time spent on it - just was using the biggest that worked great in DBPro. Just to get it up and running. That's all I'm doing here.

[edit] There are other parts of the code that accept the "D:/mdir/mydir2/" for Set Dir and I know windows allows this also - but I'm going to try the escaped backslashes per your suggestion anyways Red! Thanx Guys!
[/edit]

[edit]
No dice - Tried:


UGH. Ok.. Maybe Smaller Bitmaps - maybe it doesn't have the same abilities as DBPro Terrain - this Terrain configuration is VERBATUM to dbPro Iron Infantry Landscape/terrain.

I'm going to Try smaller maps, less scale - just to see what is going on. Who know. the Directory "Depth" could be to much, the Bitmaps are to much, perhaps the Scale, at this point I don't know and I REALLY didn't want to spend my Saturday fighting with something I thought would be a no brainer - I have so much coding yet to do just to get things "Moving" in DarkGDK like I have in DBPro! (Like driving a tank! ...forget the heli for now! )

Ok - I'll try some more tests etc - but I'm already wonding if I need to go after a Tiled Mesh Approach or something now. Feel a bit shell shocked - no pun intended.

----Another Edit - Just reread Paul's "Check mGFILE etc part - and I wanted to point out that is commented out - that is basically a MACRO that points to My little "Wrapper" for the file functions - I commented it out for that very reason. It's only a wrapper in that case so Intellisense groups the DarkGDK for me. Basically the macro is:

#define mGFILE GDK->File

So it expands to GDK->File->Dir_Set("Path here") for example which ONLY does little helper things like:



And stores "Directory At Startup" for later use and as you see tracks the Current Dir in case I need to refer to it in code or something.

Red Ocktober
20
Years of Service
User Offline
Joined: 6th Dec 2003
Location:
Posted: 22nd Sep 2007 17:41
Quote: "
No dice - Tried:
+ Code Snippet
dbSetDir("D:\files\code\DarkBasicPro\IronInfantry\tmedia\Terrain");
dbSetDir("D:\files\code\DarkBasicPro\IronInfantry\tmedia\Terrain\");"


jason... i think it's gotta be this...
dbSetDir("D:\\files\\code\\DarkBasicPro\\IronInfantry\\tmedia\\Terrain");

double fwd slashes for the path...

--Mike
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 22nd Sep 2007 17:53
I did - its like that in my code - I pasted the code - hmm - maybe forum did it in code section? Unlikely - I'll repost. I have this already and tried it:

dbSetDir("D:\\files\\code\\DarkBasicPro\\IronInfantry\\tmedia\\Terrain");

dbSetDir("D:\\files\\code\\DarkBasicPro\\IronInfantry\\tmedia\\Terrain\\");

Thanx for trying to help. This is a pretty "Plain Jane" Thing I'm trying to do and I have reduced it to pure DarkGDK calls, using the same textures and parameters I did with DBPro. This is most disconcerting.

What I've done in the mean time while waiting for some light to be shed on this topic - (Greatful people are helping BTW) - is the SLOW process of converting a loader for T.Ed (Terrain Editor sold on this site) to work with DarkGDK. I have a TON of "IF"... they are: IF I can get the loader to load if I can get WYSIWYG if I can build some sort of Grid/culling mechanism to still cover "large landscape" while retaining HIGH FPS ..... THEN I'll switch - in the meantime - I'm simply struggling writing a ton of code I HOPE I can utilize.

The UP side is that this more labor intensive approach WILL potentially give me a way to get some pretty striking terrain for Iron Infantry and allow "MODS" as the Loader is text - so In theory - You would be able to make a mod to have butterflies be your choppers spitting fire spit and beetles walking on the ground spitting up at them ... and little ants running around (infantry) .... maybe even a Squadron on Yellow Jacket Wasps!

I mean if I pull this technique off - I also have true "Level" loader/Editor something I wasn't equipped with yet - So - Who knows - could be a painful blessing in disguise - but I REALLY like the way the Advanced Terrain Performs in DBPro - Made flying a heli around doable and fun and reasonably realistic looking!

Red Ocktober
20
Years of Service
User Offline
Joined: 6th Dec 2003
Location:
Posted: 22nd Sep 2007 19:28
k... yeah, sometimes the forum doesn't display what you entered... i remembered the same thing happening with the double fed slashes not too long ago...

ok... well, good luck getting your level loader working... sorry my suggestion wasn't of any help...

if you get it working, it will sorta give you something like what C4 (or a few other engines) have... something akin to visual level editing... definitely worth the effort...

--Mike
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 22nd Sep 2007 21:02
Thankx for helping Red Ocktober. Just because you didn't solve it - doesn't mean you didn't help me out! I'd be a real jerk (many people in forums do this everywhere too) to say "you didn't help".

If it wasn't for people at least TRYING to help - we'd never solve stuff here

OK - the latest is: I Forgot the Terrain Initializer Call: dbSetupTerrain(void); HOWEVER now the program runs - I Still do not SEE the Terrain - and yes I made a camera and a "box" (as a visual static anchor...which I do see) and I flew around the blue world of nothingness.... (Except for my little Static Box... who has dreams of starring in a video game some day )

Ok - So I still have a dilemma - HOWEVER - As Red pointed out - It might be worth the effort making a Level Loader that allows me to load completely dynamic levels - and then be able to tell the Game - LOAD THAT and then "PLAY" - Like quake or something

(Used to be a game called Rising Triads or Rise of the Triad or something - first one I saw FPS with Breaking Glass - and totally editable - complete with level editor etc - VERY Awesome - miss that puppy.) But I definately knwo the benifits that Red was explaining and think this would be awesome.

But I need to state - that SO far my complex "Mesh" terrains (Like this level editor would be) don't have the best Frame Rates where as the Advanced Terrain REALLY rocks in DBPro.

jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 22nd Sep 2007 21:48
SORRY For double POST but I GOT IT!

1: Double Backslashs or Forwards Slashs DO NOT make a difference.

2: I Should have studied the Sample Source before Posting as I Found the dbSetUpTerrain() call there.

3: I Flew around in space some more in blue nothingingness - climbing in altitude then I saw what looked like a sinewave... up a little More and I Broke THROUGH!! TERRAIN!!!!! I Tell ya! Terrain!!!

4: the Code Snip now:


Thanx Everyone. I'll Still Work on the Level Loader as it may be the best thing to have at the end of the day!

Login to post a reply

Server time is: 2024-11-19 16:30:29
Your offset time is: 2024-11-19 16:30:29