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 Discussion / The DB Classic Programming Challenge Thread

Author
Message
NanoGamez guy
19
Years of Service
User Offline
Joined: 13th Jan 2007
Location: Closer than you think...
Posted: 24th Jul 2008 16:31
OMG A glitch in the forum!
When I clicked on [last page] next to 'The DB Classic Programming Challenge Thread' this came up:



Also, it sais in the thread list that there is 2001 posts on this board, but I have 100 posts per page and there is only 20 pages! And now when I look just above the 'Post Forum Message' it sais that there are only 2000 posts! Weird.


Time to change my sig...
Irojo
18
Years of Service
User Offline
Joined: 21st May 2008
Location: Eating toast.
Posted: 24th Jul 2008 16:55 Edited at: 24th Jul 2008 17:03
Weird! That happened to me before too!




[EDIT]

Quote: "So, you mean if the music is playing and you pause and then play again, it starts from the start? What kind of music file does this happen on?"


I'll check what music file it is, but when you press pause, and then press play, it didn't go from the start. It didn't go at all.


Ok. It only happens on a '.mid' Everything else pauses perfectly.

I urge you to watch the film "Who killed the electric car". Support electric cars! Did you know their used to be more electric cars then gassoline cars?
NanoGamez guy
19
Years of Service
User Offline
Joined: 13th Jan 2007
Location: Closer than you think...
Posted: 24th Jul 2008 18:18
That's a drag, because my computer won't allow me to play midis on darkbasic so I can't test that out. I think it's something to do with my sound configuration or something.

Does anybody else know why there would be a problem pausing midi files?


Time to change my sig...
Phaelax
DBPro Master
23
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 24th Jul 2008 19:57
Thanks nano, I'll check into it.


BN2 Productions
22
Years of Service
User Offline
Joined: 22nd Jan 2004
Location:
Posted: 24th Jul 2008 23:14
@nano
Interesting, I couldn't repeat the error (even used a word file). Try at the end of the filetypebranch subroutine insert name$="".

Quote: "is that allowed?"


I don't see why not, all I do is use the execute file command.

Ever notice how in Microsoft word, the word "microsoft" is auto corrected to be "Microsoft" but "macintosh" just gets the dumb red underline?
Phaelax
DBPro Master
23
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 25th Jul 2008 08:46
Reworked the scrolling, which was a major pain in the butt. Little has changed since last time, other than the bug fix. Scroll with your mouse wheel for a smooth scrolling effect. No more line by line scrolling, its now pixel scrolling.





Irojo
18
Years of Service
User Offline
Joined: 21st May 2008
Location: Eating toast.
Posted: 25th Jul 2008 19:04
I got "Path does not exist" After the pause button was made.


the function setDir(path$)

was where the area was. I tried reming it out, but then I got "Cannot divide by zero"

I urge you to watch the film "Who killed the electric car". Support electric cars! Did you know their used to be more electric cars then gassoline cars?
NanoGamez guy
19
Years of Service
User Offline
Joined: 13th Jan 2007
Location: Closer than you think...
Posted: 25th Jul 2008 19:18
Change



to



OR




Thank you for your time.
Irojo
18
Years of Service
User Offline
Joined: 21st May 2008
Location: Eating toast.
Posted: 25th Jul 2008 21:35
Awesome it worked. Thanks Nano.

Phaelax- Pretty sweet program. I love the way that you can resize it. It looks beautiful. Just so you know, I couldn't play .mid's.

I urge you to watch the film "Who killed the electric car". Support electric cars! Did you know their used to be more electric cars then gassoline cars?
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 25th Jul 2008 23:57 Edited at: 26th Jul 2008 00:35
Quote: "Just so you know, I couldn't play .mid's."


That is a problem with DBC. That`s why you don`t need to be able to play mid`s in this challenge. Whenever you load a midi with "Load music" and declare it as music 1, it will play. but if you load a second midi and declare it as music 2, the "play music 2" command won`t play it.

Also, if you delete the existing music and replace it with another midi file, it will play the first one you loaded...

@Phaelax

