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 / What am i doing wrong ?

Author
Message
Justice
22
Years of Service
User Offline
Joined: 22nd Jun 2004
Location:
Posted: 11th Aug 2011 10:27 Edited at: 11th Aug 2011 11:26
Hi,

I have just installed the free version of darkbasicpro onto my computer and run the latest update. I have then entered my verification key (i got this from the verification code section in my account) and it verified fine.

I have installed the above on windows 7 and on windows xp on my old pc and i have the following problem.

The problem i have is that when i run a program ( I have tried all the demo programs which come with the software, ie road terrain demo) all i get is a flash of a black screen and then it returns me back to the editor or to windows if i run the .exe

I thought this might be a problem with windows 7 but i have tried it on windows xp as well.

Any ideas ? this is really anoying !!


If i do a simple program. eg.

print "Hello World!"
wait key
end


works fine.
Burning Feet Man
18
Years of Service
User Offline
Joined: 4th Jan 2008
Location: Sydney, Australia
Posted: 11th Aug 2011 11:21
Care to post an example of your code? If you're worried about sharing your code, code something simple up which still has the problem.

Help build an online DarkBASIC Professional help archive.
DarkBasic Help Wikia
Justice
22
Years of Service
User Offline
Joined: 22nd Jun 2004
Location:
Posted: 11th Aug 2011 11:29 Edited at: 11th Aug 2011 11:30
if i load the facedemo for example which comes with the darkbasicpro download

i open the file and load it and press f5 (im not used to the new editor , i have only used the very old one)

A windows opens up for about a second and then it goes back to the editor

here is the program.

Rem Project: FaceDemo
Rem Created: 12/08/2002 04:09:58
rem Tested for: U6.0

rem Init
sync on : sync rate 120 : backdrop off

rem Load Head and prepare
load object "media\Head.x",1

rem Add bump mapping to face
load effect "newmedia\bump.fx",1,0
scale object texture 1,5,5
load image "newmedia\D.dds",11
load image "newmedia\N.dds",12
load image "newmedia\S.dds",13
texture object 1,0,11
texture object 1,1,12
texture object 1,2,13
set object effect 1,1

rem Handle head eyes
make object sphere 2,50 : glue object to limb 2,1,1 : hide limb 1,1
make object sphere 3,50 : glue object to limb 3,1,2 : hide limb 1,2
scale object 2,100,75,100
scale object 3,100,75,100

rem Black bloc for mouth
make object sphere 4,75
color object 4,0
glue object to limb 4,1,0
position object 4,0,55,-70

rem Detail the eyes
load image "media\refl.bmp",1
load image "media\face2.bmp",2
texture object 2,1 : rotate object 2,90,0,90 : scale object texture 2,0.5,0.5
texture object 3,1 : rotate object 3,90,0,90 : scale object texture 3,0.5,0.5
rotate object 2,270,180,0
rotate object 3,270,180,0

rem Create backdrop and body
make object plain 201,1300,1000
yrotate object 201,350
load image "media\backdrop.jpg",201
position object 201,100,10,380
set object light 201,0
texture object 201,201
make object sphere 202,600
scale object 202,60,100,40
color object 202,0
xrotate object 202,330
position object 202,0,-210,150

rem Bump map the body
scale object texture 202,4,4
texture object 202,0,11
texture object 202,1,12
texture object 202,2,13
set object effect 202,1

rem Reflective mirror
stencilbuffervalid=0
if statistic(2)=1
stencilbuffervalid=1
make object sphere 501,500
position object 501,200,75,50
scale object 501,30,80,40
ghost object on 501
set reflection shading on 501
make object plain 502,5000,5000
position object 502,0,0,-300
set object light 502,0
yrotate object 502,20
endif

rem Create smoke effect
load image "media\smoke.tga",601
for ss=0 to 9
make object plain 601+ss,128,128
position object 601+ss,-25-rnd(25),-50-(ss*50),-175
zrotate object 601+ss,rnd(350)
texture object 601+ss,601
set object light 601+ss,0
ghost object on 601+ss,0
next ss

rem Setup light
set ambient light 0
set point light 0,0,100,-300
set light range 0,500

rem Setup color lights
make light 1 : set point light 1,-300,0,-200 : color light 1,rgb(0,0,255)
make light 2 : set point light 2, 300,0,-200 : color light 2,-255,255,-255
make light 3 : set point light 3,0,-100,-300 : color light 3,500,-100,-100

rem Create some particles
load image "media\fire.bmp",42
make fire particles 1,42,500,40-6,74,-245,2,20,3

rem Load fire animation
for ff=0 to 10
load image "media\fire\fire"+str$(10000+ff)+".tga",301+ff
next ff
anim=301

rem Setup camera
set camera range 2,2000
position camera 40,75,-250
rotate camera 0,0,0

rem Load all sounds
load sound "media\sounds\fire.wav",1 : loop sound 1
load sound "media\sounds\urg1.wav",2 : set sound speed 2,12000
load sound "media\sounds\urg2.wav",3 : set sound speed 3,12000
load sound "media\sounds\urg3.wav",4 : set sound speed 4,12000

rem Main loop
do

