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
TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 19th Jul 2008 00:08
@Phaelax
I tested your example, and the interface is B-E-A-U-tiful!(Although a little small...)

I couldn`t figure out how to go into any folders... Do you double click them?

@BN2
Yours is coming on well, but the button "Desktop" gives me the error "Path does not exist".

Your signature has been erased by a mod - Please reduce it to 600x120 maximum size
Latch
19
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 19th Jul 2008 01:13 Edited at: 19th Jul 2008 08:34
Quote: "Latch wins! Exceeds all requirements and does so in very little code."




@NanoGamez guy

I ran into trouble using the checklist command. I never doubted you but I never ran into a problem before. Even though I can return 540 file results in the checklist quantity(). I can only retrieve the string up to 512! checklist string$(512)

Boo!

Enjoy your day.
NanoGamez guy
19
Years of Service
User Offline
Joined: 13th Jan 2007
Location: Closer than you think...
Posted: 19th Jul 2008 14:16 Edited at: 20th Jul 2008 12:35
@BN2
Awesome entry, I really like the graphical interface.

@Phaelax
Great idea with the interpolated interface, but as TheComet said, mabye a little small.

@Latch
Yeah, that can be a real pain. I wonder why it's limited to 512?

Here's my entry:


You can navigate by:
-using the arrow keys
-using the mousewheel
-clicking on the up or down button
-pressing page up/page down
-moving the slider
-clicking on the green above or below the slider
-clicking on a file and then moving the mouse to the bottom of the screen or top of the screen

You can also use 'back' and 'forward' (like in explorer) and the music player has a cool visulisation.


Did you know - 12% of Americans believe Joan of Arc was Noah's wife.
Irojo
18
Years of Service
User Offline
Joined: 21st May 2008
Location: Eating toast.
Posted: 19th Jul 2008 17:36 Edited at: 19th Jul 2008 17:38
@NanoGreat job. Quite Impressive.

@Everyone You guys have really risen to the challenge. Still, I think Latch's entry is over-the-top.

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: 19th Jul 2008 17:54
I`m a little confused now... Does Latch`s entry count?

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: 19th Jul 2008 18:33
I think it goes under outside media.

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: 19th Jul 2008 20:05
Quote: "2. No external media is allowed - that includes models and external graphics. In other words, the challenge entry must be a single DBA code listing that others can simply copy and paste into DBC and run it. Any media your program uses must be generated by the code itself."


Yep, "explorer.exe" has to be generated by the code itself, or it doesn`t count. And that is impossible without data statements...

Your signature has been erased by a mod - Please reduce it to 600x120 maximum size
Pixelator
18
Years of Service
User Offline
Joined: 8th Jul 2007
Location: here
Posted: 19th Jul 2008 20:57
think of all the data statements it would take to make explorer!!!!

Latch
19
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 19th Jul 2008 21:51
Quote: "I`m a little confused now... Does Latch`s entry count?"

It's not a real entry!

@Phaelax
Looks good. I like the dragability.

@Nano
Another quality entry!

@BN2
Very nice... and I thought 2 weeks was still not long enough for this challenge...

There are some pretty good entries! Looks like this competition is heating up! Let's hope there are some more. I'll bet a lot of people have created a file browser in DB at one time or another.

Enjoy your day.
Phaelax
DBPro Master
23
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 19th Jul 2008 22:12
@Nano,
Your text gets a little chopped off on each line (see image).

Since ppl think mine is too small, I'll just have to add a resize feature.


Irojo
18
Years of Service
User Offline
Joined: 21st May 2008
Location: Eating toast.
Posted: 19th Jul 2008 22:31
On topic to the thread, off topic to the challenge...


If we already have a program that fits within the challenge, are we allowed to enter it?

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: 19th Jul 2008 22:33
Quote: "It's not a real entry! "


I also thought that at the start!

@Nano

I was just going to say what Phaelax said...

Your signature has been erased by a mod - Please reduce it to 600x120 maximum size
Latch
19
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 20th Jul 2008 02:38 Edited at: 20th Jul 2008 02:41
@Nano
For DBC 1.20 to be able to display text properly add a character set after any set text font commands:



for english add a ,1



@Irojo
Quote: "If we already have a program that fits within the challenge, are we allowed to enter it?"


Sure, why not? As long as you're not stealing someone elses work and calling it your own without changes, references and credits.

Enjoy your day.
NanoGamez guy
19
Years of Service
User Offline
Joined: 13th Jan 2007
Location: Closer than you think...
Posted: 20th Jul 2008 12:36
Thanks Latch, fixed the entry.


