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
Libervurto
19
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 11th Dec 2007 14:22 Edited at: 11th Dec 2007 14:48
I've stepped up my game a bit
I haven't added in any animation yet but here's the start of my new menu.

I'm thinking of using the menu function as a recursive function to go to sub-menus. Is that a good idea?

[edit]

A bit of tweaking and it works!

how would I make the options move and scale in real time rather than just snapping to their new positions?

TDK
Retired Moderator
23
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 11th Dec 2007 19:23
Quote: "I think you should make it into a function that displays a menu in a circle no matter how many options there are"


It already does that!

All you do is set the number of buttons on the line:

MenuOptions = 9: Rem Number of buttons on menu screen

You just need to alter the number of label strings just below it.

I've modified the section which creates the button textures to work with any number of buttons.



As for making it a function, it's not a good idea. Passing the button text labels would be a pain. In any case, the routine would be best in it's own procedure so you can gosub it from the main program loop.

TDK_Man

TDK
Retired Moderator
23
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 11th Dec 2007 20:19
A variation on the theme...



TDK_Man

demons breath
22
Years of Service
User Offline
Joined: 4th Oct 2003
Location: Surrey, UK
Posted: 11th Dec 2007 21:34
OK My really cool idea which I had yesterday was not so cool after all... I realised last night how annoying it would be if the button you were trying to select kept wobbling... So I decided to give that idea a miss.

Just trying a simple menu now, basically because I haven't tried to make one like this before, but I seem to have run into a wee problem: for some reason when the first option is expanded and you try and click the Settings option it thinks you're clicking the Exit button - every other one works right so I don't know what it is...

I may just be too tired, and maybe I should stop drinking during the day and my brain might work better, but hey, whatever...

Anyway here's my code so far, quite simple, but could one of you clever folks please look at it and see if you can spot my (blatantly amateur) mistake?



If anyone could help I would be eternally grateful. Or at least grateful for a while.

