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.

2D All the way! / [DB 1.13] I need help to fix this code of mine.

Author
Message
BlackXStudios
20
Years of Service
User Offline
Joined: 14th Jun 2003
Location: Canada
Posted: 30th Jun 2003 21:46
`-------------------
` X Plane Fighters
`-------------------
`Author: Christopher Pawliuk

`Set system settings
set display mode 800, 600, 16
sync on
sync rate 0

`Hide mouse
hide mouse

`Intro
load image "bmp\intro.bmp",1
paste image 1,0,0
sync
sleep 4000
delete image 1
load image "bmp\intro1.bmp",2
paste image 2,0,0
sync
sleep 4000
delete image 2
load image "bmp\intro2.bmp",3
paste image 3,0,0
sync
sleep 4000
delete image 3
load image "bmp\intro3.bmp",4
paste image 4,0,0
sync
sleep 6000
delete image 4

`Main menu
load image "bmp\Main Menu.bmp",5
paste image 5,0,0
sync
sleep 0

`Load buttons
load image "bmp\start.bmp",6
paste image 6,20,180
sync
sleep 0
delete image 6
load image "bmp\options.bmp",7
paste image 7,220,180
sync
sleep 0
delete image 7
load image "bmp\help.bmp",8
paste image 8,420,180
sync
sleep 0
delete image 8
load image "bmp\netplay.bmp",9
paste image 9,20,380
sync
sleep 0
delete image 9
load image "bmp\credits.bmp",10
paste image 10,220,380
sync
sleep 0
delete image 10
load image "bmp\quit.bmp",11
paste image 11,420,380
sync
sleep 0
delete image 11

`Show mouse
show mouse

`Disable escape key



I really wana make a main menu with a intro for my 2D Air plane game. I started using Dark Basic 1 month ago and I cant seem to get my main menu to work. And the mouse just frezze's and doesnt move. Any amount of help would be nice. Thanks.
disable escapekey

`Simple loop
do

`Manual escape key exit
if escapekey()=1 then exit

`End of loop
loop

`Enable escape key
enable escapekey
http://members.lycos.co.uk/pawliukc/logo_site.gif
www.blackxstudios.tk
Pincho Paxton
21
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 30th Jun 2003 23:26 Edited at: 30th Jun 2003 23:31
Well you don't need a sync everytime you load an image or BMP. Also Sleep 0 does nothing. It's like saying (wait for no time). So take those lines out completely. You can sync graphics if they are part of an intro with several screens, and you can sleep for anything greater than zero. If you are making a menu then Sync after all of the images have been placed, not just each one. So you can paste 6 Images then Sync.
qwertzuiop
20
Years of Service
User Offline
Joined: 12th May 2003
Location: Cyberspace
Posted: 1st Jul 2003 00:14
Use sprite instead of paste image! This is faster than paste img:

backdrop on : color backdrop rgb(0,0,0) : sync on
load image "image.bmp",num
sprite num,x,y,1
set sprite num,0,1

do
sync
loop
qwertzuiop
20
Years of Service
User Offline
Joined: 12th May 2003
Location: Cyberspace
Posted: 1st Jul 2003 00:18
backdrop on : color backdrop rgb(0,0,0) : sync on
load image "image.bmp",num
sprite 1,x,y,num
set sprite 1,0,num

do
sync
loop
qwertzuiop
20
Years of Service
User Offline
Joined: 12th May 2003
Location: Cyberspace
Posted: 1st Jul 2003 00:20
A rohadt geci életbe

SET SPRITE 1,0,1
Pincho Paxton
21
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 1st Jul 2003 01:48 Edited at: 1st Jul 2003 01:51
I don't really see the advantage of using sprites for a menu to be honest. It seems a bit odd. I wouldn't do it, in fact I wouldn't use images either. I'd just use a large picture for the menu. That would be a single load, and just makes everything much simpler.

Having said that though...if you want the menu items to light up when the mouse goes over them you need to paste images anyway.
BlackXStudios
20
Years of Service
User Offline
Joined: 14th Jun 2003
Location: Canada
Posted: 1st Jul 2003 21:26
thanks for the help. I asked this question before but all I got was people saying I should use 3D Gamemaker beacuse Iam dumb.

Thanks all you guys for showing examples. thanks.

http://members.lycos.co.uk/pawliukc/logo_site.gif
www.blackxstudios.tk
BlackXStudios
20
Years of Service
User Offline
Joined: 14th Jun 2003
Location: Canada
Posted: 1st Jul 2003 22:20
Oh never mind. Some of you said to have image and some said sprite so I did sprite. It still wont work. Heres my code:

`-------------------
` X Plane Fighters
`-------------------
`Author: Christopher Pawliuk

`Set system settings
set display mode 800, 600, 16
sync on
sync rate 0