Your entry is magnificent! Keep up the good work
Although your program doesn`t support a lot yet

@BN2

Your program is nice to use, but there are some bugs:
-The sounds doesn`t stop playing
-The Music doesn`t stop playing(I take back what I said above about midis)
-animated models don`t play
-it is possible to scroll down for ever

I hope you can fix those!

@NanoGamez Guy

Every time I try to access c:, I get the error "Path does not exist", so I couldn`t test what files it supports. Anyway, I see you have added some particles to the mouse. I like that! You will certainly get some points for that!

TheComet

Your signature has been erased by a mod - Please reduce it to 600x120 maximum size
BN2 Productions
22
Years of Service
User Offline
Joined: 22nd Jan 2004
Location:
Posted: 26th Jul 2008 05:00 Edited at: 26th Jul 2008 05:49
Quote: "-The sounds doesn`t stop playing
-The Music doesn`t stop playing(I take back what I said above about midis)"


It isn't supposed to on its own. The idea was that you can listen to music while you explore your files. To stop it, press backspace.

I already fixed the scroll down problem, just haven't updated my code

[EDIT]
Ok, attached the new code, it is a dba file for convenience. New stuff:

Right click menu should be done. You can cut,copy,paste,rename,or delete files/folders. Also, the new button creates a new folder.

As stated before, the music will continue looping till you press backspace.

Scrolls are fixed so that you can't scroll to infinity. Page down will scroll more for text files than the arrow keys.

Animated 3D models will play and loop.

That should be about it!

Ever notice how in Microsoft word, the word "microsoft" is auto corrected to be "Microsoft" but "macintosh" just gets the dumb red underline?
NanoGamez guy
19
Years of Service
User Offline
Joined: 13th Jan 2007
Location: Closer than you think...
Posted: 26th Jul 2008 22:23
OK I fixed the bug that you mentioned Comet, and now it can read and display tabs in text documents. Entry attached.


Thank you for your time.
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 27th Jul 2008 19:14
***************************************************************************
VERY IMPORTANT!!
***************************************************************************

I will not be here on the 28th of July, 2008, I will be in a camp somewhere in the middle of no-where, and will not be here to declare the DEADLINE!

I will be arriving back on the 1. August, 2008, and I need someone to take over. Mabye TDK, Latch, Obese, Sinani, or someone that didn`t enter a challenge...

Please report!

TheComet

Your signature has been erased by a mod - Please reduce it to 600x120 maximum size
Irojo
18
Years of Service
User Offline
Joined: 21st May 2008
Location: Eating toast.
Posted: 27th Jul 2008 20:23
If nobody else volunteers, I'd be willing to do it. Obviously I'll be the last choice, because I won't noticed difficult stuff as well (the way the noobs work). But if you need me, I'm always willing. Just so you know.

OR

We could make the deadline early if that works for everyone.

I urge you to watch the film "Who killed the electric car". Support electric cars! Did you know their used to be more electric cars then gassoline cars?
Phaelax
DBPro Master
23
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 27th Jul 2008 21:08
no early deadline! I need time to finish my entry and this nerd already has plans with a girl(a real one) for today.


TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 27th Jul 2008 21:53
OR

I could move the Deadline to Thursday, 31st of July, 2008. I get back a day earlier.

But I`m sure that is forbidden. It says that on the first post...

So lets vote!

1) Who thinks Irojo should take over(or someone else
2) Who thinks, we should move the Deadline to Thursday, 31st of July, 2008?

Please answer as soon as possible!

TheComet

Your signature has been erased by a mod - Please reduce it to 600x120 maximum size
BN2 Productions
22
Years of Service
User Offline
Joined: 22nd Jan 2004
Location:
Posted: 27th Jul 2008 23:52
I have no problems postponing it. I had an idea for an addition that I wouldn't be able to finish on time anyway, so that will help me out. No problems though with getting someone else, except for the fact that since it IS your challenge (and a very specific one at that) only you really know what you wanted to see. My preference is an extended deadline, but I can go either way.

Ever notice how in Microsoft word, the word "microsoft" is auto corrected to be "Microsoft" but "macintosh" just gets the dumb red underline?
Irojo
18
Years of Service
User Offline
Joined: 21st May 2008
Location: Eating toast.
Posted: 28th Jul 2008 00:02 Edited at: 28th Jul 2008 00:02
That leaves it to Nano to vote, the other person to enter I think.

I urge you to watch the film "Who killed the electric car". Support electric cars! Did you know their used to be more electric cars then gassoline cars?
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 28th Jul 2008 01:01
OK, Nano, I will be online at 7:00 28th July, 2008. If you don`t post until then, I will extend the Deadline.