TDK
Retired Moderator
23
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 11th Dec 2007 21:58 Edited at: 11th Dec 2007 22:01
I think your whacky For..Next loop indentation was to blame. (Primarily where the For and the Next is on the same line and concatenated with colons - DBC occasionally doesn't like that!)

I indented the program properly and added a test print to check what the program thought the user was clicking on and it seems to be working fine:



TDK_Man

demons breath
22
Years of Service
User Offline
Joined: 4th Oct 2003
Location: Surrey, UK
Posted: 11th Dec 2007 22:20 Edited at: 11th Dec 2007 22:22
Thanks TDK - was it literally just the indentation? crazy...

I'll copy in your code now - it seems to work fine, I just need to fiddle about with a few more bits to get it to work as a menu.

It's a bit of a half-hearted effort this time, but to be honest I couldn't compete with yours anyway It's always a good learning experience, this challenge malarkey, anyway...


EDIT: Nope, it's still reading that through as exit, which is odd... I didn't change anything from your code, but it still doesn't seem to want to work...

TDK
Retired Moderator
23
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 11th Dec 2007 23:58 Edited at: 12th Dec 2007 00:02
Another menu idea, but this time 2D and sprite-driven:



demons breath:

I'm not sure what exactly the problem is then. Can you clarify exactly what you are doing to make it go wrong?

When I run it and click on Exit, it says at the top that I clicked on Exit.

If I click on Settings, it tells me that at the top and another three options appear.

If I then click on Exit again, it says exit.

Maybe I've not understood the problem properly...

[Edit] Forget that - I just found out what you mean. The problem only occurs if you click on Settings when the New menu is open.

TDK_Man

demons breath
22
Years of Service
User Offline
Joined: 4th Oct 2003
Location: Surrey, UK
Posted: 12th Dec 2007 19:49
Yeah that was my problem... I couldn't figure it out last night... I might have a go at it later when I've sobered up a bit... it's quite weird that it only affects that one circumstance though...

Tone3e
19
Years of Service
User Offline
Joined: 17th Feb 2007
Location: here
Posted: 14th Dec 2007 01:20 Edited at: 16th Dec 2007 20:23
This is great. So far we have quite a bit of entries. 2 from Obese,(mine is similar to your second one). 3 From TDK(I really like your second one and might use it in a future game with your permission?). 1 from demons breath(I really like the way you displayed submenus, but perhaps a way to know which option is being selected such as a highlight? A bit flashier?)
Its over...
Winner
[Code]TDK's second entry.

It is when I am weak, when I am truly strong.
TDK
Retired Moderator
23
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 17th Dec 2007 20:13
Crikey - that was quick! Thought there was a couple more days left for this one.

Let's think of a 'Christmassy' challenge for over the holiday period.

Be back shortly...

TDK_Man

TDK
Retired Moderator
23
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 18th Dec 2007 03:47 Edited at: 18th Dec 2007 05:58
OK the Christmas challenge is as follows...

You have until the 1st of January to create a 3D Christmas MMORPG which features a Santa, a race of snowmen with a desire for world domination, Mrs Santa, the elves and all of the reindeer - all animated of course.

It must be capable of supporting up to 500 simultaneous connections without lag and run on all machines from a PII 600 upwards at no less than 60 fps.

It must also have a fully working real-time battle system, be fully customizable via a fully animated options screen, have a scoreboard which includes all players accessible via the web and saves all settings to disk.

Or... you could ignore my little joke and try the real challenge!

Create a database program for your Christmas card friends list. You should be able to:

Add a name and address
Delete a name and address
Mark a name as you having received a card from them
Mark a name as you having sent a card to them
Load and Save the database to disk (if not automatic)
Navigate through the records in the database
Search for a name in the database

Expertise Gained:

* Use Of Strings
* Reading & Writing Files To Disk

This is quite an easy challenge for seasoned DB'ers, so I would expect anyone who knows what they are doing to provide a nice mouse driven GUI and add things like sorting and filtering.

Newcomers can of course stick to a totally text-based system (Press A to add a record sort of thing).

Closing date:

Tuesday 1st January 2008 at 8:00pm GMT (15:00pm East coast USA if I'm not mistaken).

TDK_Man

LBFN
19
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 18th Dec 2007 05:03
Quote: "Monday 31st December 2008 "


December 31st in 2008? So... we have over a year to get this done? Wow, talk about extending your deadlines!

Nice challenge TDK.

LB
TDK
Retired Moderator
23
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 18th Dec 2007 05:54
Darn it!

I had originally put 1st of January 2008 but then realised that I will be in the UK for Christmas with the family - and every year we go round to my sister's place and I couldn't really turn up with my laptop. So I changed it and forgot the year!

Now I've realised that we go to my sisters on New Years Eve, which is the 31st, so I'm going to change it back to what it was originally: 01/01/08.

There... sorted!

TDK_Man

NanoGamez guy
19
Years of Service
User Offline
Joined: 13th Jan 2007
Location: Closer than you think...
Posted: 18th Dec 2007 17:27
I might join in this one...


Nothing is impossible...
No really, it is.
Libervurto
19
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 19th Dec 2007 17:57 Edited at: 20th Dec 2007 16:04
I've made a start on the challenge but I need some help.
I've started working on a function to sort the data but I've gotten myself confused.
The idea is that the function takes a parameter to sort by and stores the order of the entities in the Sort array, I use this array to index the order the data should be displayed.
[edit]

It kind of works but puts Rick Vanner twice at the end
What have I done wrong?

Libervurto
19
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 20th Dec 2007 15:58 Edited at: 20th Dec 2007 16:47
I've worked on it a bit more ^ but I'm really stuck, I can't see why Vanner is entered twice and Zidane doesn't show up at all!

[edit]
I've fixed it with a little bug catching!
It turns out I was simply overwriting the lower order entries with the higher ones and so losing the data, instead of moving the lower entries first. DOH!



Here was the mistake
Quote: "
For shift = pos to DataMax-1
Sort(shift+1)=Sort(shift)
Next shift
"

Should have been
Quote: "
For shift = DataMax-1 to pos step -1
Sort(shift+1)=Sort(shift)
Next shift
"

I hope this helps others not to make the same mistake

Rookies & Veterans
Who thinks we should introduce the Rookies and Veterans idea for this challenge?
All members who have previously won a challenge compete in the Veterans tier, while those who haven't compete in the Rookie tier. The judge decides on a Veteran Champion and a Rookie Champion.
The winner of the Veteran tier would set the next challenge, if they were absent then the Rookie Champion would set the challenge.
The Veteran Champion would then judge the Veteran tier, and the Rookie Champion would judge the Rookie tier.
I think this will help to encourage more newbies to enter.

When this idea was mentioned before it was argued that a Rookie should be able to win the highest prize if their entry is the best, but I disagree; it doesn't matter who you are, everyone should have to pass through the Rookie system. It makes things less complicated that way and I think makes it more meaningful to be a Veteran Champion, because not only are you good enough to beat everyone else, but you've put in the hours as well.

Robert The Robot
19
Years of Service
User Offline
Joined: 8th Jan 2007
Location: Fireball XL5
Posted: 20th Dec 2007 20:18 Edited at: 20th Dec 2007 20:21
Quote: "Who thinks we should introduce the Rookies and Veterans idea for this challenge? "


I'm game! I've been meaning to join in on this thread practically ever since I got DB a year ago, and I think a Rookie version (with perhaps slightly easier challenges or longer times to do them in?) as well as the proper one would certainly provide a nice way in to this.

But anyway, here's the start of my entry for the Christmas card record keeper. It's a shame this challenge wasn't set a month ago, I could have used the winning entry to help sort my Christmas cards...

I'd be grateful if someone could take a look at it and post a couple of comments. It's the first program I've ever written that's purely text-based and I don't really know what I'm doing (DB seems to handle a little differently with text-only, mostly only with refreshing the screen, but I have had problems with <> operators...)

I'd also like to ask about frame rate. When running this from DB, on sync rate zero and a 1024x768x32 display mode I have a frame rate of about 60, but if I have Windows Media Player 11 running too - and playing songs - the frame rate doubles to around 120 (I've even had 140 before now!) Why's it doing this? Shouldn't the frame rate be falling when other programs are running as well???

One final point - how do you go about converting bitmap images so that DB creates them from the source code? I'd have liked to add a few snowflakes, but using Dot and Line plays havoc with the frame rate.



Oh, and the attached file isn't media - it's just some data I made up while I was testing this!

Best wishes for a very Merry Christmas and the Happiest of New Years!
Libervurto
19
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 20th Dec 2007 21:22 Edited at: 20th Dec 2007 21:32
haha, how did you do all that without using lines?!

Here's an old start to a GUI I made, it constantly draws lines using a function I made (which is even slower than the DB line command). When you scale the window to a large size the FPS drops badly, but I still don't notice any lagging. A low FPS probably wont matter with this type of program, there's not a lot going on on a database screen .

This is an example of how to kill your FPS, not good practice
Since your interface doesn't change you should draw it once in an off-screen bitmap and use it to wipe the screen, two birds with one stone
Or an even better method is to draw your buttons and grab them as images and use them as sprites, then make a cursor image and use the sprite commands to detect collisions. Yes, that is the normal person way to do it lol.

demons breath
22
Years of Service
User Offline
Joined: 4th Oct 2003
Location: Surrey, UK
Posted: 20th Dec 2007 22:01 Edited at: 20th Dec 2007 22:03
@Robert: you're not allowed to convert bitmap images for these challenges; I wrote something a while back which grabbed all the pixel colours with the Point command then output the code to recreate it pixel by pixel into a text file, but after all that hassle and tweaking it turned out that it's against the rules anyway haha

Also, I like the look of your program, but the FPS is 3 on my computer; I couldn't do anything either; when it finally let me into the main part the buttons didn't seem to do anything.

"A West Texas girl, just like me"
-Bush
Libervurto
19
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 20th Dec 2007 23:19
Quote: "@Robert: you're not allowed to convert bitmap images for these challenges; I wrote something a while back which grabbed all the pixel colours with the Point command then output the code to recreate it pixel by pixel into a text file, but after all that hassle and tweaking it turned out that it's against the rules anyway haha"

I'm sure there wouldn't be a problem with using data statements to draw a snowflake, I used data statements for the graphics in one of my entries (Jack & The Beanstalk), just don't be ridiculous and hard code 'Mona Lisa' into your entry

You don't need to use this method anyway, just draw your snowflake and grab it as an image

demons breath
22
Years of Service
User Offline
Joined: 4th Oct 2003
Location: Surrey, UK
Posted: 20th Dec 2007 23:57
I think I'm actually going to have a bash at this challenge properly. Mind you I thought that about the last one and I didn't manage to fit in the time for more than about 1/4 of a very buggy entry, but I've just broken up from college today so it might actually be do-able. I can't think of anything particularly inspired for this one though...

"A West Texas girl, just like me"
-Bush
Robert The Robot
19
Years of Service
User Offline
Joined: 8th Jan 2007
Location: Fireball XL5
Posted: 21st Dec 2007 20:18
@demons breath
Quote: "the FPS is 3 on my computer"

Are you sure you don't mean 30? 3 frames per second seems so small, I'd be staggered if I'd written something that was that bad...

Quote: "when it finally let me into the main part the buttons didn't seem to do anything."

That would be because I haven't coded them yet...

@Obese
Great example of yours, I see what you mean about the crippling frame rate! (I never managed to figure out why more than one or two line commands per loop were so detrimental...)

And thanks for your advice about the off-screen bitmap. Never would have thought of that! I've got it so that everything gets drawn to bitmap one, then copied to bitmap zero and every time I sync, I don't need to redraw the background!

Here it is...



This time, the middle button's working (you can delete all the records of people who haven't sent you any christmas cards), the other two will follow soon.

