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 / My First Coding Experience in DBP

Author
Message
maybe123
16
Years of Service
User Offline
Joined: 6th Feb 2008
Location: Tasmania
Posted: 6th Feb 2008 12:39
Hey all, so I picked up Dark Basic Pro the other day, and today I finally decided to "churn" out something, not using the tutorials, eyeballing the index of the Help when needed of course.

So I have wrote a basic "music" player that plays different songs from my collection depending on what key number you press (1,2,3,4,5,6) also have a Q key that will quit, and R key that generates a Random number and then activates that song

I know my coding isn't perfect, I am only a couple days old I have been looking at different "ways" to layout coding etc. So here is what I have achieved in a few hours.



I dabble in this and I dabble in that; one learns multiples skills by dabbling.
Hayer
18
Years of Service
User Offline
Joined: 4th Nov 2005
Location: Norway
Posted: 6th Feb 2008 14:06
Gratz

But i'll stick with Winamp

IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 6th Feb 2008 22:24
Thanks for your contribution Hayer. It was really helpful

@maybe123,
Not bad for a first program, and well done on figuring out what scancodes you needed to use.

One minor improvement you could make - you are using floating point variables for everything when integers would be more fitting. Just take the # off the mus# and rand# variables.

BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 6th Feb 2008 23:32
It's quite refreshing for a first post to be constructive, rather than "Gimme teh codez". Let's hope your enthusiasm rubs off on a few more people

Welcome to the forums!
maybe123
16
Years of Service
User Offline
Joined: 6th Feb 2008
Location: Tasmania
Posted: 7th Feb 2008 08:09
Thankyou IanM, I wasn't 100% sure I needed the # or anything as I found later that it worked without them. I was reading the "HandsOnDBProVol1.pdf" today and came across that aswell. Thanks to all for the comments. Next step, some "Eye candy" to go with my Music Player I guess, I figure seeing how I have worked out a little about music and playing etc, adding graphics to it wouldnt hurt, as then I would of learnt some 2D graphics also that I may as well expand upon that seeing how I make my own music FL Studio is very handy if I do say myself. I haven't really used anything else so if you have any suggestions I am more than welcome to learn it or try it out.

Also here is a "free to use non commercial use of cause, random non good song ".
http://dodownload.filefront.com/9587128//828d9ad66a8f77b38f0f771b127180dac7344fe5c6a858c9bcd2cd597a965831c3af105481229f73

I dabble in this and I dabble in that; one learns multiples skills by dabbling.

Login to post a reply

Server time is: 2024-09-27 10:33:58
Your offset time is: 2024-09-27 10:33:58