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
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 11th Jan 2007 22:04 Edited at: 5th Dec 2008 20:13
The DB Classic Challenge Thread



[Edit: 10 Dec 08 - DBCC website is fully up to date. Challenges set from October 12, 2007 to current now include details about the challenge.

http://zimnox.com/dbcc/?page=challenges


[Edit: 10 June 07 - New Rule 12 Added]


Here are the rules for the DBC challenges. It's pointless re-inventing the wheel, so I've borrowed heavily from the DBPro Challenge rules and modified them for DBC - I hope they don't mind. (Obviously, all credit to Ric and those involved in originally creating them).

Please read all of them before starting your entry.

1. Anybody may enter any challenge, as many times as they like, so long as all code will run in DB Classic with NO alterations. You can still enter the challenge - even if you use DBPro as long as you follow this rule.

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.

3. All challenge entries are to be written in the standard un-enhanced version of DBC. You can actually use any version of DBC, but for the benefit of those who do not have the Enhancement Pack, you may NOT use any of the additional commands if you have them.*

4. The person who wins the current challenge becomes the next challenge setter.

5. The challenge setter is the judge for the current challenge, and must select a winner and a runner up.

6. The challenge setter may enter, but cannot judge him/herself the winner.

7. The challenge setter will set the time limit according to difficulty. The challenge setter may extend the deadline by 24 hours if there is a very good reason, but extensions cannot be made during the final 24 hours of the challenge.

8. If nobody enters within the time limit, the challenge setter must set a new challenge.

9. 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.

10. You may use code from any other entries within the challenges thread for your current entry, so long as you improve upon it in some way and give credit.

11a. Deadlines are always midnight GMT on the day specified. If GMT is not mentioned it should be assumed. This does not disadvantage entries from other time zones in any way as they still have the same number of hours to complete the challenge as everyone else, as they start earlier (local time).

11b. At the end of each challenge, the challenge setter should post and declare the current challenge over within 6 hours of the declared deadline. Entries can be submitted before this 'closing' post without penalty.

11c. If the challenge setter does not close the challenge for any reason, it automatically closes 6 hours after the deadline - after which no more entries can be accepted.

12. Changing a challenge. If no-one enters a challenge - for example if it is deemed too difficult - anyone can post and suggest that the challenge be changed (or modified), along with their reasons for doing so. If no-one has actually started work on the challenge and the majority agree, then the challenge setter can simply alter it or set another one and announce the new deadline.

In the case of a challenge being completely abandoned rather than modified, anyone who has already started work on the challenge and has done more work on it than they would like to abandon, they can lodge an objection.


* It is possible to ignore this rule (3) if the challenge setter has enough support from the contestants to use the enhanced commands and the use of such commands is clearly stated in the challenge description. For example, a very worthwhile challenge may be set using memblocks - something impossible to do if you can't use the enhanced commands.


OK, so that out of the way, on to the very first ever DBC programming challenge...

To be honest, this challenge was also used in the DBPro challenge thread and I had an entry myself - though I didn't win it!

But I enjoyed writing it and it's such an easy challenge, I'm sure everyone will be able to enter - whatever experience level you are currently at. So the challenge is:


**********************************************************
**********************************************************
NEW CHALLENGE
**********************************************************
**********************************************************


The DBC Clock Challenge...

Your task is quite simply to write a program which displays the current time in an unusual way. That's it! Exactly how you do it is all down to your imagination and ingenuity. It can be in 2D or 3D and doesn't even have to look like a normal clock - as long as you can easily read the time using it.

The challenge will be judged on ingenuity and extra points earned for imaginitive entries.

I'll set the period for the challenge at one week - ending at midnight (GMT) on Thursday 18th of January 2007.

Please feel free to comment if you think this should be extended.

TDK_Man

Lucifer
18
Years of Service
User Offline
Joined: 26th Dec 2005
Location:
Posted: 12th Jan 2007 00:16
yay! i might enter this challenge but i dont know if i will be able to do something like this


i like pancakes..
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 12th Jan 2007 16:46 Edited at: 4th Feb 2007 18:16
Just as an example, here's the compiled exe of the entry I submitted for the DBPro challenge:

http://www.computechtenerife.com/clock.zip (4.4MB)

I couldn't post the source because it won't run in DBC and would require far too many modifications to make it do so.

I will be entering this challenge, but obviously I can't win it. It won't be using this idea though either...

TDK_Man

DrewG
18
Years of Service
User Offline
Joined: 25th Aug 2005
Location:
Posted: 12th Jan 2007 17:09
Hey I may enter as well. Keep us posted please.

please forgive me about my forum name.
Rigo
20
Years of Service
User Offline
Joined: 13th Jun 2003
Location: Hungary
Posted: 12th Jan 2007 17:15
Nice program, TDK!

FZoli.
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 12th Jan 2007 17:38
Quote: "Hey I may enter as well. Keep us posted please."


Better decide quickly - this challenge has already started!

(Deadline is in one week's time).

TDK_Man

Sven B
19
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 12th Jan 2007 18:15
*opens up "Mini IDE"*


It's the programmer's life:
Have a problem, solve the problem, and have a new problem to solve.
Sven B
19
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 13th Jan 2007 10:19
Here's the first entry of the first challenge of the first DBC challenge thread ever!!!



It's the programmer's life:
Have a problem, solve the problem, and have a new problem to solve.
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 14th Jan 2007 18:30
Nice... has a slight 'Christmassy' feel about it!

I do hope we are going to get some more entries. Well guys?

TDK_Man

Sven B
19
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 14th Jan 2007 20:54
Yea, I was expecting some more entries as well...

It's the programmer's life:
Have a problem, solve the problem, and have a new problem to solve.
Lukas W
20
Years of Service
User Offline
Joined: 5th Sep 2003
Location: Sweden
Posted: 15th Jan 2007 11:29
here is my Version 1.



i just can't figure out how to position the arms correctly!

i borrowed
from Sven B.
thanks mate, i was struggeling with the timer() command. hahaha i was way off course.


TDK,
if somebody attemt to fix my problem and he/she manages to do so, would my entry still qualify?

TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 15th Jan 2007 13:54 Edited at: 15th Jan 2007 13:55
Quote: "f somebody attemt to fix my problem and he/she manages to do so, would my entry still qualify?"


See rule 10 in the first post.

TDK_Man

Sven B
19
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 15th Jan 2007 19:52
Here you go Lukas W:



Though I had to do some tweaking to get the angles right...

It's the programmer's life:
Have a problem, solve the problem, and have a new problem to solve.
Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 17th Jan 2007 23:54
Any chance we can extend the deadline until Sunday? I haven't had time during the week to work on anything. I did have something I put together last week - but it's not very "clockish" though it does display the time. I just won't have any free time until this weekend.

Enjoy your day.
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 18th Jan 2007 14:36
Quote: "Any chance we can extend the deadline"


Yes - I think that's a good idea too.

The DBC forum doesn't get a lot of traffic, so those that said they would take part in the challenges might not have seen that this one has started.

So, we'll extend this one for another week so the deadline is now midnight (GMT) on Thursday 25th of January 2007.

So everyone please, if you said you were interested in taking part in the challenges earlier in the thread, please do so or the post will just die!

This first challenge is a really easy one so everyone can take part. All you have to do is write a program to display the current time on screen.

It doesn't matter how basic it is, though we are looking for originality in the winning entry. It also doesn't have to be anywhere near the complexity of the exe I posted above - that was just one example of how to write a clock that doesn't look like a clock!

Just write a program to your own abilities. You'll soon find out that in challenge threads, no-one is interested in pointing out how 'noobish' an entry is, but instead will show you how to make it better.

And remember, if you are new to programming and have no idea how to start a challenge, feel free to ask and someone will show you!

TDK_Man

TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 18th Jan 2007 15:35
How To Start

As a continuation of my last post, if you are a new programmer and aren't sure where to start with the challenge, here's a snippet which you can build on:



The DecodeTime procedure simply gets the current time and places the hour, minute and seconds into the numeric values Hour, Mins and Secs. You can then use these variables in your program to do whatever you want.

The code in the main Do..Loop merely displays these values, so you can remove these lines - as long as you leave the Gosub DecodeTime line in.

TDK_Man

TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 21st Jan 2007 21:28 Edited at: 23rd Jan 2007 01:33
This thread is so busy I'm in danger of being rapped on the knuckles for making multiple posts!

Anyway, here's my entry for the challenge:



As already pointed out, I set this challenge so I can't win it.

So, if I can make the effort to enter knowing I can't win, those of you who said they would enter could at least have a go right?

TDK_Man

Richard Davey
Retired Moderator
21
Years of Service
User Offline
Joined: 30th Apr 2002
Location: On the Jupiter Probe
Posted: 22nd Jan 2007 13:21
I nearly have my entry finished, hold in there!!

Heavy on the Magick
Lucifer
18
Years of Service
User Offline
Joined: 26th Dec 2005
Location:
Posted: 22nd Jan 2007 20:51
Quote: "3. All challenge entries are to be written in the standard un-enhanced version of DBC. You can actually use any version of DBC, but for the benefit of those who do not have the Enhancement Pack, you may NOT use any of the additional commands if you have them.*"


cant you remove this rule since the enhancement pack is free now? and tdk, when did you become a mod? that's cool..


i like pancakes..
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 22nd Jan 2007 21:37
Quote: "cant you remove this rule since the enhancement pack is free now?"


It's not technically free. You can only download it if you are a registered purchaser of DBC.

But, if everyone agrees beforehand, this rule can be ignored (notice the little * at the end of the rule). But yes, the plan was to scrap it at some time anyway.

Quote: "when did you become a mod?"


The first time for DB, about five years ago. On this board, last week.

TDK_Man

Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 22nd Jan 2007 22:43
Quote: "so I've borrowed heavily from the DBPro Challenge rules and modified them for DBC - I hope they don't mind."

I don't think we'll mind.

So who's judging this one since you're entering this challenge that you've set?

Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 23rd Jan 2007 00:26
Entry 1

I decided to go digital for my entry(ies):



Enjoy your day.
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 23rd Jan 2007 00:27
I don't know how you people can tolerate using DBC. I keep getting errors about labels not existing for my subroutines, yet DBP has no trouble finding them. No UDT or globals, grrr.

Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 23rd Jan 2007 00:34
entry 2

variation of entry 1



Enjoy your day.
Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 23rd Jan 2007 00:51
Entry 3



Enjoy your day.
Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 23rd Jan 2007 01:18
Entry 4

I wrote this without planning it out (the code shows it ) - I had a picture in my mind of what I wanted to happen - that picture never really materialized, but I actually got a chuckle at how it was progressing so I decided to stop working on it and leave it like it is.



Enjoy your day.
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 23rd Jan 2007 01:21
Rather than just turn off the pixels to the digits we don't need to display, why not just 'drop' them?



TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 23rd Jan 2007 01:29
Quote: "So who's judging this one since you're entering this challenge that you've set?"


I will be judging it just to get the ball rolling, but as I said in an earlier post, my entry won't be included. I just entered for fun.

TDK_Man

Lucifer
18
Years of Service
User Offline
Joined: 26th Dec 2005
Location:
Posted: 24th Jan 2007 01:35
Phaelax, holy cow, that clock is nice!


i like pancakes..
NanoGamez guy
17
Years of Service
User Offline
Joined: 13th Jan 2007
Location: Closer than you think...
Posted: 24th Jan 2007 19:51
I'm not entering but I've got an idea for someone to do, which is 'a melted but working clock' I hope somebody uses this idea because I'd really like to see it.

living is my first priority
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 25th Jan 2007 14:40
Just a reminder that the challenge ends tonight at midnight GMT.

At the time of posting, that's just under 10 hours to go...

TDK_Man

TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 26th Jan 2007 01:36
OK - time is up! No more entries.

I'll be taking a look at the entries shortly and will announce the winner and runner-up tomorrow.

TDK_Man

Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 26th Jan 2007 01:50
my clock says i got 4 more hours! oh well, i had nothing else anyway.

TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 26th Jan 2007 19:19
Sorry - I made the 'time up' post at 12:30am GMT - 30 minutes after the deadline.

You are working to GMT right?

TDK_Man

PS: Results shortly...

TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 26th Jan 2007 20:56
OK - the reults...

I've basically marked according to the following criteria:

1. Imagination. Does it display the current time in an 'unusual way'?

2. Does it display the correct time?

3. Is it readable? How useful is a clock when you can't tell what time it is?

If more than one entry scores the same, as a tie-breaker I decided to judge the most visually pleasing as the winner.


Entries:

Sven - Spheres Clock.
Accurate, but conventional clock face. Very easy to read. Only loses a couple of points for lack of originality.

Lukas W - 3D clock.
A clock using a standard clock face but in 3D. Nice attempt, but unfortunately it didn't actually display the time, though Sven did fix it. Like Sven's entry, only loses a couple of points for being a standard clock face.

Latch - 1. Bouncing Cubes Clock.
Imaginitive and unusual idea. Accurate but not easy to read.

Latch - 2. Rotating Plains In Transparent Cubes Clock.
Also Imaginitive, unusual and accurate but a little harder to read - especially when the plains are at certain angles.

Latch - 3. Matrix Clock.
Very imaginitive and unusual idea - one which I would never have thought of. Accurate and easy to read too. With further work this could become a really nice screensaver.

Latch - 4. Robot Clock.
Not really a clock so difficult to mark. But it's unusual and tells you the time.

Phaleax - Drop Clock.

Digital Display made from blocks that jump into position from the bottom of the screen then drop down when not required. Easily read, accurate and novel idea, technically executed.

Conclusion:

Overall, the challenge was centred around making a clock as 'unusual' as possible so that had priority. The one I was most impressed with and scored highest therefore was:



And a very close runner up was:



Congratulations to both of you and the winner must set the next challenge within the next 24 hours.

TDK_Man

Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 26th Jan 2007 23:15 Edited at: 28th Jan 2007 09:01
Thanks TDK_Man,

It's too bad only 4 people participated in the last challenge. I'm not sure of an idea for a challenge because I don't know if people will participate if they think it's too hard or too easy...

Even so:

[EDIT - new challenge ]

Draw with mouse on 2d screen

Make a program that uses the mouse to draw on a 2d screen. If the mouse is drawing a continuous stroke, there can be no breaks in the stroke no matter how fast the mouse is moved across the screen.

There should be the ability to change the pen colors and clear the screen with keyboard or additional mouse input.

Scores will be based on functionality, ease of use, and extra points for any kind of bells and whistles beyond the basic challenge parameters. For example, if you want to add something like clicking the right mouse button draws a circle, feel free to do so.

Since I changed the challenge because my original choice was a bit complicated, I'll extend the deadline to February 4th 2007 midnight GMT.


[OLD - challenge, no longer in effect]

DBC FLAME EFFECT CHALLENGE

The challenge will be to create a fire or flame effect in DBC. You can use 2d or 3d and the result can be anything from a flicker to a roaring blaze to a flame thrower or anything you can imagine.

Scoring will be based on scales from 1 to 10 in:

Coolness : how does it look?
subcat. to coolness
color
presentation
animation

Ingenuity

The total of the 3 catagories under Coolness will be totaled and that will be the coolness score. Coolness and inginuity will be added to provide the final score.

I'll set the deadline for 1 week from now at midnight GMT

Friday, February 2, 2007

Enjoy your day.
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 27th Jan 2007 02:47
grrrrrr, I hate DBC! It's so primitive.

Without memblocks or any way to access pixel data directly in memory, this effect is just unbearably slow. We're talking about 0.4fps.

For those who don't want to wait forever to see how the effect looks, here's a link to my DBP version with a screenshot from my java version.

http://forum.thegamecreators.com/?m=forum_view&t=60719&b=6



TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 27th Jan 2007 15:15
I'm OK with the challenge, but I do think it's a little on the difficult side for any newcomers who were thinking of joining in. This might scare them off before they've participated.

But if you want to stick with it, I'm OK...

TDK_Man

Lucifer
18
Years of Service
User Offline
Joined: 26th Dec 2005
Location:
Posted: 27th Jan 2007 15:55
Quote: "but I do think it's a little on the difficult side for any newcomers who were thinking of joining in. This might scare them off before they've participated."


it does scare me but i think i have an idea on how to do something like this...


i like pancakes..
Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 27th Jan 2007 20:08
Ok, how about this:

Make a program that uses the mouse to draw on a 2d screen. If the mouse is drawing a continuous stroke, there can be no breaks in the stroke no matter how fast the mouse is moved across the screen.

There should be the ability to change the pen colors and clear the screen with keyboard or additional mouse input.

Does this sound a little more reasonable as a DBC challenge?

Enjoy your day.
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 28th Jan 2007 03:57 Edited at: 29th Jan 2007 02:05
Here's my paint so far. Can't seem to figure out why my line draws dots instead, it should be working.


Edited code to fix dot bug. My draw flag kept getting reset every loop. Haven't tested (on another machine) but it should work now.



Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 28th Jan 2007 09:05
@Phaelax:

I like those sliders! That's well implemented with such small code.

Enjoy your day.
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 28th Jan 2007 10:32
You should check out my paint program I made for the DBP challenge thread, it supports layers! We got a bunch of good entries that time, worth checking out if you have DBP.
http://www.dbp-site.com/challenges/paint-program

NanoGamez guy
17
Years of Service
User Offline
Joined: 13th Jan 2007
Location: Closer than you think...
Posted: 28th Jan 2007 11:55
This is my paint. All it is is a drawing program but it can draw without dots:



I can see you...
NanoGamez guy
17
Years of Service
User Offline
Joined: 13th Jan 2007
Location: Closer than you think...
Posted: 28th Jan 2007 15:01
Quote: "but it can draw without dots"


Sorry, I meant draw without gaps like the challange said.

I can see you...
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 28th Jan 2007 17:20
Sure does.

We can do the flame one a little later when there's a few more people interested in the thread. For now we need to keep it fairly simple to generate interest in the thread with newcomers.

TDK_Man

Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 28th Jan 2007 21:05
@NanoGamez guy:

Nice! Easy and right to the point. Good Work.

Enjoy your day.
Lucifer
18
Years of Service
User Offline
Joined: 26th Dec 2005
Location:
Posted: 28th Jan 2007 22:15 Edited at: 28th Jan 2007 23:15
Here is my paint program, it draws dots, not a line



i think you have to compile this paint program to an exe if you want to save the image. i really really am proud because i didnt steal a thing


i like pancakes..
NanoGamez guy
17
Years of Service
User Offline
Joined: 13th Jan 2007
Location: Closer than you think...
Posted: 29th Jan 2007 19:29
I've made another one with a better colour chooser. It looks alot better, here it is:



I can see you...
Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 30th Jan 2007 17:54
@Lucifer:
Not bad! Very concise.

@All
Looks like you guys are knocking out code for this challenge pretty quick! That's great! I hope some others join in too.


I edited the original challenge message but I'll post it here in case anyone missed the change:

Draw with mouse on 2d screen

Make a program that uses the mouse to draw on a 2d screen. If the mouse is drawing a continuous stroke, there can be no breaks in the stroke no matter how fast the mouse is moved across the screen.

There should be the ability to change the pen colors and clear the screen with keyboard or additional mouse input.

Scores will be based on functionality, ease of use, and extra points for any kind of bells and whistles beyond the basic challenge parameters. For example, if you want to add something like clicking the right mouse button draws a circle, feel free to do so.

Since I changed the challenge because my original choice was a bit complicated, I'll extend the deadline to February 4th 2007 midnight GMT.

Enjoy your day.

Login to post a reply

Server time is: 2024-04-19 12:22:59
Your offset time is: 2024-04-19 12:22:59