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
Binary Coder
19
Years of Service
User Offline
Joined: 26th Feb 2007
Location: Queensland, Australia
Posted: 7th Oct 2007 09:08 Edited at: 7th Oct 2007 09:08
Yeah... I'm way over gosubbing.

Thanks again Latch, I understand what you mean, and its much easier.
Did it set off for you though? It hasn't been doing that for me lately. Quite odd, maybe im seting it wrong?

Latch
19
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 7th Oct 2007 15:43
Quote: "Did it set off for you though? It hasn't been doing that for me lately"


It didn't. Since you were comparing time$ to alarmtime$, I wanted to look at them both to see what their value was. I put this line in your loop



That halts the program and prints out both variables on the CLI. I put the ";"s in there so I could see if there were any leading or trailing spaces. If the ; was next to the values without a space in between, then there weren't any spaces. Turns out, however, for some reason, there was always a leading space in alarmtime$. I don't know why. So, when the two variables get compared, they will never match.

To correct this, after:



I added the line:


Which skips the first character in alarmtime$.

Enjoy your day.
demons breath
22
Years of Service
User Offline
Joined: 4th Oct 2003
Location: Surrey, UK
Posted: 8th Oct 2007 01:00
is anyone else entering? after all the fuss about the challenge I originally set, and then as soon as I changed it Binary Coder's the only one who shows any real interest... disgraceful

http://jamesmason01.googlepages.com/index.htm
Pixelator
18
Years of Service
User Offline
Joined: 8th Jul 2007
Location: here
Posted: 8th Oct 2007 02:02
Honesstly, i have no idea how to make a clock with an alarm so that takes me out. Im just waiting to see who wins so i can try that challenge. sorry mate


Maryville Game Developers
Visit our website at http://www.freewebs.com/maryville-game-developers/index.htm
Libervurto
19
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 8th Oct 2007 07:22 Edited at: 8th Oct 2007 07:25
@demon
liked it
i wanna see more unique ways of displaying time.
ive been busy but ill try to get something finished in

@pixel
you can do this man!
GET TIME$() and away you go

@clever sods
I wanna make my cells glow like light in fog, how do i do that? can one do that?

In programming, nothing exists
TDK
Retired Moderator
23
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 8th Oct 2007 09:05
Libervurto
19
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 8th Oct 2007 18:14 Edited at: 8th Oct 2007 18:41
here's a strange way of displaying time.
I might do a multi-coloured version because it's quite hard to see the difference between reds.

Entry: Line Clock

My code sucks ass there's about a bajillion better ways to do it.

In programming, nothing exists
demons breath
22
Years of Service
User Offline
Joined: 4th Oct 2003
Location: Surrey, UK
Posted: 8th Oct 2007 19:08
@Obese: That looks awesome... what about the alarm part though?

http://jamesmason01.googlepages.com/index.htm
Libervurto
19
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 9th Oct 2007 00:06
Quote: "@Obese: That looks awesome... what about the alarm part though?"

well the thing about that is.... meh *runs away*

forgot about that bit I'll try and think of a cool way to do it

In programming, nothing exists
Binary Coder
19
Years of Service
User Offline
Joined: 26th Feb 2007
Location: Queensland, Australia
Posted: 9th Oct 2007 09:31
My Entry



@Obese87, Interesting way of telling time! Well done!

Phaelax
DBPro Master
23
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 9th Oct 2007 09:33
Didn't wee do a clock challenge already?


Binary Coder
19
Years of Service
User Offline
Joined: 26th Feb 2007
Location: Queensland, Australia
Posted: 9th Oct 2007 10:26
We did, this is the Alarm Clock challenge

demons breath
22
Years of Service
User Offline
Joined: 4th Oct 2003
Location: Surrey, UK
Posted: 9th Oct 2007 19:26
yeah... it's not much of a difference but at least it's a reasonably accessible challenge, unlike my idea which broke the rules.

also, just being a bit pedantic, we has one e. with two e's it either means to urinate, or small if you're scottish.

I wonder if scottish people ever say "I'm going for a wee wee"
That would make my day. I might have to befriend some scotsmen and trick them into saying it.