Oh, and how did I manage to create those byuttons without using Line commands? Well, there are some very nice keyboard buttons - "_" and "|". Set the right font (Arial narrow is the one I used, but I haven't checked any others) and just text them in the right place...

Best wishes for a very Merry Christmas and the Happiest of New Years!
demons breath
22
Years of Service
User Offline
Joined: 4th Oct 2003
Location: Surrey, UK
Posted: 21st Dec 2007 21:29 Edited at: 21st Dec 2007 22:38
Nope, it was actually 3. Kinda worryingly low for a text only program :p

Mine's having a few teething troubles, but I'm getting there. I still haven't included... well like anything. All you can do is pick from the two people I coded in to test and see their details.

Might as well stick it up for the moment though. Just going for the simple look, mostly because I can't manage anything else. Appearances aren't my strong suit.




EDIT: @Robert I just had a look at your newer version. I like it The frame rate's a lot faster. In fact, it's almost 100 times as fast - went from 3 FPS to 275 FPS. As soon as I clicked the Compact button, though, it went down to 40 FPS and stuck round there. I liked the compact idea though.

EDIT AGAIN: Updated the code a wee bit for the little binary thingy; OK it might not be the best way of doing it but I'd never tried it before so...

"A West Texas girl, just like me"
-Bush
jason p sage
18
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 21st Dec 2007 22:21
@Demons Breath
Quote: " but I've just broken up from college today "
Like Holiday break? Awesome! I'm off work - can't wait to do some GAME coding

demons breath
22
Years of Service
User Offline
Joined: 4th Oct 2003
Location: Surrey, UK
Posted: 21st Dec 2007 22:39
@Jason: Indeed. Unfortunately I have an exam in to do January for this year, and 5 from last year (almost 2/3 of last years exams) to resit in the same 2 week period, so I really should do some revision. Emphasis on should, not will

"A West Texas girl, just like me"
-Bush
Libervurto
19
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 22nd Dec 2007 00:24 Edited at: 22nd Dec 2007 00:58
@Robert
I've added some data to your program for those who don't want to save your program and download your data

The scrolling didn't seem to work properly.
The compacting data didn't seem to work either but that could be a problem with my data, is it in the right format?

This subroutine scares me


I didn't know that function names like Check And Set The Display Mode() worked but I still don't like the look of them, probably not best to have spaces in there if only for our sake.

OK so I'm moaning a lot but it's only because I care

jason p sage
18
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 22nd Dec 2007 00:57
@demons breath - Better Get Cracking - WOW - That's a awful way to begin the new year. Might as well get all that out of the way though.... I'd put School First - Get it overwith - get a jbo - then goof off with games after work

Good Luck Regardless.

@OBese - I love your Tut about formatting code etc... and it does apply to Dark Basic... But Dark Dark Basic just doesn't lend itself to "Clean" Structured code. Though you need to battle to get something close.

TGC knows this and they delivered BASIC - Beginner's All-purpose Symbolic Instruction Code http://en.wikipedia.org/wiki/BASIC_programming_language

And then they put together a plan and delivered DarkGDK in two flavors for developers wanting either RAW Power C++ - or "Canned" Power .Net (I use both a lot so I feel I speak from Experience hehehehe)

Both of these languages are superior to BASIC for many reasons - one of which - is they (perhaps by accident) tend to lend themselves to the ability to write structured code reliably.

Now for these Contests - there is a side effect that many just look to be amazed and learn - so its important in here to - but if you don't care but your code works - that's fine too

Libervurto
19
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 22nd Dec 2007 01:06
@JPS
I disagree: people help each other out a lot on here, if code is easy to read then it's easier to help.
I also like keeping my code tidy because it makes me look better than I really am

jason p sage
18
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 22nd Dec 2007 01:10
Are you referring to this?

Quote: "Now for these Contests - there is a side effect that many just look to be amazed and learn - so its important in here to - but if you don't care but your code works - that's fine too "


If you are - I am surprized you disagree with me. I'm saying its helpful to many people if you have clean code. It doesn't break the rules of the challenges if you write messy code as far as I know.

What part don't you agree with?

Libervurto
19
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 22nd Dec 2007 11:07
@JPS
It just sounded a bit like you were saying "Who cares what your code looks like, as long as it works." but now I read it again you weren't saying that.

Robert The Robot
19
Years of Service
User Offline
Joined: 8th Jan 2007
Location: Fireball XL5
Posted: 22nd Dec 2007 17:07
Quote: "@Robert I just had a look at your newer version. I like it The frame rate's a lot faster. In fact, it's almost 100 times as fast - went from 3 FPS to 275 FPS. As soon as I clicked the Compact button, though, it went down to 40 FPS and stuck round there."


One of the problems of my current version is that it doesn't update the screen FPS every second. When the screen is generated, the program finds the current screen fps and hard-draws that to screen. It only changes when you update the screen (by scrolling through the records). Still, even just 40fps sounds good to me! [phew].

Quote: "I liked the compact idea though"
.
Glad you did!

@Obese
Quote: "I've added some data to your program for those who don't want to save your program and download your data"


Thanks! (I never did get the hang of data staments.)
The data isn't quite in the right format, your next to last entry on a person should actually be a text description of the card you sent him. Mind you, that shouldn't have affected it at all. I'll take a closer look at that later...

Scrolling data - it's not the click and hold you get with windows apps. It's click once to go down one record, click again to move down another. I've got a few ideas to try out yet, though.


Quote: "I didn't know that function names like Check And Set The Display Mode() worked"

Actually, they do - I'm afraid I have a bit of a reputation for doing the wrong thing with DB...
http://forum.thegamecreators.com/?m=forum_view&t=117603&b=10

Best wishes for a very Merry Christmas and the Happiest of New Years!
Libervurto
19
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 22nd Dec 2007 18:37 Edited at: 26th Dec 2007 16:13
Here's a good method for scrolling buttons

It came from this thread

[edit]

Guess I'm the first one back from Christmas.
I've done some work on my sort function and it now sorts to multiple character accuracy
i.e. "ABCDE" precedes "ABCDF", whereas before the sort function would have given them the same priority.

One problem is that it doesn't seem to know what to do if the strings are of different lengths. Any advice on that?

Sinani201
19
Years of Service
User Offline
Joined: 16th Apr 2007
Location: Aperture Science Enrichment Center
Posted: 27th Dec 2007 01:06 Edited at: 27th Dec 2007 01:10
I was working on an entry, and then I thought my hard drive crashed, so I had to use a laptop that didn't have DB on it. Two days later, I turned on my computer to confirm if it really did crash, and it didn't. Therefore, I lost time on my entry, so I probably won't finish it. Although I'm always eager to see the next challenge!

@OBese87
Before you sort the letters alphabetically, sort them by length. Make an array for words of different length. Then, alphabetize each section of the array, put them all together, and then it works. Remember, shorter words always come before long ones. I'm sorry if it was a bit confusing. It you didn't understand it when reading it the first time, I can make a code snippet that explains what I'm trying to do.

Seriously, how do you make the little blue text come up below your message?
demons breath
22
Years of Service
User Offline
Joined: 4th Oct 2003
Location: Surrey, UK
Posted: 27th Dec 2007 13:57
Quote: "@OBese87
Before you sort the letters alphabetically, sort them by length. Make an array for words of different length. Then, alphabetize each section of the array, put them all together, and then it works. Remember, shorter words always come before long ones. I'm sorry if it was a bit confusing. It you didn't understand it when reading it the first time, I can make a code snippet that explains what I'm trying to do."


...Shorter words only come first if every letter in one is in t'other; find the length, yes, but then alphabetize and only compare the lengths if you get to the end of one word and it's identical up to that point to another one.

"A West Texas girl, just like me"
-Bush
Sinani201
19
Years of Service
User Offline
Joined: 16th Apr 2007
Location: Aperture Science Enrichment Center
Posted: 30th Dec 2007 19:21
I forgot about my winter vacation I was going on for 3 1/2 days! That adds to my "fake" hard drive crash delay! I'm leaving today, but the contest ends tomorrow! Although hopefully I'll have enough time to finish my entry! never gonna happen

Seriously, how do you make the little blue text come up below your message?
Robert The Robot
19
Years of Service
User Offline
Joined: 8th Jan 2007
Location: Fireball XL5
Posted: 31st Dec 2007 19:48 Edited at: 31st Dec 2007 20:45
@Sinani
Oh, what a shame

@Everyone else
Here's my entry! I was afraid I wouldn't get it finished, I've been buried under a pile of rather tasty mince pies for the last few days...
The attached data file is just an example, you don't really need it.

Edit: Whoops, just spotted a little flaw I forgot to correct. I forgot to close the data file after reading in the data, so the program couldn't write the data to the same file when the user hit escape to exit.
Anyway, here's the fixed version:



Happy New Year!!!

Best wishes for a very Merry Christmas and the Happiest of New Years!
Sinani201
19
Years of Service
User Offline
Joined: 16th Apr 2007
Location: Aperture Science Enrichment Center
Posted: 1st Jan 2008 21:50 Edited at: 1st Jan 2008 21:50
Shouldn't the challenge be over?
Anyways, now I have Windows Vista, so I have a feeling I won't have a hard drive crash for a while, therefore I won't be fooled by "Hard disk 0 not found," or "Hard disk 1 not found" on windows startup.

Seriously, how do you make the little blue text come up below your message?
TDK
Retired Moderator
23
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 1st Jan 2008 22:26
Yes - challenge over!

Any entries?

I'll check out what has been posted and be back later with the results.

TDK_Man

TDK
Retired Moderator
23
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 2nd Jan 2008 04:22
Well, no-one submitted an entry which did all the things listed in the challenge description, so no clear winner.

I had high hopes for Robert The Robot's final entry, but all I got was a blank screen. The illegal spaces in the function name didn't help, but weren't actually the cause of the problem.

However, he did so much work on the last entry I'm giving him first place for it anyway. So, the winner is:

Robert The Robot

I expected a few more entries to this one as it was so easy. I managed to come up with the following partially written example in just a couple of hours last night!



So, the lack of interest suggests that a DBC Programming Challenge thread is no longer useful and it's about time I stopped using DBC and spend a bit more time with DBPro...

TDK_Man

Latch
19
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 2nd Jan 2008 15:08 Edited at: 2nd Jan 2008 15:24
Quote: "I had high hopes for Robert The Robot's final entry, but all I got was a blank screen"

That's odd, I thought it worked great. I saved the example text file in the same directory as the main program like the help file suggests, and all the records loaded on startup. I was able to add additional records, and edit fields. The scrolling buttons worked, it sorted the data... I wonder what went wrong when you started the program.

Quote: "So, the lack of interest suggests that a DBC Programming Challenge thread is no longer useful and it's about time I stopped using DBC and spend a bit more time with DBPro"


I think there is still interest in the challenges. Though there haven't been many official entries, there is a lot of discussion and suggestions and code snippets people submit to help others out. I think the purpose of the DBC challenges is still being fulfilled (even if not on a large scale). Even though some don't submit code, they read everything that is going on.

Also, this is the holiday season... People are out of town, spending time with friends and family, panicking because aunt Mergatroid is coming in all the way from whereever.

There also had been a theme started with the last couple of challenges - pieces of an RPG or other kind of game: the character generator, the menu system...

Although I didn't submit an entry and anything I type in that regard reads as an excuse, I actually started trying to cram one together a few days ago. I only spent an hour or so on it - my goal being just to have a bare bones database and then worry about the bells and whistles later. But when it came to text input, I found I had to create a custom routine (because Input doesn't recognize any formatting commands) and I just didn't have the time or the brain power to proceed in between New Years festivities and social obligations. Anyway, it's after the fact but here's all I had put together in that fateful hour(if for nothing else, just to show that your efforts with the DBC challenges aren't wasted):



