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 / Mouse.Click isn't being detected

Author
Message
Dark Inferno Studios
18
Years of Service
User Offline
Joined: 7th Nov 2006
Location: United Kingdom
Posted: 1st Jan 2009 14:36 Edited at: 1st Jan 2009 17:30
Hi,
I have a problem detecting Mouse.Click or any alternative(i.e. Mouse.LeftClick).
What I'm trying to do is position a cube under the mouse then left clicking to confirm it.
Here's the code:


Thanks.

-Mike
Dark Inferno Studios
18
Years of Service
User Offline
Joined: 7th Nov 2006
Location: United Kingdom
Posted: 1st Jan 2009 17:30 Edited at: 1st Jan 2009 18:08
I have found out that there is a bug with the viewport control.
If I execute InitializeGDK(), all the keyboard and mouse members work perfectly.

Anyone have any suggestions?

-Mike
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 1st Jan 2009 22:44
Yeah... place a debug "print" with a constant display of the mouse.click value and also the positionobject value so you can see whats really going on.

--JAson

Dark Inferno Studios
18
Years of Service
User Offline
Joined: 7th Nov 2006
Location: United Kingdom
Posted: 1st Jan 2009 23:04
Mouse.Click always has a value of 0 unless I remove the viewport control.
Mouse.X, Mouse.Y and Mouse.Z work great whatever.
I have no idea what the problem is other than the viewport control.

-Mike
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 1st Jan 2009 23:25
Honestly - I bought the darkgdk.net thingy - and it looks great but after I used it a bit - I gave up... and I code C# every day for work...

I left DarkGDK C++ for Leadwerks 2 cuz of softshadows, and recently been dabbling in it again... but the physics won't link anymore since I guess microsoft updated vs2008 - "recompile your lib" is about what it says about darkphysics...

So... you wanted a suggestion... I don't have one... Leadwerks makes it kind of trick to get somethings going... like getting models into the engine - you must scale them prior which is a pain in the rump - and to make physics "mesh" the tool is kind of odd - I don't know how Josh did that piece of drift wood (has like 4 bounded boxes) I guess trial and error placing the "primitives" via x,y,z and xa,ya,za dunno...

I'm pretty frustrated myself right now....

--Jason

APEXnow
Retired Moderator
21
Years of Service
User Offline
Joined: 15th Apr 2003
Location: On a park bench
Posted: 1st Jan 2009 23:45
Jason

Quote: "Honestly - I bought the darkgdk.net thingy - and it looks great but after I used it a bit - I gave up... and I code C# every day for work... "


I'm really saddened to hear this Jason, can you elaborate on your frustrations, I may be able to resolve the problems you're having, and make life easier.

Dark Inferno Studios

There is still some issues with general input, and it does revolve around having a viewport control on a form rather than a full screen application. Are you able to use the form events to handle mouse input until I can get this issue resolved?

Paul.

Dark Inferno Studios
18
Years of Service
User Offline
Joined: 7th Nov 2006
Location: United Kingdom
Posted: 1st Jan 2009 23:53
Quote: "There is still some issues with general input, and it does revolve around having a viewport control on a form rather than a full screen application. Are you able to use the form events to handle mouse input until I can get this issue resolved?"


Thank you APEXnow, this works great.

-Mike
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 2nd Jan 2009 00:25
Out the box - with a fresh vs2008 Express - the "starter project" wouldn't work for me... after playing with project settings and googling.. I didn't have much luck:



I know what this is... but...



Didn't get me off to a good start. I know you're working on DarkPhysics... and I'm sure it'll be great - but DarkPhysics doesn't work (DarkGDK C++) any longer since microsoft updated vs2008... It tells me to recompile darkphysics.lib ... that kinda leaves me scratching my head on how your developing at the moment unless you have a dated IDE...

Looking at the object model and stuff I think it looks decent.. I was pretty excited to get it... and I'm not bent - I know it works... I can put dx9 windows on regular window forms etc - and think that's great without having to do a bunch of winapi calls to do the same thing...

So I want softshadows - not your issue really - but nothing in DarkGDK either version really... DarkShader? I looked - nothing for shadows or fog... I'm not a shader developer... Now I'm ranting.. but on the flip side - I bought Leadwerks and the first lick of code I wrote did exactly what the tutorial said... The physics.. no issues...

Maybe I'm just frustrated... but as I was going through the forums I was reading quite a few things that made me think I should hold off a bit before I dig in further... just give it time to mature.

I don't think I made a bad decision getting it... and I think you're a great developer - don't get all bummed because one dude fired up a "hello world" program - couldn't compile it and got frustrated...

I'll hammer at it again.. I bounce around from C#, C++, Assembly, Pascal, OpenGL, DirectX, LE2, etc.. Maybe next go of it I get addicted and write a ton of tools and perhaps a game with it...

The "Getting Started" frustrations come at the tail of hitting one issue after another with various "engines" - grass is always greener etc... this has that - that does have this...

Like I said - DarkGDK.Net C# tutorial template wouldn't run - other demos did - on the forum I read some things that made me gun shy... LE2 has scaling issues and the model conversion to *.GMF isn't as tight as it should be, TGC anything doesn't have realtime shadows, directX9 is OLD and dx10-11+ need junky Vista... It's not DarkGDK.Net alone I'm frustrated with - please don't take it to heart...

I started with a tutorial that wouldn't run... bummed me out

--Jason

dark coder
22
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Japan
Posted: 3rd Jan 2009 04:55
Your claims of no soft shadow support are a bit over exaggerated, I'm pretty sure I've said this to you before on another thread but Evolved has several soft shadow DBPro demos, and I myself have too. The only issue with GDK is that you can't currently set the surface format for the render target thus making some types of shadows harder to make as it forces you to pack depths into ARGB8888. I think all of Evolved's demos do this, so they should work in GDK too.

However DBPro has this support and I implemented shadow that's very similar to Leadwerk's outdoor lighting system as seen here and here. Though to do something like this you do need quite a bit of shader knowledge so I wouldn't be surprised you don't see many examples around here.

The same goes for fog, I don't really see how you can expect DBP/GDK to do this for you, does Leadwerks come with a library of shaders or something? Short of manually adding extra passes for shadow+fog I don't see how it can easily allow you to just flip on such effects.

jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 3rd Jan 2009 05:04
Exaggerated? LOL - Well - It's been frustrating for me.

Leadwerks has a modular library of shaders where ALL the shaders are "there" all the time - and your code basically enables them the same way one might have a compiler directive like an #ifdef USE_BLOOM sorta compiler directive works.

I've tried many shaders in DarkGDK in times past and often ones that work in DBPro do NOT work in DarkGDK - but I guess they got the code base lined up to DBPro so hopefully it will be pretty 1-to-1 in functionality.

--Jason

Login to post a reply

Server time is: 2024-11-25 09:58:43
Your offset time is: 2024-11-25 09:58:43