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 / [LOCKED] vb.net sim problem

Author
Message
XFS Illusion
18
Years of Service
User Offline
Joined: 20th Apr 2006
Location:
Posted: 28th Dec 2007 02:45 Edited at: 28th Dec 2007 02:50
I first compiled this code in DBP, worked fine of course. After the release of the GDK for C++, i successfully converted it...also worked fine. Recently i bought the DarkGDK.NET because i'm more familiar with Visual Basic and C++ was giving me headaches (Please lets not get into the old C++ is better than VB discussion again). Well for some reason, this code after I rewrote the basic parts for vb isn't working, though it's nearly identical as far as i know. The skysphere is there, the fighter even banks left and right as it should (kind of sharp though, in C++ and DBP is was more gradual.)

Problem is, up/down/left/right don't seem to be doing anything. The fighter just sits there with no movement, where it should move around the skybox and be followed by the cam as it was in C++ and DBP. It looks like i converted everything right, and i'm not getting any errors at all. I'm posting both my C++ code, and vb.net code so you can see the comparisons. I'm using VB.NET 2008 Express Edition.

VB.NET CODE



C++ Code


jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 28th Dec 2007 15:08
But C++ is better than C# - Just kidding. You'll get stuff done faster with C# usually.

As for VB.Net - It's my understanding that the VB.NET doesn't do some things like C# when it comes to handling data and datatypes - like 99% dead on the same - but a few difference that might be showing their face here.

I admit fogetting the details - but when I was digging into some .Net Projects at work and needed to decide to learn the ropes of VB.NET (Like vb6 should be easy right?) or C# (Which I knew nothing about at all really) that specific "tid bit" of info - now lost to my mind - was enough to make me jump towards C# - so that I could have C++ like control of EVERY DATATYPE when working with external libraries - albeit dll, com, activex, whatever.

It could simply be how VB.NET handles pointer datatypes - or something simple like that.

And honestly - I was MUCH more adept at VB6 - and now I wouldn't touch VB.NET unless by force - just because after I started getting the hang of C# I realized it was like C++ control - with alot of trivial things done for you so you can concentrate ON what you want to do versus doing 60% What you want to do and 40% making sure you don't break your code or create memleaks from sloppy housekeeping.

Hope this helps - and I hope someone could maybe add to this thread - as it might be a valid point I'm touching on - or complete rubbish. It's my experience anyhow

Good Luck Bro!

CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 28th Dec 2007 23:54
VB.NET is not VB6, and vb.net isnt the red-headed stepchild to c#, like vb6 was to c++, but barring that whole conversation...

Do you have any movement commands that dont use curvevalue?
make proper if-end if constructs and put a breakpoint inside one of them. hold that key, does the break get hit?

My DBP plugins page is now hosted [href]here[/href]
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 29th Dec 2007 01:40
Quote: "VB.NET is not VB6, and vb.net isnt the red-headed stepchild to c#, like vb6 was to c++, but barring that whole conversation...
"


I sense a real bad vibe here - did I say something that offended you Cattle Rustler?

CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 29th Dec 2007 03:10
no, not at all, just in my experience as a professional coder, starting out when c++ was all the rage and vb was still on version 4 or so, I had to deal with a bunch of snotty, holier than thou c++ coders who looked down on vb and vb coder (maybe rightly so at that time) But today with .NET the playing field is leveled, but many misconceptions and old myths persist about the previous disparity between c-based and vb-based languages. I'm not saying you were doing that, I was just making sure to get the point out, however detailessly, so as to remind anyone reading this that if they think these huge disparities still exist between c++ and the current vb.net then they dont know much about .net and need to go educate themselves - but most wont or dont because its easier to remain "holier than thou" in their self-imposed utter cluelessness.

again, not directed at anyone or anything in particular, just a pet-peeve rant

</rant>

My DBP plugins page is now hosted [href]here[/href]
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 29th Dec 2007 03:29
[phew] Ok - Excellent. Yeah - I looked over what I wrote after reading your comment and was thinking maybe you thought this:
Quote: "with alot of trivial things done for you so you can concentrate ON what you want to do versus doing 60% What you want to do and 40% making sure you don't break your code or create memleaks from sloppy housekeeping."
was maybe me trashing vb.net. I was referring to C++ here. I like em all - C++ for raw low level umph... and C# cause its just great to code stuff quickly compared to C++. VB.Net is cool too - I just elected to stick with C# because I need to do a lot of dll, com, api thunking and didn't want pointer issues - and started to like the syntax once I was into it.

@XFSIllusion - Ok - And for this thread ... this code here:



I'm wondering if you tried backing up a little, and just broke down the commands you have built up. Meaning, have you tried tossing a dbPrint or whatever to show if dbLeftKey is working ... Does it show a zero or 1 approriately? And how about plyr_bank value... is it valid? How about the Curvevalue routine? I suspect plyr_bank - just because I use curve and leftkey BUT not in .net - so maybe check em all out individually.

Argon Knight
22
Years of Service
User Offline
Joined: 29th Aug 2002
Location: Gastonia, NC, USA
Posted: 29th Dec 2007 12:22 Edited at: 29th Dec 2007 12:52
@XFS Illusion - I haven't ran this yet, but you have else statements when you read the up/down keys in the c++ code that are missing from the vb.net code.
Comp Guru 910
16
Years of Service
User Offline
Joined: 23rd Dec 2007
Location:
Posted: 30th Dec 2007 06:05
I saw the up/down key inputs in the vb code. I dont know what you talking about Argon, could you clarify plz? Anyways. Trying cutting out your second If statements for the Left and Right key movements. VB can be picky, and if you run two if statements asking for the same thing, I have ran into problems with that before. Try putting their functions in the same if then statement. I dont know if that will fix your problem or not, but a thought