rem Rotate face based on mouse position
moverate#=100.0
w#=wrapvalue(w#+2)
px#=mousex()+cos(w#)*5
py#=mousey()+sin(w#)*5
xmouse#=curvevalue((320-px#)/20.0,xmouse#,moverate#)
ymouse#=curvevalue((240-py#)/20.0,ymouse#,moverate#)

rem Mouse coords
mx=mousex() : my=mousey()

rem Detect mouse pause
if lastx=mx and lasty=my
if timer()-lasttime>3000
autofly=1 : play sound 2+rnd(2)
endif
else
lastx=mousex() : lasty=mousey()
lasttime=timer()
autofly=0
endif

rem Automove fly
if autofly=1
position mouse rnd(640),rnd(480)
endif

rem Rotate Head
position object 1,xmouse#,0,0
position object 202,xmouse#/2.0,-210,150
yrotate object 202,-1*(xmouse#/10.0)
rotate object 1,ymouse#,xmouse#-10,0

rem Flame animation in eyes
texture object 2,anim : texture object 3,anim
set sphere mapping on 2,2 : set sphere mapping on 3,2
inc animp
if animp>10
animp=0
inc anim : if anim>311 then anim=301
endif

rem Rotate mirror sphere
if stencilbuffervalid=1
mr#=wrapvalue(mr#+1)
position object 501,250+(cos(mr#)*30),75+(sin(mr#)*10),100
rotate object 501,340,40+180+(cos(mr#)*10),5
texture object 502,anim
endif

rem Raise smoke
for ss=0 to 9
zrotate object 601+ss,wrapvalue(object angle z(601+ss)+0.03)
if object position y(601+ss)>200
position object 601+ss,-25-rnd(25),-200,-175
else
position object 601+ss,object position x(601+ss),object position y(601+ss)+0.1,-175
endif
next ss

rem Update screen
sync

rem End loop
loop
Zaxtor99
14
Years of Service
User Offline
Joined: 27th Jul 2011
Location: Boise, Idaho, USA
Posted: 11th Aug 2011 11:29
Hmm, it seems odd that EVERY demo you are running just flashes the black window before returning back to windows or the editor.

Just a quick question.. Are you sure that you have at least Directx 9.0c installed on each of your computers? That's the only thing I can think of off at the moment that might cause your problem. Even old video card drivers wouldn't do what you describe on EVERY demo I don't think.


- Zaxx
Justice
22
Years of Service
User Offline
Joined: 22nd Jun 2004
Location:
Posted: 11th Aug 2011 11:31
I have the very latest drivers installed.
Zaxtor99
14
Years of Service
User Offline
Joined: 27th Jul 2011
Location: Boise, Idaho, USA
Posted: 11th Aug 2011 11:37 Edited at: 11th Aug 2011 11:40
Okay, try this ON YOUR WINDOWS 7 machine first...

Exit DB Pro

Then right click on the DB Pro icon on your desktop and click PROPERTIES.

Next click the COMPATIBILITY tab.

And finally towards the bottom should be a box you need to check that says RUN AS ADMINISTRATOR. Then be sure you click APPLY.

Now bring DB Pro back up and run the demo from within DB Pro again and tell us what happens.

Also please don't put code into your posts as you did above. Instead if you want to insert code in a post, just click the CODE button at the tip of the message editor just before you paste your code in, then after pasting, click the CODE button a second time. This will make much neater posts that also follow the suggested rules of posting on these forums.


- Zaxx
Justice
22
Years of Service
User Offline
Joined: 22nd Jun 2004
Location:
Posted: 11th Aug 2011 12:38 Edited at: 11th Aug 2011 12:38
The administrator tab was already set.

Sorry about the code

Hodgey
16
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 11th Aug 2011 12:44
No error messages? Could you post specs for both pcs?
You can try to compile and run this, it's a little bigger than a hello world program but I don't see why none of the demos work.



Justice
22
Years of Service
User Offline
Joined: 22nd Jun 2004
Location:
Posted: 11th Aug 2011 12:47
your program works fine.
Zaxtor99
14
Years of Service
User Offline
Joined: 27th Jul 2011
Location: Boise, Idaho, USA
Posted: 11th Aug 2011 13:04 Edited at: 11th Aug 2011 13:05
Hmmm, odd.

I'm starting to wonder if your demo media files or something got installed incorrectly somehow since you say his code works and it doesn't use any media files or anything. But then again, I think that would produce errors.

Check these folders and see what you have...

C Drive (or your main hard drive if not C)
Program Files
The Game Creators
Dark Basic Professional
Projects
Face Demo

- In the Face Demo, you should have 25 files and 2 folders (you can see this quickly by clicking Properties on the Face Demo folder.

Check that, make sure you have all those folders I listed in the order they should come up in and the media files in that Face Demo folder as well.

{shrugs}


- Zaxx
Hodgey
16
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 11th Aug 2011 13:09
Quote: "your program works fine. "

We're making progress . I've attached one of my projects, have a go at running it.

Justice
22
Years of Service
User Offline
Joined: 22nd Jun 2004
Location:
Posted: 11th Aug 2011 13:11
I'll check that,

one odd thing is that i re installed and old version onto my laptop 1.058 (I use to program an awful lot many years ago !!)

Everything works fine with this version. All the demos and all my programs.

This must meen that there is something strange going on in the new version or im doing something wrong in the new version. has any commands changed since 1.058 perhaps its jumping out of the program due to an error not been picked up while compiling ?

Do i have to do anything different in the new editor.

I just went to open file, load the demo and pressed f5

I have tried another editor as well (indigo editor) and i have the same problems with that
Zaxtor99
14
Years of Service
User Offline
Joined: 27th Jul 2011
Location: Boise, Idaho, USA
Posted: 11th Aug 2011 13:18
Yeh at some point soon, I believe that I would completely uninstall DB Pro on your machine, and re-download it from THIS website (make sure you're not downloading it from some torrent site or something, heh) and reinstall the newly downloaded client and see if your problems vanish or if they are still there.

By the process of elimination, eventually you should come to the culprit of your problems.


- Zaxx
Justice
22
Years of Service
User Offline
Joined: 22nd Jun 2004
Location:
Posted: 11th Aug 2011 13:21
on my main pc i did download the free version from the official site and then i downloaded the latest update from the same site
Hodgey
16
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 11th Aug 2011 13:23
You could try downloading the latest release candidate found in the dbpro sticky thread at the top of this board.

Zaxtor99
14
Years of Service
User Offline
Joined: 27th Jul 2011
Location: Boise, Idaho, USA
Posted: 11th Aug 2011 13:24
Okay let's download hodgeys project from his last post here and see if that works for you first of all, then make sure you have all the folders I listed above in the order I typed them and all is good there.

Doing those two things might give us more to go on.


- Zaxx
Justice
22
Years of Service
User Offline
Joined: 22nd Jun 2004
Location:
Posted: 11th Aug 2011 14:46
ok i downloaded hodgeys project and pressed f5 to run it.

I got a quick flash of a black window and then it returned to the editor.
Hodgey
16
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 11th Aug 2011 15:02
Sounds like the problem revolves around loading external media. I have not come across this problem before. I'm just going to list the things that I think may be causing this:

- Anti-virus: try turning it off and then compiling. REMEMBER you're vulnerable when your AV is turned off so be careful when doing this.
- User account controls: You could try turning UAC off.

Justice
22
Years of Service
User Offline
Joined: 22nd Jun 2004
Location:
Posted: 11th Aug 2011 15:08
strange that when im running darkbasic with version 1.058 everything works ok.

All the demos work fine under this version. (and all my old software)

Your program failed to compile with this version though. It didnt like the shipnum as interger command. i guess this has changed quit a bit since this version.
Hodgey
16
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 11th Aug 2011 15:14
Quote: "strange that when im running darkbasic with version 1.058 everything works ok."

I forgot about that aspect.

I remember someone mentioning that updating their .net framework version to the latest version made dbpro work for them. You could try that. It may explain why an old version of dbpro works but not the new version.

Justice
22
Years of Service
User Offline
Joined: 22nd Jun 2004
Location:
Posted: 11th Aug 2011 15:23
I look on my installed programs it shows :


microsoft .net framework 1.1

microsoft .net framework 4 client profile

microsoft .net framework 4 extended
Justice
22
Years of Service
User Offline
Joined: 22nd Jun 2004
Location:
Posted: 11th Aug 2011 15:53
What version do you have ?
Justice
22
Years of Service
User Offline
Joined: 22nd Jun 2004
Location:
Posted: 11th Aug 2011 16:26 Edited at: 11th Aug 2011 16:48
I now have darkbasic version 1.058 on my desktop, all working ok !

I have installed the 1.058 on my laptop (win xp) and then run the update to the latest version (1.077).
no errors occur except for : no icon is specified for the final .exe when i compile program

compile and run program. black window and then it returns to editor


Justice
22
Years of Service
User Offline
Joined: 22nd Jun 2004
Location:
Posted: 11th Aug 2011 19:14 Edited at: 11th Aug 2011 19:15
I have managed to get my darkbasic pro working up to update 7.4

Everything works fine with this version.

If i try to install 7.5 or newer then the old problems return.

I guess this might have something to do with the new editor which is installed with 7.5 and later.
Hodgey
16
Years of Service
User Offline
Joined: 10th Oct 2009
Location: Australia
Posted: 12th Aug 2011 00:23
I have version 4 of the .net framework. I think 1.1 is a bit outdated, here is the latest version: .net framework 4

Quote: "I guess this might have something to do with the new editor which is installed with 7.5 and later."

I think so too.

One last thing, people generally don't like double posts let alone quadriple posts. So for future reference please edit your posts if you would like to add something.

Justice
22
Years of Service
User Offline
Joined: 22nd Jun 2004
Location:
Posted: 13th Aug 2011 20:36 Edited at: 13th Aug 2011 22:09
I have version 4 on my pc already and i still have the same problems.

i also have version 4 on my laptop with xp


I have now got the latest version working !!!!!

But i have to use the old editor.

Login to post a reply

Server time is: 2026-07-10 08:27:58
Your offset time is: 2026-07-10 08:27:58