I also need a vote from Phaelax.

TheComet

Suicide is away of telling God, You can’t fire me I quit !!!!!
Phaelax
DBPro Master
23
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 28th Jul 2008 01:58
extend it


NanoGamez guy
19
Years of Service
User Offline
Joined: 13th Jan 2007
Location: Closer than you think...
Posted: 28th Jul 2008 02:04 Edited at: 28th Jul 2008 02:06
I think you should extend it, unless someone else volunteers within the next few hours.


Thank you for your time.
Irojo
18
Years of Service
User Offline
Joined: 21st May 2008
Location: Eating toast.
Posted: 28th Jul 2008 05:57
Alright. Everyone whos entered votes extend it. Then we extend it. Any disagreements TDK?


Comet I know your leaving (or gone now) Don't worry about it.

Then since everybody votes we extend, We extend.


To the future winner! Make the challenge next time easier? Please?

I urge you to watch the film "Who killed the electric car". Support electric cars! Did you know their used to be more electric cars then gassoline cars?
Sinani201
19
Years of Service
User Offline
Joined: 16th Apr 2007
Location: Aperture Science Enrichment Center
Posted: 28th Jul 2008 06:42 Edited at: 28th Jul 2008 06:45
If there are people who have not finished the challenge, but has some more code to go, then extend it.
But if everyone is pretty much done, let someone else judge the challenge which should be the Runner-Up of the last challenge, who is NanoGamez Guy. After all, it is stated in the rules:
Quote: "If the challenge setter fails to judge entries or set a new challenge within 24 hours of the deadline, responsibility for judging and setting a new challenge will pass to the previous runner up. If that person also fails to act promptly, entrants may vote for a winner and new challenge."



TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 28th Jul 2008 09:35
I will extend the Deadline. Phaelax said he still had some coding to do, and as BN2 said:

Quote: "No problems though with getting someone else, except for the fact that since it IS your challenge (and a very specific one at that) only you really know what you wanted to see."


It IS my challenge, and I am willing to judge it.

The new Deadline:

31st of July, 2008 Midnight GMT

And that is the final Deadline

Luck to all, TheComet

