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.

Code Snippets / The piano game

Author
Message
vid1987
19
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Oklahoma
Posted: 6th Jan 2005 04:59
Hello i am vid and i have built a piano game it has a few flaws like every time you press a key and play a note you have to hit leftkey to stop it teh white notes are on a,s,d,f,j,k,l,; and teh black notes are e,r,t,y,u but i dont know if it will let anybody else play teh notes because they're only saved on my computer. unless they're programmed into the game (i'm new to darkbasic) try this code out and tell me what i need to work on and how to make it better. peace


Vid

Attachments

Login to view attachments
Sven B
19
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 6th Jan 2005 20:41
instead of using the leftkey u could use the "else" command.

for example:

if keystate(30)=1 then play music 1 else stop music 1
if keystate(31)=1 then play music 2 else stop music 2
...
vid1987
19
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Oklahoma
Posted: 7th Jan 2005 02:10
yes ive already tried that before and the music wont play i dont see whats wrong

Vid
vid1987
19
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Oklahoma
Posted: 7th Jan 2005 02:20
are there any chatrooms for darkbasic programmers cause this is kinda slow...

Vid
vid1987
19
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Oklahoma
Posted: 7th Jan 2005 02:20
why cant i see what i wrote

Vid
vid1987
19
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Oklahoma
Posted: 8th Jan 2005 02:16
hello


Vid
Essence
22
Years of Service
User Offline
Joined: 12th Oct 2002
Location: The Netherlands
Posted: 8th Jan 2005 18:38
you dont need to stop the music. If you do, you cant play more that one note at the same time.


First DifNiX -> now EvaX.

Login to post a reply

Server time is: 2024-11-23 16:55:20
Your offset time is: 2024-11-23 16:55:20