http://jamesmason01.googlepages.com/index.htm
demons breath
22
Years of Service
User Offline
Joined: 4th Oct 2003
Location: Surrey, UK
Posted: 9th Oct 2007 19:56 Edited at: 9th Oct 2007 21:31
@Binary Coder: looking good there. I would say out of all two entries, yours is in the lead. As it is the only actual alarm clock, this isn't a huge achievement, but it's still good work mate


EDIT: Sorry... didn't realise that I was the last person to post... didn't mean to double-post

http://jamesmason01.googlepages.com/index.htm
Sinani201
19
Years of Service
User Offline
Joined: 16th Apr 2007
Location: Aperture Science Enrichment Center
Posted: 10th Oct 2007 06:18
very nice entries!
I'll probably enter the next challenge, as I am busy on many other things. BTW, Binary Coder, nice entry. I like the *BEEP* when the alarm ends. Also, If you say Wee, it's like that Nintendo game console - the Wii. (I have one )

how do you make a sig?
Binary Coder
19
Years of Service
User Offline
Joined: 26th Feb 2007
Location: Queensland, Australia
Posted: 10th Oct 2007 11:08
Thanks guys, its just a wee little bit o' code! (Sorry, stupid humour)

Libervurto
19
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 10th Oct 2007 13:07
aww i thought you meant BEEP, are there any system noises in DB?
I remember using BEEP all the time in my rubbish QBASIC programs

In programming, nothing exists
demons breath
22
Years of Service
User Offline
Joined: 4th Oct 2003
Location: Surrey, UK
Posted: 11th Oct 2007 00:47
just over 25 hours to go... is anyone else entering?

also OBese how goes the improvement?

http://jamesmason01.googlepages.com/index.htm
Libervurto
19
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 11th Oct 2007 01:44
aaah haven't done anything to it
tried adding in my dline function and rounding the sin/cos values to smooth things out but it just made the refresh rate die.
(haha that sentence would make no sense to a normal person )

My ambition for this challenge was to make a crazy and mind-boggling entry... but then I realised, it's a clock! you have to be able to read it.
So I may touch up the line clock, which is kinda cool if a bit hard to read
But I'll be making a second entry that is VERY normal

In programming, nothing exists
demons breath
22
Years of Service
User Offline
Joined: 4th Oct 2003
Location: Surrey, UK
Posted: 11th Oct 2007 01:57 Edited at: 11th Oct 2007 02:46
just make sure it has an alarm this time

and yeah your last function looked really good, but I wouldn't like to tell the time by it... the numbers in the corner really helped...


ahh man doesn't look like I'm gonna get any sleep tonight... gotta finish this homework then write 2 more essays before then morning... I've already taken too much of proplus at work (about twice the maximum dose for 3 hours in half that time) just to keep me going and mroe since I got home, yet I'm practically dead on my feet. Well if I was standing, I would be...


EDIT: ahh ******* the essays, it's quarter to one and i've had a long day and I've gotta get up in less than 6 hours so nightnight everyone and good luck anyone who's entering the challenge tomorrow

http://jamesmason01.googlepages.com/index.htm
Binary Coder
19
Years of Service
User Offline
Joined: 26th Feb 2007
Location: Queensland, Australia
Posted: 11th Oct 2007 12:37
Hmmm... Is it over yet? Im keen to see who one!

Libervurto
19
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 11th Oct 2007 13:46
Entry: Analogue Clock
Not much of an alarm, but you can't really do an alarm without sound. Is it just me or do "%" look quite fancy when strung together


In programming, nothing exists
Libervurto
19
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 11th Oct 2007 22:11
No one else going to enter?
there's still time guys

Pixelator
18
Years of Service
User Offline
Joined: 8th Jul 2007
Location: here
Posted: 12th Oct 2007 02:21 Edited at: 12th Oct 2007 02:23
Im entering a Binary Clock:

(interface)




Maryville Game Developers
Visit our website at http://www.freewebs.com/maryville-game-developers/index.htm
TDK
Retired Moderator
23
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 12th Oct 2007 05:17
Here's my little entry...



TDK_Man

Phaelax
DBPro Master
23
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 12th Oct 2007 07:16
Quote: "I remember using BEEP all the time in my rubbish QBASIC programs "