`Hide mouse
hide mouse

`Intro
load image "bmp/intro.bmp",1
paste image 1,0,0
sleep 4000
delete image 1
load image "bmp\intro1.bmp",2
paste image 2,0,0
sleep 4000
delete image 2
load image "bmp\intro2.bmp",3
paste image 3,0,0
sleep 4000
delete image 3
load image "bmp\intro3.bmp",4
paste image 4,0,0
sleep 6000
delete image 4

`Main menu
load image "bmp\Main Menu.bmp",5
paste image 5,0,0
delete image 5
`Load buttons
load image "bmp\start.bmp",6
paste image 6,20,180
delete image 6
load image "bmp\options.bmp",7
paste image 7,220,180
delete image 7
load image "bmp\help.bmp",8
paste image 8,420,180
delete image 8
load image "bmp\netplay.bmp",9
paste image 9,20,380
delete image 9
load image "bmp\credits.bmp",10
paste image 10,220,380
delete image 10
load image "bmp\quit.bmp",11
paste image 11,420,380
delete image 11

`Show mouse and sync
show mouse
sync

`Disable escape key
disable escapekey

`Simple loop
do

`Manual escape key exit
if escapekey()=1 then exit

`End of loop
loop

`Enable escape key
enable escapekey

http://members.lycos.co.uk/pawliukc/logo_site.gif
www.blackxstudios.tk
BlackXStudios
20
Years of Service
User Offline
Joined: 14th Jun 2003
Location: Canada
Posted: 1st Jul 2003 22:22
`-------------------
` X Plane Fighters
`-------------------
`Author: Christopher Pawliuk

`Set system settings
set display mode 800, 600, 16
sync on
sync rate 0

`Hide mouse
hide mouse

`Intro
load image "bmp/intro.bmp",1
paste image 1,0,0
sleep 4000
delete image 1
load image "bmp\intro1.bmp",2
paste image 2,0,0
sleep 4000
delete image 2
load image "bmp\intro2.bmp",3
paste image 3,0,0
sleep 4000
delete image 3
load image "bmp\intro3.bmp",4
paste image 4,0,0
sleep 6000
delete image 4

`Main menu
load image "bmp\Main Menu.bmp",5
paste image 5,0,0
delete image 5

`Load buttons
load image "bmp\start.bmp",6
paste image 6,20,180
delete image 6
load image "bmp\options.bmp",7
paste image 7,220,180
delete image 7
load image "bmp\help.bmp",8
paste image 8,420,180
delete image 8
load image "bmp\netplay.bmp",9
paste image 9,20,380
delete image 9
load image "bmp\credits.bmp",10
paste image 10,220,380
delete image 10
load image "bmp\quit.bmp",11
paste image 11,420,380
delete image 11

`Show mouse and sync
show mouse
sync

`Disable escape key
disable escapekey

`Simple loop
do

`Manual escape key exit
if escapekey()=1 then exit

`End of loop
loop

`Enable escape key
enable escapekey

http://members.lycos.co.uk/pawliukc/logo_site.gif
www.blackxstudios.tk
BlackXStudios
20
Years of Service
User Offline
Joined: 14th Jun 2003
Location: Canada
Posted: 1st Jul 2003 23:00
Thanks man. Its nice to know people like you help new comers. Good work, keep it up.

http://members.lycos.co.uk/pawliukc/logo_site.gif
www.blackxstudios.tk

Login to post a reply

Server time is: 2024-02-26 20:50:19
Your offset time is: 2024-02-26 20:50:19