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.

Newcomers DBPro Corner / graphics and matrices

Author
Message
Sk8er Namja
22
Years of Service
User Offline
Joined: 20th Apr 2004
Location:
Posted: 21st May 2004 17:59
sorry to bother you again guys...

I'm really lost. I got my skewed image problem solved now. However, here's the next question.

When I make a normal matrix, with a standard texture it's working in the way I wanna have it. cool. But: I created a graphic that is as big as the screen, and the graphic has transparent parts. When I create a matrix, and then I wanna put in the graphic with the transparent parts, the program crashes, Windows tells me that the software created an error and needed to close. this is what I got:

set display mode 1024,768,32

rem -----------------------------------------------
rem ---> First test of a Matrix in 3D space, with
rem ---> camera move when cursor hits border of screen
rem -----------------------------------------------

rem texture for matrix
load image "winter.jpg", 1, 1

rem ---> load the menu button graphic and sidebar and stuff
[!!! THIS IS THE GRAPHIC I WANNA PUT IN, SIZED 1024X768, TRANSPARENT PARTS !!!]
load image "menu-and-sidebar.png", 2, 1

mouseright# = screen width() - 1
mousebottom# = screen height() - 1
camxpos# = 5
camzpos# = -10

rem --> this would normally be the battlefield
make matrix 1,20,20,5,5
position matrix 1,0,0,0
prepare matrix texture 1,1,1,1
fill matrix 1,0,1
update matrix 1

rem --> camera position
position camera camxpos#,20,camzpos#
xrotate camera 60

rem --> scroll code begins here, in this case it is
rem --> no scrolling, it's only camera movement
do

rem --> show me the options button, man
paste image 2, 0, 0

if mousex()=mouseright#
camxpos# = camxpos# + 0.3
position camera camxpos#,20,camzpos#
endif

if mousex()=0
camxpos# = camxpos# - 0.3
position camera camxpos#,20,camzpos#
endif

if mousey()=mousebottom#
camzpos# = camzpos# - 0.3
position camera camxpos#,20,camzpos#
endif

if mousey()=0
camzpos# = camzpos# + 0.3
position camera camxpos#,20,camzpos#
endif

loop


What can this be?

1 PRINT "This s..t works!!!"
2 GOTO 1
RUN
Lampton Worm
23
Years of Service
User Offline
Joined: 4th Sep 2002
Location: United Kingdom
Posted: 22nd May 2004 23:16
Hi,

Can you upload the media you are using somewhere so I can give this a whirl?

I copied the program and used my own graphics, and it worked fine.

Cheers.
Sk8er Namja
22
Years of Service
User Offline
Joined: 20th Apr 2004
Location:
Posted: 24th May 2004 15:03
I solved the problem... The compiler itself was messed up...

I reinstalled DB Pro entirely, now it works. Very strange.

1 PRINT "This s..t works!!!"
2 GOTO 1
RUN

Login to post a reply

Server time is: 2026-07-14 04:45:25
Your offset time is: 2026-07-14 04:45:25