Search the forum, I know there was an example doing it in DB awhile back.


Binary Coder
19
Years of Service
User Offline
Joined: 26th Feb 2007
Location: Queensland, Australia
Posted: 12th Oct 2007 10:01
Awsome! People entered! Great job guys!

Your signature has been erased by a mod because it's bigger than 600x120
demons breath
22
Years of Service
User Offline
Joined: 4th Oct 2003
Location: Surrey, UK
Posted: 12th Oct 2007 10:16 Edited at: 12th Oct 2007 10:28
EDIT: will have results within the half hour

http://jamesmason01.googlepages.com/index.htm
Binary Coder
19
Years of Service
User Offline
Joined: 26th Feb 2007
Location: Queensland, Australia
Posted: 12th Oct 2007 10:27
Meh, I think you should let it qualify.

Your signature has been erased by a mod because it's bigger than 600x120
demons breath
22
Years of Service
User Offline
Joined: 4th Oct 2003
Location: Surrey, UK
Posted: 12th Oct 2007 10:30
@BC: Sorry I didn't see your post before I edited. Yeah I will - I couldn't ignore it with an alarm function like that - I would live in shame the rest of my life if I had... judging looks like it'll be tough so far...

http://jamesmason01.googlepages.com/index.htm
Binary Coder
19
Years of Service
User Offline
Joined: 26th Feb 2007
Location: Queensland, Australia
Posted: 12th Oct 2007 11:28
You're right mate
Yeah, TDK's is great! LOL

Your signature has been erased by a mod because it's bigger than 600x120
Libervurto
19
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 12th Oct 2007 14:41
@TDK
Impressive
damn you

demons breath
22
Years of Service
User Offline
Joined: 4th Oct 2003
Location: Surrey, UK
Posted: 12th Oct 2007 14:58
Sorry about how long it took me to upload the results - couldn't use the internet for a few hours

It was a really close one...

but I'm gonna have to say...

Runners Up:






Winner:



http://jamesmason01.googlepages.com/index.htm
Libervurto
19
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 12th Oct 2007 15:08 Edited at: 12th Oct 2007 15:09
@Demon
Quote: "-Several hours after the deadline"

Who's fault is that?
jk I know you had connection problems

Well done TDK (again )
I have a feeling you put a lot of work into that one.

demons breath
22
Years of Service
User Offline
Joined: 4th Oct 2003
Location: Surrey, UK
Posted: 12th Oct 2007 16:09
@ Obese: I meant

Quote: "12th Oct 2007 03:17"


that was when he posted... I'm GMT therefore deadline was slightly earlier

but it would have been harsh to not include it when I saw how amazing the alarm was, and it looked like something which had taken a lot of time, not just a last minute quick entry or anything.

well done TDK though it was great...

http://jamesmason01.googlepages.com/index.htm
Link102
21
Years of Service
User Offline
Joined: 1st Dec 2004
Location: On your head, weeeeee!
Posted: 12th Oct 2007 22:27
Looks like I'm back just in time for the next challenge

Don't look at my sig!
Insert Name Here
19
Years of Service
User Offline
Joined: 20th Mar 2007
Location: Worcester, England
Posted: 13th Oct 2007 00:17
I haven't entered the challenges for a while now, here's my chance to shine!

