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
LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 10th Jun 2007 15:49
@ TDK

I definitely think the basic rules ought to be modified to include procedures for handling situations like this.

I like the idea of collecting challenge ideas and would intend on participating.

So, would you (and everyone else) be interested in this challenge if it was just one golf hole? Or is there something else we could do instead? I want very much to present something that the community will be interested in and which will elicit participation. As I see it, one of the objectives is that we will learn something in the process.

Please let me know.

LB
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 10th Jun 2007 16:17
As I said before, I quite like this challenge.

From a beginners point of view, you haven't got to write the golf game or anything difficult for this one - just make a level in DB code with no external media.

However basic it is, in 3D it will teach you how to create and sculpt a matrix, texture it using the basic 2D DB commands and make it look as good as you can get it.

In 2D, it's the same, but without the matrix and camera.

I'm happy to go with the general consensus on this one...

TDK_Man

TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 10th Jun 2007 16:35
Added rule 12 to the very first post of the thread.

As usual, please read and let me know if you all agree...

TDK_Man

Zombie 20
17
Years of Service
User Offline
Joined: 26th Nov 2006
Location: Etters, PA
Posted: 10th Jun 2007 18:29
TDK-I agree with the new rules, everything's good.

LBFN-I'm going to try this golf course, it sounds really fun.

LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 10th Jun 2007 20:34
@ TDK
I like rule 12 (by the way, I'm sorry to be the cause of two new rules within a few days time). I would add something along the line of 'What do you do with objections?' Are objection(s) sufficient cause for maintaining an existing challenge? If so, who would judge this?

@ Zombie 20
Great! Thanks for your interest.

If Sinani201 is still interested, that would be four of us (I intend to make an entry). Assuming this, if at least one more person is interested (for a total of five), I would alter the challenge to be one golf hole.

Is anyone else interested and Sinani201 are you still in the challenge? I will make the change if so. I was hoping that some of the DB brainiacs would show us all how they manipulate a matrix. I have got to believe that there is a better way than what I am doing.

LB
NinJA999
18
Years of Service
User Offline
Joined: 11th Nov 2005
Location: NH
Posted: 10th Jun 2007 23:14
Well, I'll give it a try, but might not get much work in till Wed (since I have finals till then). I am just right now stumped as how to embed a "hole" into the matrix.

42
http://www.nictitatingrabbit.com
http://penchantpages.nictitatingrabbit.com
LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 10th Jun 2007 23:58
@ NinJA999
Glad to have you in the challenge too!

As to embedding a "hole", I take it you mean the cup on the green itself. What I did was create a really small cylinder, grab the ground height somewhere on the green (mine is elevated a little), add 0.1 to it and put it there. It would be interesting to texture the inside of the cylinder/cup to make it look like it has a bottom. If you meant something else, let me know.

Your finals are a lot more important. I wish you well.

LB
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 11th Jun 2007 00:44 Edited at: 11th Jun 2007 00:44
Quote: "Are objection(s) sufficient cause for maintaining an existing challenge?"


I would say so - yes.

The whole idea is that the winner has the 'priveledge' of setting the challenge of their choice. It might be on a subject that you want to do yourself but don't know how. Someone else writing the code for you could be regarded as your 'prize'.

Let's face it, the only real reason for abandoning a challenge is if absolutely no-one is going to submit an entry, so I don't think it's going to happen too often anyway. We're bound to get interesting challenges and not so interesting challenges where people enter in varying numbers. As long as just one person enters I think the challenge is valid.

I also think that 'objection' is possibly too strong a word too - but it will do. I know that if I had spent more than an hour on a challenge and it was abandoned, then I would 'object'.

By 'object' I really mean a quick post to say that I had started the challenge and didn't want to waste the substantial time I'd already spent on it.

If no-one else wanted to have a go then big deal - I would be guaranteed a win, get my name on the cup (thanks to Phaelax) and be able to set the next challenge.

TDK_Man

LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 11th Jun 2007 01:07
Okay, TDK. Based upon your comments, I would like to alter this challenge slightly:
create a single golf hole (instead of three)

All other criteria from the original challenge post will remain the same, including the deadline.

Good luck to all!

LB
Sinani201
17
Years of Service
User Offline
Joined: 16th Apr 2007
Location: Aperture Science Enrichment Center
Posted: 11th Jun 2007 03:04 Edited at: 11th Jun 2007 03:05
Can we still make three holes, though?

Did someone say 3D scanning on my desk, or was that just an AdBot?
What happens when when you mix coke, pop rocks, vinegar, and baking soda?
LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 11th Jun 2007 03:40
@ Sinani201 - glad to hear from you!
I see no reason why not. They will now be viewed as three individual entries.

LB
Sinani201
17
Years of Service
User Offline
Joined: 16th Apr 2007
Location: Aperture Science Enrichment Center
Posted: 11th Jun 2007 03:51 Edited at: 11th Jun 2007 04:32
OK then, I'll get started. *Rushes to open up DarkEDIT*
To tell the truth, I'm terrible at starting off in a 3D game. I'm better at programming in a 3D environment rather than "coding environment." I made a matrix and I'm still questioning where to position the ball!
My matrix system is based on the one NinJA999 made for his racing entry.

Did someone say 3D scanning on my desk, or was that just an AdBot?
What happens when when you mix coke, pop rocks, vinegar, and baking soda?
NinJA999
18
Years of Service
User Offline
Joined: 11th Nov 2005
Location: NH
Posted: 11th Jun 2007 05:07
sweet, nice to know that people like my entries enough to base things on them.

42
http://www.nictitatingrabbit.com
http://penchantpages.nictitatingrabbit.com
Insert Name Here
17
Years of Service
User Offline
Joined: 20th Mar 2007
Location: Worcester, England
Posted: 11th Jun 2007 20:18
Right, one brief code with three holes:

Thanks

The below sentance is true.
The above sentance is false.
Paradox!
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 12th Jun 2007 02:46
One hole - with bunkers:



Starts over the tee - with the camera pointing at the hole.

LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 12th Jun 2007 03:25
I have the basics done on one golf hole. The textures are just basic colors so far. No trees are in it yet and no undulations either. Still working on it. When I get a little closer to being finished, I will put all of the data into statements and read them to indicate the height and texture of the tiles. If someone has an easier way to do this, please let me know.



LB
NinJA999
18
Years of Service
User Offline
Joined: 11th Nov 2005
Location: NH
Posted: 12th Jun 2007 04:02
WOW!!!! Nice job all three of you. There is no way I will be able to create anything like that, but I'll still try to get started Wed afternoon. Sinani201, can't wait to see your entry!

42
http://www.nictitatingrabbit.com
http://penchantpages.nictitatingrabbit.com
Insert Name Here
17
Years of Service
User Offline
Joined: 20th Mar 2007
Location: Worcester, England
Posted: 12th Jun 2007 21:35
@TDK
Nice! Very detailed, but the camera moves verey slowly, it's almost tedious.
@LBFN
Camera faster=good, but as you've said, detail is needed.

These both show up little details on mine that kinda haven't worked. Is crazy golf allowed?

The below sentance is true.
The above sentance is false.
Paradox!
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 12th Jun 2007 23:55
but the camera moves verey slowly

That's easily sorted - just change 50 on the following lines to whatever value you want!

If MouseClick()=1 Then Move Camera 50
If MouseClick()=2 Then Move Camera -50


I just set it slow so you wouldn't miss any of the wonderful height shaded matrix texturing...

For a different course (but with the tee and hole in the same place) change the number on the line Randomize 65535 to a different number.

TDK_Man

Link102
19
Years of Service
User Offline
Joined: 1st Dec 2004
Location: On your head, weeeeee!
Posted: 13th Jun 2007 00:24
this works wel for me



Don't look at my sig!
Sinani201
17
Years of Service
User Offline
Joined: 16th Apr 2007
Location: Aperture Science Enrichment Center
Posted: 13th Jun 2007 07:06 Edited at: 14th Jun 2007 04:26
Oh, great. Another problem!



Instead of the background fully grassy, it's striped grass, black.

Did someone say 3D scanning on my desk, or was that just an AdBot?
What happens when when you mix coke, pop rocks, vinegar, and baking soda?
LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 13th Jun 2007 15:17
@Sinani201

Change
to
. There is no bitmap 1 listed in your code, other than where you show it is being deleted.

LB
LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 13th Jun 2007 15:25 Edited at: 14th Jun 2007 00:20
@ Insert Name Here
Quote: "Is crazy golf allowed?
"


The challenge is for a golf hole or a mini golf hole. I see no reason why crazy golf would not be allowed, so yes, go for it!


@ TDK
I've put in undulations, but you can't really see them very well. Any suggestions? I've tried all sorts of light combinations, but nothing seems to work.

LB
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 14th Jun 2007 02:43
Quote: "I've put in undulations, but you can't really see them very well. Any suggestions?"


If I understand you correctly, you need to add the normalising routine from my program. It should add a highlighting/shadow effect to the matrix making the undulations show up a bit better.

TDK_Man

Sinani201
17
Years of Service
User Offline
Joined: 16th Apr 2007
Location: Aperture Science Enrichment Center
Posted: 14th Jun 2007 04:37
Thanks LBFN. Now I'm ready to start my 2D entry!

Did someone say 3D scanning on my desk, or was that just an AdBot?
What happens when when you mix coke, pop rocks, vinegar, and baking soda?
LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 14th Jun 2007 05:10
@ Sinani201
You're welcome.

@ TDK
I placed the Normalise function into my program and set the matrix flags like you did and it did not make any difference. No shadows are present at all.


LB
Zombie 20
17
Years of Service
User Offline
Joined: 26th Nov 2006
Location: Etters, PA
Posted: 14th Jun 2007 06:08
LBFN-Sorry, i have to drop out as I've just realized i'm not ready to try this yet. It has saddened me but I have to know my limits right?? Perhaps the next challenge...

LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 14th Jun 2007 07:12
@ Zombie 20
Sorry to hear it, I was hoping to see something from you. Well, hopefully the next challenge will work for you.

LB
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 14th Jun 2007 16:10
LBFN

Does this work for you?



TDK_Man

NanoGamez guy
17
Years of Service
User Offline
Joined: 13th Jan 2007
Location: Closer than you think...
Posted: 14th Jun 2007 18:29
I think I'm gonna have to give this one a miss too. Got exams coming up and I need to revise


Nothing is impossible...
No really, it is.
NinJA999
18
Years of Service
User Offline
Joined: 11th Nov 2005
Location: NH
Posted: 14th Jun 2007 19:01
owch, just finished my exams. good luck NanoGamez Guy!

I'll get to work on mine. I'm going away on Sat, but I will have my laptop, which has DBC on it, and I'll see if I can finish by the 19th.

42
http://www.nictitatingrabbit.com
http://penchantpages.nictitatingrabbit.com
LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 15th Jun 2007 04:10
@ TDK

I tried to put into my code what you have given, but it didn't solve the problem. Since my golf hole is shorter and narrower than yours (plus I put a creek flowing through it) it's a little hard to use big undulations. Perhaps they aren't big enough to bring about shadows. Anyway, thanks for your help.

LB
LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 17th Jun 2007 04:24
Here is my final version.


LB

Attachments

Login to view attachments
Sinani201
17
Years of Service
User Offline
Joined: 16th Apr 2007
Location: Aperture Science Enrichment Center
Posted: 17th Jun 2007 20:44
Hello.
You may have noticed that I haven't posted for a while. This is because I'm on vacation and the internet prices were huge! About 9 dollars per hour! We normally pay $30 per month at home. But where I am right now I get free internet. I can't edit my entry because I'm not using the computer I normally use. Good luck, everyone!

Did someone say 3D scanning on my desk, or was that just an AdBot?
What happens when when you mix coke, pop rocks, vinegar, and baking soda?
MikeB
17
Years of Service
User Offline
Joined: 5th Apr 2007
Location: My Computer, Shropshire, England
Posted: 17th Jun 2007 23:33
If the next challenge isn't insanely hard I will definetley enter, as I now have DBC 1.13 with DarkEdit YAY.

E.D.


Shame I can't change my name
Sinani201
17
Years of Service
User Offline
Joined: 16th Apr 2007
Location: Aperture Science Enrichment Center
Posted: 18th Jun 2007 23:04
Yay!!!! The Apple store in New York city gives free Internet!!!! Hooray!

Did someone say 3D scanning on my desk, or was that just an AdBot?
What happens when when you mix coke, pop rocks, vinegar, and baking soda?
LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 19th Jun 2007 02:38
Challenge update:

The is only one day left (approximately) to submit your entry. The challenge ends tomorrow night.

Good luck to all,

LB
NinJA999
18
Years of Service
User Offline
Joined: 11th Nov 2005
Location: NH
Posted: 19th Jun 2007 04:06
Wow, I'm on free internet at my hotel in Washington, DC. I've been trying to work on my entry, but I might not get home until after the deadline.

42
http://www.nictitatingrabbit.com
http://penchantpages.nictitatingrabbit.com
MikeB
17
Years of Service
User Offline
Joined: 5th Apr 2007
Location: My Computer, Shropshire, England
Posted: 19th Jun 2007 12:08
One day till I can possibly enter , there's no way I'll be able to build a virtual golf course in 1 day .

E.D.


Shame I can't change my name
LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 19th Jun 2007 14:41
@ E.D.

It's too bad you just found out about it. The challenge started on June 8th. Oh well, the next challenge will be starting soon.

LB
MikeB
17
Years of Service
User Offline
Joined: 5th Apr 2007
Location: My Computer, Shropshire, England
Posted: 19th Jun 2007 15:33
Can't wait . <-- No sarcasm

E.D.


Shame I can't change my name
Insert Name Here
17
Years of Service
User Offline
Joined: 20th Mar 2007
Location: Worcester, England
Posted: 19th Jun 2007 18:21
My clock says 8 hours-ish...

The below sentance is true.
The above sentance is false.
Paradox!
MikeB
17
Years of Service
User Offline
Joined: 5th Apr 2007
Location: My Computer, Shropshire, England
Posted: 19th Jun 2007 18:30
I love your sig INH .


E.D.


Shame I can't change my name
Insert Name Here
17
Years of Service
User Offline
Joined: 20th Mar 2007
Location: Worcester, England
Posted: 19th Jun 2007 20:46
Lol...
Sorry, my above post was spam.

The below sentance is true.
The above sentance is false.
Paradox!
Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 20th Jun 2007 03:41 Edited at: 20th Jun 2007 03:52
Ok,

This one is just under the wire (maybe just over the wire! )

Once again my brain had bigger ideas than I had time for. I put this together today - I spent too much time on the water! Anyway, my intention was to make a gloomy rainy day for golf. Just didn't have time...

I nabbed TDKs smoothing routine and used Lee's normal routine as well.

A little extra detail, the hole flag moves with blowing wind (maybe a bit cheesy )



Enjoy your day.
LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 20th Jun 2007 04:05
Okay, the golf hole challenge is over; no more entries will be accepted. I will review the entries and declare a winner very soon. Thanks to all of the participants!

LB
LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 20th Jun 2007 04:49
The results of the golf hole competition are:

Reviews:
* Insert Name Here *
Using objects almost entirely was a neat idea. However, you could watch as the objects formed; it would have been a good idea to show them all at one time. It was a little hard to discern where hole #2 ended and #3 began.

* TDK *
Excellent undulations (the fairway and the green)! Lighting and shading is superb. Mouse movement is a little tricky at first and very slow (I know it was your intent so you could see the beauty of it all). The code indicates that there was water, but I did not see any when I ran it.

* Latch *
Nice water effect and lake. The flag waving was a nice little touch. The hole was a little dark (I know you were going for the rainy, overcast effect) and some things were a little hard to see.

The decision was tough as these were all good entries.

The runner up is


and the winner is


Congratulations to all on a job well done!

LB
NinJA999
18
Years of Service
User Offline
Joined: 11th Nov 2005
Location: NH
Posted: 20th Jun 2007 05:37
Ah, by the time the challenge closed I was somewhere in Connecticut. I look forward to the next challenge, and I hope I can participate. Congrats TDK and Latch!

42
http://www.nictitatingrabbit.com
http://penchantpages.nictitatingrabbit.com
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 20th Jun 2007 16:37
Thanks for that... bows graciously...

Give me a minute or to and I'll post back with the next challenge.

TDK_Man

TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 20th Jun 2007 17:49 Edited at: 20th Jun 2007 17:53
OK, here's the next challenge - it's not that technical so hopefully this will encourage more people to have a go at it. But, it could be quite useful if you are writing an RPG style of game and need to be able to talk to characters...

The Challenge

You must write a program which you can talk to. Obviously this must include a text parser which takes what the user types in and tries to construct a reply which makes sense.

Naturally, this can result in a massive program, so it's essentially a case of who can make the most 'intelligent' program within the time allowed.

Rather than just have hundreds of stock answers, you may also want to make your program a 'learning' program where it asks questions about what the user types and stores the information in a text file for later. It might work something like:

User Types: I have a cat

Program Types: I don't know what a cat is. Please answer some questions for me...

Program Types: Is it Animal, Vegetable or Mineral (A/V/M)?
Program Types: Is it Tiny, Small, Medium, Big, Very Big or Huge (T/S/M/B/V/H)?

and so on. You may have 20 questions and choose a few to ask at random. This info would be stored in the text file under 'cat' and used to reply if the user mentions the word cat in the future.

Deadline: Midnight GMT on Wednesday 27 June

good luck!

TDK_Man

Login to post a reply

Server time is: 2024-05-04 06:06:17
Your offset time is: 2024-05-04 06:06:17