Did you know - 12% of Americans believe Joan of Arc was Noah's wife.
Irojo
18
Years of Service
User Offline
Joined: 21st May 2008
Location: Eating toast.
Posted: 20th Jul 2008 17:58
Ok thanks Latch. Just wondering.

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: 20th Jul 2008 19:55
I tested the checklist for files on a USB drive and my function created a new array and populated it with over 1300 entries instantly. So I don't see any limit on checklist quantity.


BN2 Productions
22
Years of Service
User Offline
Joined: 22nd Jan 2004
Location:
Posted: 20th Jul 2008 23:14 Edited at: 21st Jul 2008 02:39
@Nano

Great looking, but every time I try to go to another file/location (clicking on the parent button or clicking on the folders themselves) I get a path does not exist error.

Just fyi, my OS is Vista home.

@Phaelax
Looks good, but did catch a small bug (not a really big deal, but just so you know about it). When you drag the box to the edge of the screen, parts of it disappear.

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: 22nd Jul 2008 03:30 Edited at: 22nd Jul 2008 03:31
DBP will not draw a box who's coordinates are off screen. The only fix is to limit the movement of the box to the confines of the screen size.

I was going to add GIF image support. I got as far as reading the header information then figured I don't really have time for that right now. Plus, without being able to use memblocks, it would be incredibly slow redrawing the image.


NanoGamez guy
19
Years of Service
User Offline
Joined: 13th Jan 2007
Location: Closer than you think...
Posted: 22nd Jul 2008 10:22
@BN2
Strange, do you have any idea why that might be?


Did you know - 12% of Americans believe Joan of Arc was Noah's wife.
BN2 Productions
22
Years of Service
User Offline
Joined: 22nd Jan 2004
Location:
Posted: 22nd Jul 2008 12:23
@Nano

Honestly, no clue. Tried messing around, but got nowhere, except with a few tweeks the parent button took me to my computer and i could only access folders on the first level, so folders inside of folders still returned a path dne error.

A note though, my first change to make it work was simply change the path. Rather than go to where ever the function told it to, I simply changed the line to read:

This worked, but the displayed address was "../" Not sure if it helps at all, but I have no clue why it isn't working. Sorry.

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: 22nd Jul 2008 18:25 Edited at: 22nd Jul 2008 18:35
Thanks BN2, I'll see what I can do.
One posibility is that windows vista won't let you set the directory with a backslash at the end. e.g.


Anyway, here's my newest version of my entry:

[EDIT] My entry was too large for the post! Alot of it was clipped off. I have attached a text file with the code.

It now has:
-Icons
-Copy, cut and paste
-delete and rename
-new folder
-a clock with and hour hand that moves with the minute hand
-The date with the day of the week
-File size and date

NOTE: When deleting a folder, it only deletes it's contents, not the folder itself. Just some weird Darkbasic glitch.

DISCLAIMER: I will not be held resposible for any damage this program may cause to your computer. (i.e. You deleting all your files in a fit of crazy psychotic rampage). Although this program does have a block that will stop you from deleting you system files, damage can still be done.


Did you know - 12% of Americans believe Joan of Arc was Noah's wife.
Phaelax
DBPro Master
23
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 22nd Jul 2008 19:51
Looking good Nano, but it runs kinda slow. Moving the mouse cursor around is like moving a hand through water.


NanoGamez guy
19
Years of Service
User Offline
Joined: 13th Jan 2007
Location: Closer than you think...
Posted: 22nd Jul 2008 20:31
Thanks Phaelax

I attached an update that should hopefully work on Vista. There's also a mouse effect and an fps counter. I would like to know how fast it runs on other people's computers because phaelax said it ran slow.


Time to change my sig...
Phaelax
DBPro Master
23
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 23rd Jul 2008 00:24
I'll share my specs:

Win XP
C2D 2.66
4GB ram
256MB 8600GTS

I get about 8fps. I like that you provided an option to turn off the mouse effect.


Irojo
18
Years of Service
User Offline
Joined: 21st May 2008
Location: Eating toast.
Posted: 23rd Jul 2008 00:53
No idea where I can find my specs, but with mouse effect on, or off, I get 8 fps just like Phaelax. Windows XP Here too.

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: 23rd Jul 2008 01:06 Edited at: 23rd Jul 2008 01:23
Ok, here is the latest version of my code. Changes include:

Music can now be left playing while you explore. To stop it, press backspace.

The colors can be changed via the options button.

The my computer button works now.

Re-wrote several subroutines.

The date now includes the day of the week and the time is in 12 hour form, rather than 24.