Suicide is away of telling God, You can’t fire me I quit !!!!!
Irojo
18
Years of Service
User Offline
Joined: 21st May 2008
Location: Eating toast.
Posted: 28th Jul 2008 22:33
That's the way to do it. Because Nano can't judge. (Or wouldn't want to)

Considering he entered the contest.

I urge you to watch the film "Who killed the electric car". Support electric cars! Did you know their used to be more electric cars then gassoline cars?
Phaelax
DBPro Master
23
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 28th Jul 2008 23:14
Can you not use a gosub inside of a function?


Latch
19
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 28th Jul 2008 23:59 Edited at: 29th Jul 2008 00:07
Yeah, you can - but the subroutine has to be local to the function



Enjoy your day.
Irojo
18
Years of Service
User Offline
Joined: 21st May 2008
Location: Eating toast.
Posted: 29th Jul 2008 01:15
ahhh I always wondered about that.

I urge you to watch the film "Who killed the electric car". Support electric cars! Did you know their used to be more electric cars then gassoline cars?
Phaelax
DBPro Master
23
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 29th Jul 2008 02:34
That makes sense.

Made a few bug fixes and added XM support and MIDI support. I did notice the bug with pausing midi files. And I must say there is quite a delay on loading a 40KB midi when a 2MB jpg is loaded instantly. Video support next.


Irojo
18
Years of Service
User Offline
Joined: 21st May 2008
Location: Eating toast.
Posted: 29th Jul 2008 03:35
Let's go Phaelax let's go!

I urge you to watch the film "Who killed the electric car". Support electric cars! Did you know their used to be more electric cars then gassoline cars?
Phaelax
DBPro Master
23
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 29th Jul 2008 15:45
Are the DLL commands standard or part of the enhancement pack?


Irojo
18
Years of Service
User Offline
Joined: 21st May 2008
Location: Eating toast.
Posted: 29th Jul 2008 16:59
I'm almost positive it's enhancement.

I urge you to watch the film "Who killed the electric car". Support electric cars! Did you know their used to be more electric cars then gassoline cars?
Phaelax
DBPro Master
23
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 29th Jul 2008 18:42 Edited at: 29th Jul 2008 18:42
Darn, cause I got a few ideas while looking at the Win API.

Ok, still no video but I did a few more tweaks. Really long filenames no longer span further than their parent component. Added a nifty visual effect for music cause I want da bonuz pointz!




Irojo
18
Years of Service
User Offline
Joined: 21st May 2008
Location: Eating toast.
Posted: 30th Jul 2008 06:27 Edited at: 30th Jul 2008 06:29
Ooooooo looks fabulous. I have proof somewhere the DLLs aren't allowed... hold on...


[EDIT]


...and here it is:
Part of Latch's code, which he said the DLL wasn't part of his entry:


Quote: "
"


I urge you to watch the film "Who killed the electric car". Support electric cars! Did you know their used to be more electric cars then gassoline cars?
NanoGamez guy
19
Years of Service
User Offline
Joined: 13th Jan 2007
Location: Closer than you think...
Posted: 30th Jul 2008 12:40
@Phaelax
How did you get the data for the the visual effect for the music? Did you use a DLL? I've always wondered how you do it.


Thank you for your time.
Phaelax
DBPro Master
23
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 30th Jul 2008 18:51 Edited at: 30th Jul 2008 21:25
Well, I never said the visual actually 'synced' with the music. How its typically done is you take the sound byte info and run it through the FFT algorithm. You can google "spectrum analyzer", should give a few results.

I'm posting my latest version now incase I don't have time to do more before the challenge ends. Clicking on 'my computer' may give funky results since the checklist for drives doesn't actually work (DBC issue, not mine).

EDIT: Took a few minutes to add tooltips to filenames that were too long to fit within the parent window. Just hold your mouse over a long filename for 1sec and it should popup.




Irojo
18
Years of Service
User Offline
Joined: 21st May 2008
Location: Eating toast.
Posted: 30th Jul 2008 23:13
Runtime error at line 777 not enough memory.

It could entirely be my own fault though. It highlighted this area, and "next x" though I'm assuming it was concerning the get image command.



I urge you to watch the film "Who killed the electric car". Support electric cars! Did you know their used to be more electric cars then gassoline cars?
BN2 Productions
22
Years of Service
User Offline
Joined: 22nd Jan 2004
Location:
Posted: 31st Jul 2008 22:01
Ok, I won't be here later for the exact deadline, so here is my final entry. Not sure if I mentioned a few features so here is the updated list of everything.

-Supports text files, dba files, movies, music, sounds, and 3d models.

-Images can be moved around the screen and zoomed in and out with the arrow keys and the +/- keys.

-Music loops forever until the backspace key is pressed

-Right click to open the right-click menu. You can cut,copy,paste rename, and delete files and folders (cut-paste doesn't work with folders) and also create a new folder.

-3D models loop

-Long file names wrap so that they don't collide with each other

-All buttons work save for control panel

-Scroll with up/down and pageup/pagedown. Bug that allowed scrolling to infinity has been fixed.

That should do it, it is attached as a text file because the code buttons seem to mess up my code.

Ever notice how in Microsoft word, the word "microsoft" is auto corrected to be "Microsoft" but "macintosh" just gets the dumb red underline?
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 1st Aug 2008 02:34 Edited at: 1st Aug 2008 02:35
********************************************************************************
<><><><><><><><><><The Challenge is officially over!><><><><><><><><><><><><><>
********************************************************************************


Please be patient while I add up the points to determine, who won...

Suicide is away of telling God, You can’t fire me I quit !!!!!
Irojo
18
Years of Service
User Offline
Joined: 21st May 2008
Location: Eating toast.
Posted: 1st Aug 2008 04:11
Excellent! Good luck everyone. Can't wait to see the winner...

In the word's of a wise man:
Quote: " Hello. "
Irojo
18
Years of Service
User Offline
Joined: 21st May 2008
Location: Eating toast.
Posted: 1st Aug 2008 19:26
Who won?

In the word's of a wise man:
Quote: " Hello. "
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 1st Aug 2008 19:45
Please don`t be impatient, I am still working on the results, I don`t have time today on the 1. August, because that`s the Swiss national day where we let off tons of fireworks. But I will have them by the 2. August.

Suicide is away of telling God, You can’t fire me I quit !!!!!
Irojo
18
Years of Service
User Offline
Joined: 21st May 2008
Location: Eating toast.
Posted: 2nd Aug 2008 00:02
Okay sorry. Are we there yet?

In the word's of a wise man:
Quote: " Hello. "
BN2 Productions
22
Years of Service
User Offline
Joined: 22nd Jan 2004
Location:
Posted: 2nd Aug 2008 09:55
@irojo
Be patient, I want to know who won too, though I have my suspicions. TheComet will finish at his own pace when he is sure that he knows for sure which one wins. Trying to speed the process just dilutes the results.

Ever notice how in Microsoft word, the word "microsoft" is auto corrected to be "Microsoft" but "macintosh" just gets the dumb red underline?
Irojo
18
Years of Service
User Offline
Joined: 21st May 2008
Location: Eating toast.
Posted: 2nd Aug 2008 22:06
I know. I know. I am patient. *twitches*

My internet is not fast enough to double post.
Phaelax
DBPro Master
23
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 2nd Aug 2008 22:25
I noticed Comet had enough time to work on another program and post questions about it yesterday but not judge. Hmmm.......... Building the suspense on purpose.


TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 3rd Aug 2008 13:52 Edited at: 3rd Aug 2008 13:54
Quote: "I noticed Comet had enough time to work on another program and post questions about it yesterday but not judge. Hmmm.......... Building the suspense on purpose.
"


Nope! I have the results right here right now:

Bn2:
--------------------------------------------------------------

Supported:
bmp,jpg,png
mp3,wav,xm,mid
x,3ds
avi,wmv
txt

Interface: 3/5
Special Effects: 1/5
Bonus: 0/5
Clock: 0

NOT Supported:
wma
mp4

NanoGamez Guy:
--------------------------------------------------------------

Supported:
bmp,jpg,png
mp3,wma,wav,xm,mid
x,3ds
avi,wmv
txt

Interface: 4/5
Special Effects: 4/5
Bonus: 5/5
Clock: 1

NOT Supported:
mp4

Phaelax:
--------------------------------------------------------------

Supported:
bmp,jpg,png
mp3,wav,xm,mid

Interface: 5/5
Special Effects: 4/5
Bonus: 1/5
Clock: 0

NOT Supported:
wma
x,3ds
avi,wmv,mp4
txt

--------------------------------------------------------------

So the Winner, with a proud score of 27 points, IS...


Congratulations to the Winner!!

And the runner up, with 17 points, is...


But let`s also congratulate Bn2, with a score of 16 points! A very close challenge.

Suicide is away of telling God, You can’t fire me I quit !!!!!
Irojo
18
Years of Service
User Offline
Joined: 21st May 2008
Location: Eating toast.
Posted: 3rd Aug 2008 16:44
Grats winner!
@TheComet

You really judged everything! Impressive!

My internet is not fast enough to double post.
sinisterstuf
19
Years of Service
User Offline
Joined: 28th Mar 2007
Location: Namibia, Southern Africa
Posted: 3rd Aug 2008 17:35
I haven't seen someone judge stuff like that before... Well done all you guys, I wanted to enter (had a really good idea) but I don't have a pc atm.

Well, what's the next challenge?

[UNERROR 16: able to retrieve user signature]
1,1,2,3,5,8,13,21,34,55... you like?
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 3rd Aug 2008 18:16
Quote: "I haven't seen someone judge stuff like that before... "


It`s the fairest way for larger programs...

Suicide is away of telling God, You can’t fire me I quit !!!!!

Login to post a reply

Server time is: 2026-06-07 15:28:18
Your offset time is: 2026-06-07 15:28:18