Your signature has been erased because combined with your bug animation is was over than 600x120--- understand now?
TDK
Retired Moderator
23
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 13th Oct 2007 03:48 Edited at: 13th Oct 2007 06:25
Sorry about missing the deadline - I checked the last post in the thread and there wasn't any 'Time's up - no more entries' post from the judge before I posted. (If the judge doesn't call a halt to the challenge for any reason anyone can take advantage of the extra time).

OK, I here's the the challenge...

You have to write a program which uses the following function MakeDice():




Using The Function

The function takes three parameters:

NumDice (integer) - this is the number of dice objects you want to create.

StartObjNumber (integer) - this is the object number of the first dice. The rest of the dice will have consecutive object numbers.

DiceSize# (float) - this is the required size of the dice.

So, if you use

MakeDice(3,100,2.5)

you will get 3 dice, the first one being object number 100, the second 101 and the third 102. Each dice will be 2.5 3D units in size.


Objectives:

* You can write a full game or just a demo.
* You can use as many dice as you wish.

Challenge closes: 20th October at midnight GMT (Saturday Night).


Example Skeleton Program:

Below is an empty skeleton program you can use to start your own entry. It contains only the function, a setup procedure (the section you can alter is marked) and a very rough procedure which displays the dice (which you can remove).



TDK_Man

Insert Name Here
19
Years of Service
User Offline
Joined: 20th Mar 2007
Location: Worcester, England
Posted: 13th Oct 2007 12:25
Hmm, this does sound like a good one.


demons breath
22
Years of Service
User Offline
Joined: 4th Oct 2003
Location: Surrey, UK
Posted: 13th Oct 2007 14:19
hmm... I can't use select & case... I really should update my DarkBASIC...

And sorry about not calling an end to the challenge I didn't know about that rule...

This is going to be tricky, thinking of an original way of entering this I'll give it a go probably, but I've got a lot on at the moment I might not have time...

http://jamesmason01.googlepages.com/index.htm
TDK
Retired Moderator
23
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 13th Oct 2007 20:44
Quote: "I can't use select & case... I really should update my DarkBASIC"


Yes you really should!

But if you don't update, you don't have to use Select..Case.

The skeleton program does not have to be used - it's there if you want it. Just delete the procedure - or write your own entry and paste the MakeDice() function into it.

TDK_Man

Insert Name Here
19
Years of Service
User Offline
Joined: 20th Mar 2007
Location: Worcester, England
Posted: 13th Oct 2007 22:51
Hmm, I'm having diddiculty with his.
I've got the program to randomly genarate a 1 to 6, and then rotate the cubes that are the two dice that I'm using to show that number on top. Except that's where the problem lies: I can't seem to do it!
I can't work out by how much I have to rotate each dice in each way to get ti to show the right number. Could someone please show me the numbers needed?
Thanks.
By the ay, is it OK if I change the colours in the function?


demons breath
22
Years of Service
User Offline
Joined: 4th Oct 2003
Location: Surrey, UK
Posted: 13th Oct 2007 22:58
I know I don't need to use it I was just testing to see what your function looked like in action.

And INH look at his skeleton.

Particularly these lines:




I'm not sure if I'll enter this one actually... Kinda busy at the moment and I want to actually make something other than for the forum challenges, which is all I've done in a while...

http://jamesmason01.googlepages.com/index.htm
Insert Name Here
19
Years of Service
User Offline
Joined: 20th Mar 2007
Location: Worcester, England
Posted: 13th Oct 2007 23:12
Ooops Didn't see that.


Insert Name Here
19
Years of Service
User Offline
Joined: 20th Mar 2007
Location: Worcester, England
Posted: 13th Oct 2007 23:17
Hmm, tried that, and I still got problems. What went wrong with my code?



demons breath
22
Years of Service
User Offline
Joined: 4th Oct 2003
Location: Surrey, UK
Posted: 13th Oct 2007 23:34
hmmm... you're right... there's something amiss there

it looks like a really cool programme though.

http://jamesmason01.googlepages.com/index.htm
Insert Name Here
19
Years of Service
User Offline
Joined: 20th Mar 2007
Location: Worcester, England
Posted: 13th Oct 2007 23:38
Thanks
Is it possible that TDK's code is *gasp* incorrect?!


demons breath
22
Years of Service
User Offline
Joined: 4th Oct 2003
Location: Surrey, UK
Posted: 13th Oct 2007 23:41
TDK What have you done?

I've lost all faith in humanity.

http://jamesmason01.googlepages.com/index.htm
Insert Name Here
19
Years of Service
User Offline
Joined: 20th Mar 2007
Location: Worcester, England
Posted: 13th Oct 2007 23:47
The foundations of earth are crumbling...


Insert Name Here
19
Years of Service
User Offline
Joined: 20th Mar 2007
Location: Worcester, England
Posted: 13th Oct 2007 23:54 Edited at: 13th Oct 2007 23:54



Login to post a reply

Server time is: 2026-06-08 09:16:37
Your offset time is: 2026-06-08 09:16:37