Enjoy your day.
Robert The Robot
19
Years of Service
User Offline
Joined: 8th Jan 2007
Location: Fireball XL5
Posted: 2nd Jan 2008 17:15
Quote: "I had high hopes for Robert The Robot's final entry, but all I got was a blank screen"


Sorry about that, TDK, but I've no idea why it wasn't working for you. If you were using DB V1.13 then perhaps it wouldn't work, as I'd used V1.20 but can't test anything on V1.13 anymore.

Quote: "So, the lack of interest suggests that a DBC Programming Challenge thread is no longer useful"

I wouldn't say that - I've been interested in this thread since it started, but it's taken me most of the year to develop my skills in DB to the point where I think I can actually do the challenge and do it well.

It's been fun, and as Latch says there has been a lot of discussion, code snippets, and I really think it would be worthwhile to try to keep this going,

So, is there to be another challenge, and am I to set it?

Best wishes for a very Merry Christmas and the Happiest of New Years!
TDK
Retired Moderator
23
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 2nd Jan 2008 18:10
Just to confirm that as usual I was following the 'no external files' rule strictly. 'Media' does not have to be graphics - any additional files (including text files) required to run a program become external media.

You should be able to run a challenge entry by simply copying the code from here, pasting it into DB and just running it - which is what I did. (I'm also using DBC V1.2 by the way)...

This seemed as though it wouldn't be a problem when I read "The attached data file is just an example, you don't really need it". Looks like you do!

When any entry for a database challenge is first run and a database file is not present, it should create a new empty one.

Quote: "So, is there to be another challenge, and am I to set it?"


Of course!

TDK_Man

Sinani201
19
Years of Service
User Offline
Joined: 16th Apr 2007
Location: Aperture Science Enrichment Center
Posted: 2nd Jan 2008 19:38 Edited at: 2nd Jan 2008 19:40
I got a blank screen too, on Robert's entry. Maybe it's my OS. I also got an error at line 56 concerning bitmaps not existing. I found it interesting, because there was no bitmap-related code even near line 56! (maybe it was 55, but what's the difference?)

Seriously, how do you make the little blue text come up below your message?
Robert The Robot
19
Years of Service
User Offline
Joined: 8th Jan 2007
Location: Fireball XL5
Posted: 3rd Jan 2008 21:24
@TDK
Quote: "This seemed as though it wouldn't be a problem when I read "The attached data file is just an example, you don't really need it". Looks like you do!"


Actually, the code at startup (after the logo) creates the necessary arrays and then checks if the file exists:



There's no else statment, and the program should get along fine without having the data file at all. If there is no file, there is no data to read in, so you just work with the blank data arrays and click the 'add data' button that's always on screen and start creating records. When you exit the program using the escape key from the main menu, it goes to the SavingArrayData subroutine, saves all the data to a file and then ends.

@Sinani
Quote: "I got a blank screen too, on Robert's entry. "

I just don't understand what's happened. Line 55 would actually be amongst the logo screen (DB compiles functions first, I think). It might be that this is the source of the problem - I use "Set gamma 1, 1, 1" which would be a black screen. If the program throws an error and drops you to the CLI, you won't actually be able to see it, so it will always be a black screen. Perhaps if you tried remming out the Logo code - I can't check this, as it works fine on my computer already, but it might set it working for you.

@Everyone
So on to my challenge...

Challenge: Underwater
Closing Date: Midnight GMT Thursday 31th January 2008
Make a 2D or 3D program set under the sea. The rest I leave to your imagination, but there'll be extra points for original ideas, realistic-ish environments, or any nifty tricks.

I hope this will make a good challenge, but if I'm asking too much then just say and I'll try and come up with something better (this is my first attempt, after all )

On our way 'ome, on our way 'ome!
Libervurto
19
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 3rd Jan 2008 23:52
@TDK
It was new year's eve
I haven't been around so I couldn't get mine finished
Don't leave us this thread is bound to be busy one moment and dead the next, we just have to keep putting out challenges until momentum builds up again.

Can we use the new material commands? They would look great for the underwater challenge. hmmm... we HAVE to use them in 1.2 don't we? I don't do 3D but I will for this challenge

@Robo Rob
nice challenge, how can you be asking too much when you've only specified that it has to be under water lol

Latch
19
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 4th Jan 2008 03:33
Since 1.2 has been taken down, not everybody may have it...

Enjoy your day.
Sinani201
19
Years of Service
User Offline
Joined: 16th Apr 2007
Location: Aperture Science Enrichment Center
Posted: 4th Jan 2008 03:41
It was taken down? Why?

Seriously, how do you make the little blue text come up below your message?
Robert The Robot
19
Years of Service
User Offline
Joined: 8th Jan 2007
Location: Fireball XL5
Posted: 4th Jan 2008 12:47
That question's already been asked - and answered. It seems that the EXE used to update V1.13 to V1.20 could also update the trial/demo version of DBC to the full version of V1.20. Not good...

On our way 'ome, on our way 'ome!
Pixelator
18
Years of Service
User Offline
Joined: 8th Jul 2007
Location: here
Posted: 4th Jan 2008 17:30
ill try this one...

Sinani201
19
Years of Service
User Offline
Joined: 16th Apr 2007
Location: Aperture Science Enrichment Center
Posted: 4th Jan 2008 19:22
I'll give a shot at this one... in the Second Dimension!!!! GO SECOND DIMENSION!

Seriously, how do you make the little blue text come up below your message?

Login to post a reply

Server time is: 2026-06-08 13:15:40
Your offset time is: 2026-06-08 13:15:40