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 / trial version of dark basic

Author
Message
Avalanche_ Akshay
19
Years of Service
User Offline
Joined: 27th Jun 2005
Location:
Posted: 28th Jun 2005 01:19
there seems to be a problem whenever i try to put anyobject like a bitmap up. i cant see the object yet i know it is there. I am trying to make a simple game so that my mom would buy the software for me.
what am i doing wrong?

rem SAG

rem Initial settings
sync on
sync rate 12
backdrop off
hide mouse
set display mode 640,480, 16
rem title screen
print "SECRET AGENT GUY VERSION 0.01. PRESS A KEY TO PLAY"
load bitmap "resources/Copy of 13h61m.bmp",100
wait key

rem load objects
load bitmap "resources/level.bmp",100
load image "resources/line.bmp",201
load image "resources/standing.bmp",301

rem setup objects
sprite 2,100,-100,201
wait 2000
sprite 3,100,-100,301
Nicholas Thompson
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 28th Jun 2005 01:50
Try loading it as an image and then use Paste Image or make it a sprite.

Why are you trying to use it as a bitmap? I understand those are mainly for editing an image.. I THINK... I also tend to try to avoid spaces in filenames - just for good practice sake.

My Website:
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 28th Jun 2005 02:39
The only bitmap that is ever displayed by DBPro is bitmap zero, but to use the LOAD BITMAP command on it, I believe that the bitmap file needs to be the same size as the display.

*** Coming soon - Network Plug-in - Check my site for info ***
For free Plug-ins and source code http://www.matrix1.demon.co.uk
Briere
20
Years of Service
User Offline
Joined: 28th Feb 2005
Location: Amherst New York, United States
Posted: 28th Jun 2005 03:06
I never used load bitmap. Just use load image.

Formerly The Fixxer
http://www.xiemsoft.cjb.net
Avalanche_ Akshay
19
Years of Service
User Offline
Joined: 27th Jun 2005
Location:
Posted: 29th Jun 2005 11:55
i tried to make it load a sprite but there is still some problem.
i cant see the sprite even if my camera is pointing to it

rem SAG

rem Initial settings
sync on
sync rate 12
hide mouse
position camera 0,0,-100
point camera 0,0,0

rem title screen
set cursor 0,0
print "SECRET AGENT GUY VERSION 0.01. PRESS A KEY TO PLAY"
load image "resources/Copy of 13h61m.bmp",100
sprite 1,0,0,100
wait key

rem load objects
load image "resources/level.bmp",100
load image "resources/line.bmp",201
load image "resources/standing.bmp",301
make object cube 1,5

rem setup objects
position object 1,0,0,0
sprite 1,0,0,100
wait 1000
sprite 2,0,0,201
wait 2000
sprite 3,0,0,301
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 29th Jun 2005 22:14
Try this:



AUTOCAM OFF - by default DBPro will reposition the camera when you load or create and object, to give a good view of the object. This disables it.

SYNC - When you use the SYNC ON command, you are telling DBPro that you will tell it when to update the display. The SYNC command does this.

You need two SYNC's initially (in your code) to get to the point where you can see somethnig. This is due to the double-buffering system that DirectX uses.

I've added another WAIT KEY at the end to stop the program immediately terminating. This gives you the change to see that last sprite image.

*** Coming soon - Network Plug-in - Check my site for info ***
For free Plug-ins and source code http://www.matrix1.demon.co.uk
Avalanche_ Akshay
19
Years of Service
User Offline
Joined: 27th Jun 2005
Location:
Posted: 30th Jun 2005 04:30
thanks that worked but now my main sprite wont move. i am giving it the right code.

rem SAG

rem Initial settings
autocam off
sync rate 12
hide mouse
position camera 0,0,-10
point camera xpos#,0,0
set sprite 1,0,1
set sprite 2,0,1
set sprite 3,0,1
rem title screen
set cursor 200,0
print "SECRET AGENT GUY VERSION 0.01. PRESS A KEY TO PLAY"
load image "resources/Copy of 13h61m.bmp",100
sprite 1,0,0,100
wait key

rem load objects
load image "resources/level.bmp",100
load image "resources/line.bmp",201
load image "resources/standing.bmp",301
load image "resources/Carbunkle.bmp",1
load image "resources/JackOLantern.bmp",2
load image "resources/Lizard.bmp",3
load image "resources/Yburning.bmp",4
ypos#=336
rem setup objects
sync on
do
sprite 1,0,0,100
wait 1000
sprite 2,0,385,201
wait 2000
sprite 3,xpos#,ypos#,301
sprite 4,600,330,1
if rightkey()=1 then xpos#=xpos#+1
sync
loop
Avalanche_ Akshay
19
Years of Service
User Offline
Joined: 27th Jun 2005
Location:
Posted: 30th Jun 2005 04:48
you dont need to add that many sync commands.
Avalanche_ Akshay
19
Years of Service
User Offline
Joined: 27th Jun 2005
Location:
Posted: 30th Jun 2005 06:25
fixed the problem.

Login to post a reply

Server time is: 2025-06-09 04:17:53
Your offset time is: 2025-06-09 04:17:53