There are a few other misc changes here and there, but these are the big ones.



@Nano

It seems to work, only getting 8 fps though. Also, the parent button seems to skip levels sometimes. Essentially, sometimes when I click it, it will do nothing then I click it again it goes up 2 levels. Couldn't access C: because of it. Other times, though, it seemed to work fine.

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: 23rd Jul 2008 08:06
BN2,
I tried to run your code, but I get a "severe exception" at line 33.


BN2 Productions
22
Years of Service
User Offline
Joined: 22nd Jan 2004
Location:
Posted: 23rd Jul 2008 08:11 Edited at: 23rd Jul 2008 08:47
@Phaelax,
What is your root drive? It is the only connection I have been able to make, since every computer I try it on, it works fine, but everyone else gets a severe exception. Also, what version of direct x do you have? Another thing I have noticed is that the first time it sometimes gives a severe exception but if you run it again, it works fine (go figure, but it happened on my xp pro machine).

[EDIT]
I noticed that some of the lines in the code got messed up when I posted it, so I have attached a text file with the code.

Ever notice how in Microsoft word, the word "microsoft" is auto corrected to be "Microsoft" but "macintosh" just gets the dumb red underline?
Latch
19
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 23rd Jul 2008 08:55
@BN2

I noticed that whenever I use the EDIT post button on these forums, any code I have in the post will lose all of the "\" characters. So any paths or directories you reference (like the keys in reg edit) might screw up the path. You can edit it a second time and put the slashes back. Phaelax's severe exception is probably caused by

when it should probably read


Enjoy your day.
Phaelax
DBPro Master
23
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 23rd Jul 2008 09:13
BN2, what is the point of this code?


'drive$' never changes, so why not just:


I've noticed a few spots where you have weird things like that. Oh, and I still get severe exceptions on the new code.

Quote: "What is your root drive?"

umm, C:


Phaelax
DBPro Master
23
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 23rd Jul 2008 13:14
@BN2,
finally got your program to work using a different registry function. Font size is too big for the areas designated for it. And you're previewing images by executing them? Can we do that for the challenges? I did get an error when trying to click on a jpg though. It was a windows error but the dialog was too small to read.


NanoGamez guy
19
Years of Service
User Offline
Joined: 13th Jan 2007
Location: Closer than you think...
Posted: 23rd Jul 2008 13:25
@BN2
looking good, but as phaelax said, the text is too large:


Also, some times when I click on a file that's not and exe, e.g. picture, wav file, it gives an error "Cannot shell execute file". It seems as if it has been directed to the exe label.

I have attached an update of my entry, it's using images to draw the screen instead of drawing it over and over with 2D commands. It runs at about 30fps with me where it used to run at 17fps.


Time to change my sig...
Phaelax
DBPro Master
23
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 23rd Jul 2008 13:35
It's faster, up to 15fps now.


BN2 Productions
22
Years of Service
User Offline
Joined: 22nd Jan 2004
Location:
Posted: 23rd Jul 2008 19:08
Ok, wow, thanks for all the feedback everyone. I will get on to the text problem later today.

Quote: "BN2, what is the point of this code?"

To be perfectly honest, I don't know. I got the function from a really old post on the forums (credited it in the code too). So, unfortunately I don't know what everything does. Can you post the new registry code, because I am getting sick of this function, it doesn't work very well.

@Nano
I have noticed recently that it does for some reason execute pictures instead of previewing them, I have yet to find a cause other than they are slipping through my function to identify their file type (the generic one is to treat it like an exe).

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: 23rd Jul 2008 21:21
OK, another update
You can now change the mode of the mouse effect.


Time to change my sig...
Irojo
18
Years of Service
User Offline
Joined: 21st May 2008
Location: Eating toast.
Posted: 23rd Jul 2008 23:57
Fabulous Nano. You have it all. You can view files... you have tons of awesome mouse effects. You have a great fps for everything going on. You have a visualizer for music...

Problem I just found:

The pause button and play and stop don't seem to work properly.

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 00:29 Edited at: 24th Jul 2008 00:31
Thanks, What's the problem?


Time to change my sig...
Irojo
18
Years of Service
User Offline
Joined: 21st May 2008
Location: Eating toast.
Posted: 24th Jul 2008 02:00
Sorry I should have explained better...

When you press Pause, it stops it, not pauses it.
Stop and Play work, it must have been after I pressed pause that I had the problem.

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: 24th Jul 2008 04:01
I finally gave up on the getreg$ function I had before and rewrote most of it (a couple sections still the same, but not much). I have updated my entry, hopefully the severe exception and the text have been fixed. Also included a right-click menu, that will let you cut, copy, paste, or delete a file.

