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.

DarkBASIC Professional Discussion / Virtual Walkthrough Code

Author
Message
Jediam
14
Years of Service
User Offline
Joined: 14th Apr 2012
Location:
Posted: 24th Jun 2012 03:31
Hello Everyone,

I recently posted a topic on the DBPro Discussion board entitled "My program doesn't seem to run on laptops". I had uploaded the program for anyone to test. Thank you to those who tried it out. Some were successful, others had similar problems to the one I was having. After much discussion and troubleshooting, I've come across a new error message on my end (a syntax error)within the code which I believe is causing the crash. It can't seem to find the path to the Media folder which I included with the program. I don't understand why this is if it works well on some computers and not others. Being that all of you are alot better at these things than I am, I was hoping you could take a look at the code and tell me if in fact I've done something wrong. I've commented almost everything; there's at least one function that isn't used, although I haven't called it either. If you wish to help, I can either post the code on this topic or upload the .dba file. Let me know. Also, I don't know how to copy and paste the code in color format. Thank you
Marabas
15
Years of Service
User Offline
Joined: 12th Dec 2010
Location:
Posted: 24th Jun 2012 17:57
I have a desktop and a laptop if that's of help and I've got a bit of time on my hands right now. Let me know if I can help.

Signature removed by moderator. Please do not give out the meaning of life in an open forum.
Jediam
14
Years of Service
User Offline
Joined: 14th Apr 2012
Location:
Posted: 24th Jun 2012 18:36
Hello Marabas,
Thankyou for your generous offer. It's probably best if I both posted the code on the forumn and uploaded the .dba file. First, do you know how to copy and paste code in color? I think it would be best if I posted the code once and in its most readable format. Second, if you could download my program from the topic, "My program doesn't seem to run on laptops", and see if it works on your computer(s), that would be a good starting point. Just note, there was one user who had a concern of a popup message that directs the user to nVidia's website. This only seems to occur when the program crashed on the laptop. This has nothing to do with anything I programmed and may be instead a feature built into any compiled executable for a program using Dark Physics (which mine does). The error message stating that the Media folder can't be found, occurs after having troubleshooted the executable for compatability with Windows7 on laptops. The troubleshooter runs the program in WindowsXP service pack 2 mode, and that's when I get the error message. The message mentions the specific line in the code (41) which is CD "Media". I then tried CD "\Media", but then this won't compile. Thankyou for your time and interest.
Jediam
14
Years of Service
User Offline
Joined: 14th Apr 2012
Location:
Posted: 24th Jun 2012 23:02
Here is the code everybody. Feel free to use and expand upon it in your own projects. Sorry I wasn't able to post this code in color (as it would appear in DBP). I know this would make this alot easier for you to examine. If someone could let me know how to do this for future posts, I would be greatful.

As mentioned in my previous post, the problem error message that I have occurs when the program attempts to find the Media folder. CD "Media". If someone could offer any advice on how to correct this or spot any additional problems that could be adjusted, please let me know. I'll be looking forward to your replies. Thank You
basjak
16
Years of Service
User Offline
Joined: 16th Apr 2010
Location: feel like signing up for mars
Posted: 25th Jun 2012 00:03
it's worked with me. are you sure you put the media file in the project directory?

Jediam
14
Years of Service
User Offline
Joined: 14th Apr 2012
Location:
Posted: 25th Jun 2012 00:33
Hello baskjak,
The Media folder and all of its contents are within the QuadrantHouseWalkthrough folder so there is no reason (that I can see) why I should be getting the error message that I mentioned. As you already know from the previous topic I posted, the program works fine on others laptops as well. I think Pincho was the only one who had the same problems that I have. When I compile the program (I have DBP v7.7) I always run as administrator, and I do the same when running the executable. Did you happen to see anything else that might be missing or could be adjusted in the code? Maybe I could run a diagnostic for PhysX on a computer through a function. If PhysX .dll's can't be found, a message saying so can be displayed. One question, have you run the program in Windows 7 sp1 or Windows XP sp2? The latest error message I get is within the latter. Thanks again for your help, Jediam
Jediam
14
Years of Service
User Offline
Joined: 14th Apr 2012
Location:
Posted: 25th Jun 2012 00:58
Hello again,
I added this code right underneath where I called SetUpScreen() to test if the PhysX PPU exists.
After running the program, it doesn't appear that even my desktop has the PhysX PPU, yet the PhysX functionality appears to work just fine. I don't know if this could be the problem with the laptops/netbook. I don't think so, but it is worth mentioning. Thankyou.
basjak
16
Years of Service
User Offline
Joined: 16th Apr 2010
Location: feel like signing up for mars
Posted: 25th Jun 2012 03:06
we have to solve your problem one by one: I can assure you that the code you left on the top has worked on my laptop.