Secondly, your declaring variables with too much headway. For example.

In VB6, you would declare all the things you declared as Integers. Now, in VB.Net you want to declare them as shorts because the integers now are 32 bit. Secondly, in VB are floating points even excepted as integers? I dont think they are. Try changing them to doubles (which are the equivalent to floating points in C++ I believe that will fix your problem)

here is a link inside of your MSDN Help Guide you can look at to explain a little on doubles
ms-help://MS.VSCC.v90/MS.msdnexpress.v90.en/dv_vbcnexpress/html/77515a5d-0f12-421c-91fe-8e6ac1d73407.htm

Hope that helped

Im pretty sure if you change anything thats going to have a decimal to a double it will work (VB says specifically integers can only handle whole numbers)

typos...
CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 30th Dec 2007 15:47
the only reason that code even compiles is because he probably has Option Strict off. He should turn on option strict in the project properties, and have it on for every project from this day forward. Using Off basically reverts to old bad vb6 style behavior involving "Variant" behind the scenes. Why MS even allows this to still occur is beyond me but w/e. My advice is always use Option Strict ON

My DBP plugins page is now hosted [href]here[/href]
XFS Illusion
18
Years of Service
User Offline
Joined: 20th Apr 2006
Location:
Posted: 1st Jan 2008 07:18
Thanks guys, i'll try these suggestions and get back to you. And I agree, the old days of C++ beyond the God language are over....it's all .NET, which is used to code is programmer's preference from what I hear. C++ might allow for some deeper memory management, but i'm sure VB can do the same if coded right. The libraries themselves appear to be inter-changable. Don't wanna argue, just stating my opinion.

CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 1st Jan 2008 07:37
you sound about spot on

My DBP plugins page is now hosted [href]here[/href]
XFS Illusion
18
Years of Service
User Offline
Joined: 20th Apr 2006
Location:
Posted: 1st Jan 2008 07:58 Edited at: 1st Jan 2008 08:07
I tried a few things mentioned here, Guru's suggestion fixed it. I changed the following integers to doubles...which seem to act as floats do in C++ and DBP. Thanks for your help!


jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 2nd Jan 2008 14:50
They're both great languages I think - my worry is that the more we leave the "Basics" and jump on Microsoft Specific Languages - then the more we as programmers are sorta "Wing Clipped" for jumping to other OS's in that you have to learn all over again.

Like the Girl at the Cash Register - turn off the power - they can't sell you a thing... It will be that way with Programming soon if we aren't careful to stay well rounded in a few languages!

CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 2nd Jan 2008 15:47
yeah, unfortunately the original intent behind .NET (ie cross-platform interoperability based on the concept of a "framework" library that JIT compiles from generic MSIL) hasn't been progressing as quickly outside of MS based platforms. Hopefully this will work itself out going forward.

My DBP plugins page is now hosted [href]here[/href]
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 2nd Jan 2008 19:09
That sounds promising - I personally will always try to keep my assembly, c++, freepascal at the ready though - as they work with anything ... but the important thing is I'm having fun with my DarkGDK and Many More should be also now that the .net is opening up soon (if it hasn't already)....

CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 2nd Jan 2008 20:27
well Im still using the original DGDK.NET. Even when the new one comes along "whenever" (see the newsletter regarding this issue, and my comment in the newsletter 60 thread) it wont be restricted to vs2008, you can still use vs2005 if you like. I have vs2005 Professional, and have installed vs2008 vb.net express (because there are other very cool additions in framework 3.5 that I wanted to "play" with ) I was under the impression that vs2005 could not compile for higher than 2.0, but I think I accidentally found a way to "trick" it.

My DBP plugins page is now hosted [href]here[/href]
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 2nd Jan 2008 20:48
I found I could get new fangled Net3 based apps to compile also - though I was warned - YOU WILL BURN IF YOU DO IT.... so far no problems

CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 3rd Jan 2008 00:09
lol, yeah.
I'm not too worried since I dont have time to mess with that "hack" right now. I have vs 2005 pro and 2008 expr just in case, for now - and hopefully my job will get me a license for my machine at home (since I do some work for them here also) for VS 2008 Professional.

My DBP plugins page is now hosted [href]here[/href]
n008
17
Years of Service
User Offline
Joined: 18th Apr 2007
Location: Chernarus
Posted: 3rd Jan 2008 00:30 Edited at: 3rd Jan 2008 13:55
@First few posts: You guys do know that comparing C# and VB(.net) to C++ is like comparing C to ASM, right? Or a dragn-n'-drop editor to DarkBASIC? So stop. You're insulting C and Cpp.

CattleRustler
Retired Moderator
21
Years of Service
User Offline
Joined: 8th Aug 2003
Location: case modding at overclock.net
Posted: 3rd Jan 2008 02:34
Quote: "You guys do know that comparing C# and VB(.ne) is like comparing C to ASM, right? "


wait, what!
do you mean comapring c# to vb.net...?
or do you mean comparing c# and vb.net to something else...?

I think you mean the first one. if so, I say again... WHAT!??!
C# and VB.NET differ in source syntax ONLY. They use the same framework, and compile to the same MSIL, and JIT compile to the same assembly runtime

how is that like C to ASM ?

My DBP plugins page is now hosted [href]here[/href]
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 3rd Jan 2008 03:26
I'm curious about that one too.. and insulting the language? (they don't mind)

n008
17
Years of Service
User Offline
Joined: 18th Apr 2007
Location: Chernarus
Posted: 3rd Jan 2008 13:55
WTF

A chunck of that post went missing!

Read it again.

jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 3rd Jan 2008 14:56

Login to post a reply

Server time is: 2024-09-29 09:29:11
Your offset time is: 2024-09-29 09:29:11