New code attached!

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: 24th Jul 2008 04:22
Both have been fixed. Good entry, though the window is kind of small.

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: 24th Jul 2008 04:28
Awesome, thanks!

I am keeping the window the way it is because my goal in creating this program was to make something that could actually be used. Now, it would be better with external graphics and such, but that isn't really important. So, my thought was that it would be more efficient if the user could use the program while running other programs next to it without having to alt-tab switch in between them. I could change the size, but then I would have to rework EVERYTHING, and I don't really have time to guess and check all of that.

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: 24th Jul 2008 04:31
Ahhhhh good idea.


I pressed enter... and it crashed on me!? Bizarre...

Somehow my first 3D program (made today) now get's 'file is not a dark basic program!' The block will take it personally.

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: 24th Jul 2008 04:35
Quote: "I pressed enter... and it crashed on me!? Bizarre..."


Huh, weird, what were you doing at the time?

Quote: "Somehow my first 3D program (made today) now get's 'file is not a dark basic program!' The block will take it personally."

Did you save it as a .dba format? did it get renamed some how?

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: 24th Jul 2008 04:38 Edited at: 24th Jul 2008 04:42
It was labeled .dba, and I decided to create a new program as a test. I used the 'New Project' button, and it created the program. I named it, then I attempted to open it under the recent files list. It said 'file does not exist' so I went under a unsaved/unnamed file, and typed in some random word, pressed f3 to save it, and it saved it as '.DBA' when I used new project, it saved it as '.dba'

I'm using 1.12 enhanced. I can't update it, because I was stupid and bought it from a store.

I'll try and mimic the error again.



AHA! I remember now!
I went under options, changed the colors a bit, and pressed [enter]. Then DBC crashed the usual way. (the screen went white and then I did [control+shift+esc] and used task manager to close it :/)

I tried and cannot mimic the error. One of those random ones I suppose, not because of the coding.

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: 24th Jul 2008 04:54 Edited at: 24th Jul 2008 04:57
@Irojo
Ok, the first part of your post belongs on its own thread, but I will suggest something. On vista, the normal dbc project path isn't where the games get saved, even though DBC says that it is. Try doing a search for your file and seeing where it got saved. Its worth a shot.

Re: my program
So you were unable to recreate the crash?

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: 24th Jul 2008 05:38
Quote: "Can you post the new registry code, because I am getting sick of this function, it doesn't work very well."


Here's my registry code:
http://forum.thegamecreators.com/?m=forum_view&t=133932&b=6


Irojo
18
Years of Service
User Offline
Joined: 21st May 2008
Location: Eating toast.
Posted: 24th Jul 2008 05:56
I tried... It seems to have not only saved it incorrectly, but it says the file is 1 KB... Thanks for the help BN2.


I could not mimic the crash.

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: 24th Jul 2008 08:44
Latest code release. You can move the window around, resize it, preview images and sound files. When resizing the window, a selected image's preview will adjust to match the available space. You can scroll using either the scroll bar or mouse wheel.




TheComet
18
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 24th Jul 2008 15:09
This is the 2000th post in this thread!

I have downloaded the entries from:

BN2 Productions
Phaelax
NanoGamez Guy

And they are all coming on beautifully! I hope you will get to adding some special effects! The Deadline is coming up in 4 days!

Your signature has been erased by a mod - Please reduce it to 600x120 maximum size
NanoGamez guy
19
Years of Service
User Offline
Joined: 13th Jan 2007
Location: Closer than you think...
Posted: 24th Jul 2008 15:44 Edited at: 24th Jul 2008 16:12
@Irojo
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?

Quote: "I'm using 1.12 enhanced. I can't update it, because I was stupid and bought it from a store."

All you have to do is to send them an email with a picture of you holding the darkbasic case and CD, then they'll send you 1.20!

@BN2
Your entry's coming on nicely, you've sorted out the text problem and all the buttons work. But I did get a few problems with loading files. When I loaded a file that you used another program to open it with, e.g. word (is that allowed?), when I closed that program, it opened it up again! It did this continuously until I closed your file viewer.

@Phaelax
Lovely entry, everything worked smoothly and the interface was great. However, I did experience a problem with the slider. When there was only one page to view, i.e. less files than the space for them, you could still move the slider so that you moved above the total number of files (see pic). Perhaps you need the resize the slider based on the number of pages.




Time to change my sig...

Login to post a reply

Server time is: 2026-06-08 04:27:11
Your offset time is: 2026-06-08 04:27:11