please try the file I sent you then send your result.

Jediam
14
Years of Service
User Offline
Joined: 14th Apr 2012
Location:
Posted: 25th Jun 2012 03:56
I ran your executable as an administrator and it said that my computer is missing MSVCP71.dll. One note, I checked the .dba file and all the media contents you sent back to me and nothing has changed. I don't know why the executable wouldn't work. This is something new. So far I only ran it on my desktop. I never received this missing .dll message before. Interesting. Should I try it on the laptop or await your instructions first. Thanks again for your help. Jediam
basjak
16
Years of Service
User Offline
Joined: 16th Apr 2010
Location: feel like signing up for mars
Posted: 25th Jun 2012 04:07
good to know.

now copy and paste the three file in the download link to the following directory:

if you have win 64 bit: C:\Windows\SysWOW64

if you have win 32 bit: C:\Windows\system32

Jediam
14
Years of Service
User Offline
Joined: 14th Apr 2012
Location:
Posted: 25th Jun 2012 04:27
I did as you said and now it works! Should I go ahead and try it on my version of the program on both the desktop and the laptops? By the way I have win 64 bit. Thank you basjak.
basjak
16
Years of Service
User Offline
Joined: 16th Apr 2010
Location: feel like signing up for mars
Posted: 25th Jun 2012 04:55
yep. try your version now.

Jediam
14
Years of Service
User Offline
Joined: 14th Apr 2012
Location:
Posted: 25th Jun 2012 05:19
I tried both your version and mine on the netbook. Neither work. The netbook happens to be 32 bit and I copied the 3 .dlls into the Windows\System 32 folder. Are their any other .dlls that might be 32 bit specific that I might be missing? Thanks again.
basjak
16
Years of Service
User Offline
Joined: 16th Apr 2010
Location: feel like signing up for mars
Posted: 25th Jun 2012 05:51
Don't expect dark physics to work on your net book. As the graphic card has no support for physics. You may try dark dynamics but better to ask the creator of this pluggin first.

About dark clouds. You really need good graphic card to get predictable results and this will not happen on a net book. My advice is to use sky boxes.

At least for now we solved the problem on your laptop and desktop.

Jediam
14
Years of Service
User Offline
Joined: 14th Apr 2012
Location:
Posted: 25th Jun 2012 07:00
Thanks for your help basjak. I haven't tried either your version or mine with the fix you gave me on the laptops yet (only the netbook). I think the laptops will work though. I'll let you know after I tried it. Take Care.
Jediam
14
Years of Service
User Offline
Joined: 14th Apr 2012
Location:
Posted: 25th Jun 2012 07:32
Great News! It works. Thank you so much. I even tried the original building model and it works as well. Couldn't have done it without you. I really appreciate your help and to everyone who pitched in...problem solved. The answer was to include the .dll's that basjak mentioned as well as downloading the latest physX drivers. The program didn't work on the netbook (basjak mentioned the netbooks can't handle physx.)but all I needed was for it to work on at least one laptop. I hope the code for the program that I listed above serves you all well. It is mostly a compilation of tutorial code and contributions from other forumn members...credit is given where it is due...the rest are a few modifications and a few functions of my own. Some aren't used (not yet anyway) as this VR walkthrough program is only in its first version. Future versions will include shadows and other features. The main thing is that it works. I wish you all well. Take Care. Jediam
Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 25th Jun 2012 13:03
I think that putting the dll's in your main folder will work as well for people that don't have them. As far as I know Windows searches System 32, and the original folder for Dll's.

Jediam
14
Years of Service
User Offline
Joined: 14th Apr 2012
Location:
Posted: 25th Jun 2012 13:18
Out of curiosity, say if you have an older version of one or more of the .dll's in the System32 folder and you place newer versions of them in the main folder; would that cause a crash or other potential conflict? I mention this because a user might be unaware they already have one or more of them in their System32 folder.
basjak
16
Years of Service
User Offline
Joined: 16th Apr 2010
Location: feel like signing up for mars
Posted: 25th Jun 2012 14:33
it will not cause a crash and if any conflict happen, DBpro will tell you.

putting Dll in your project folder or system32/64/128 is the same for windows because, if windows don't find the required dll, it will go to the system folders and search for it.

glad to help .

Login to post a reply

Server time is: 2026-07-09 02:31:28
Your offset time is: 2026-07-09 02:31:28