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
Sinani201
17
Years of Service
User Offline
Joined: 16th Apr 2007
Location: Aperture Science Enrichment Center
Posted: 11th Jan 2010 22:42
Is the deadline at the end of the 13th or at the beginning? Because I might need some extra time to finish.

Libervurto
17
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 11th Jan 2010 23:11
The deadline is always the end of the day that is given (ie 00:00GMT 14 Jan)

"With games, we create these elaborate worlds in our minds, and the computer is there to do the bookkeeping." - Will Wright
Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 13th Jan 2010 15:05
I don't think I'm gonna be able to get anything done for this one.

Enjoy your day.
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 14th Jan 2010 00:18
If I gave until the end of the week would anyone submit? I could give until Friday, but i'll be out of town after that.


"Any sufficiently advanced technology is indistinguishable from magic" ~ Arthur C. Clarke
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 14th Jan 2010 20:41
Well, challenge has ended and there were no entries. Suggestions on how to proceed?


"Any sufficiently advanced technology is indistinguishable from magic" ~ Arthur C. Clarke
Sinani201
17
Years of Service
User Offline
Joined: 16th Apr 2007
Location: Aperture Science Enrichment Center
Posted: 15th Jan 2010 02:42
I'm really stumped on how to do a certain thing in my own program, and it is waaay too complicated to fix.

How about a new challenge?

Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 15th Jan 2010 18:38
Quote: "Well, challenge has ended and there were no entries. Suggestions on how to proceed?"

uhhm, new challenge? How about a math or programming brain teaser? And just for peace of mind, even the DBpro challenges have very few entries. I don't think newer programmers are quite as into programming as the dinosaurs around here are/were .

Enjoy your day.
jason p sage
16
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 15th Jan 2010 18:52
Sad but seems true. I was told by a guy running a PC Gaming "lounge" with tons of HIGH END Pc's and networks etc.. He runs PS3 and XBox licensed networks etc for online play - and says more and more folks are into the consoles... not the PC - with that goes many would be coders in my opinion. Reasoning is: Only have a game controller in hand? Whats programming? And the start up costs to REALLY go from owning an XBox or PS3 to being able to make games on it... well.. probably higher than just banging around on your PC.

Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 15th Jan 2010 19:17
I wouldn't be surprised if a big gap in programming and computing knowledge develops as more and more programmers don't learn the nuts and bolts but instead use already designed APIs, SDKs, drag and drop interfaces... it's a cultural shift. How many people less than 25 yrs old use the public library for more than getting internet access? How many people rely on unvarifiable, unreferenced information from the internet as fact? Oops, I'm ranting! I guess the point is instant gratification is available from so many sources, it may not seem appealing for new programmers to sift through the "how does it work" aspects of things and go right to the "press button to start" aspect.

Enjoy your day.
jason p sage
16
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 15th Jan 2010 20:20 Edited at: 15th Jan 2010 20:26
I was just published by O'Reilly for an article I submitted that is along these lines somewhat - though geared towards coders; it parallels your comment in many ways. Check out the Article "97 Things Every programmer should know" on my corporate web site. The article is currently on the front page - but may not be if you read this thread many days after today. http://www.jegas.com

Check it out

[edited grammar]

Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 15th Jan 2010 22:10
Interesting Article. Your article should give some potential coders some things to think about. Funny, I was going to include the phrase "reinventing the wheel" in my above post. It's hard to reinvent per se when so much that is already done is available. Programming is only fun to a few. For those that want to make a game, what is more fun or easier: FPS Creator, DarkBASIC Pro , or DarkGDK? But now I'm straying away from the challenges...

Enjoy your day.
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 15th Jan 2010 22:53
Quote: "How many people less than 25 yrs old use the public library for more than getting internet access?"

I'm over 25 and that's all I used it for, other than renting movies. Occasionally, I'll pick up a computer book or something. The other day I went to get a few books on music theory, they really didn't have anything. It's easier and quicker to search the internet most often.

I got into programming because I liked the absolute control that you can't get with already made packages.


"Any sufficiently advanced technology is indistinguishable from magic" ~ Arthur C. Clarke
Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 15th Jan 2010 23:01
Quote: "I'm over 25 and that's all I used it for, other than renting movies"

I always suspected you were the culprit for the degradation of society! and your library charges you for movies?

Enjoy your day.
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 15th Jan 2010 23:23
no they're free(if returned on time), which is why i go there instead of blockbuster.

The difference between me and the younger generation is I actually know how to use a library. I even know what a book is! Something even colleges are turning away from.

I'm looking for a new challenge.


"Any sufficiently advanced technology is indistinguishable from magic" ~ Arthur C. Clarke
Sinani201
17
Years of Service
User Offline
Joined: 16th Apr 2007
Location: Aperture Science Enrichment Center
Posted: 15th Jan 2010 23:33 Edited at: 15th Jan 2010 23:35
I know how to use a library, but I don't because I'm a geek .

We already did logic games. I can't think of a good challenge, since a lot of good ideas have already been taken.

Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 15th Jan 2010 23:42
How about something graphical? Leave the idea pretty open, just demonstrate a cool visual effect to show what can be done graphically without external media.


"Any sufficiently advanced technology is indistinguishable from magic" ~ Arthur C. Clarke
Sinani201
17
Years of Service
User Offline
Joined: 16th Apr 2007
Location: Aperture Science Enrichment Center
Posted: 16th Jan 2010 02:36
Well, didn't we already do the screensaver challenge? A "graphical" challenge wouldn't be much different in my opinion.

Libervurto
17
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 16th Jan 2010 08:41
I'm either working or playing FIFA at the moment, I am seriously addicted to that game. I will put it down and do some coding, haven't written anything for about a week.

I like that challenge, a nice broad spec.
Would could see some very weird and interesting things (if people enter). This reminds me of those demo events that animators have
Bring your best graphics

"With games, we create these elaborate worlds in our minds, and the computer is there to do the bookkeeping." - Will Wright
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 16th Jan 2010 14:12
It's open to a lot more than a screen saver. Make a full game if you want to. I just wanna see something that makes me say wow!


"Any sufficiently advanced technology is indistinguishable from magic" ~ Arthur C. Clarke
Libervurto
17
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 17th Jan 2010 19:39
I accidentally watched "The Secret Life of Chaos" last night on BBC Four. Wow, talk about inspiration for this challenge! It was all about how patterns in nature seem ordered but they arise through chaos. Mandelbrot came up a few times. I highly recommend it, should be on BBC iplayer now. Do you guys in the US get BBC? If not you can watch online.

Now I'm going to read up on how to do this...

"With games, we create these elaborate worlds in our minds, and the computer is there to do the bookkeeping." - Will Wright
Libervurto
17
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 20th Jan 2010 14:51 Edited at: 20th Jan 2010 14:55
Phaelax do you have the code for that fractal fern you did a while ago?
I'm struggling to understand what little I can find about fractals.

It says fractals use complex numbers, which somehow are made up of floats and imaginary numbers. I do I use an imaginary number in DB?
Sorry my maths is not really up to this.

"With games, we create these elaborate worlds in our minds, and the computer is there to do the bookkeeping." - Will Wright
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 20th Jan 2010 21:04
Yea I still have it, but I won't be home until next week. There's a similar code that's on my website's codebase that builds a 3D tree. Not sure who the author was.
http://dbchallenge.com/?page=codebase&cat=2


"Any sufficiently advanced technology is indistinguishable from magic" ~ Arthur C. Clarke
Libervurto
17
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 21st Jan 2010 04:42
Yes I found that tree and made my own 2D one.

Entry 1: Procedural Tree


Entry 2: Procedural Savannah


"With games, we create these elaborate worlds in our minds, and the computer is there to do the bookkeeping." - Will Wright
Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 27th Jan 2010 23:05
@Obese87
That Savannah scene is pretty nice! Good job!

Enjoy your day.
Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 29th Jan 2010 00:06 Edited at: 29th Jan 2010 02:07
accidental double post

Enjoy your day.
Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 29th Jan 2010 00:09 Edited at: 29th Jan 2010 02:11
Shadow Casting

Here's a shadow casting demo for animated 3d objects.

The function


is what does the shadow work.
Obj is the object to cast a shadow from
shadow is the object number of a shadow to create
sangle# is the angle to cast the shadow
shadowimg - an image to use as the shadow color - using a small image as a texture is faster than using the color object commands. If you don't supply an image then the color object command is used.
posx#,posy#,posz# allows you to set some offsets for the positiong of the shadow

There's a lot of potential for improvement. It's pretty slow, so I stuck a timer in the main loop to cut down on how often the function is called. That helps a lot. Move the camera with the up and down arrow keys and steer with the mouse.



Enjoy your day.
29 games
18
Years of Service
User Offline
Joined: 23rd Nov 2005
Location: not entirely sure
Posted: 29th Jan 2010 00:21
@obese87

I like both of those. I liked tweaking the values for the angles of the branches. I managed to get quite a good "wind swept" look.
pictionaryjr
15
Years of Service
User Offline
Joined: 12th Mar 2009
Location:
Posted: 29th Jan 2010 06:45 Edited at: 29th Jan 2010 06:55
That's impressive latch.

Edit:
forgot to say, the only thing is the shadow is a wireframe form so u can see what the arm is doing infront of the body when technically the body would block it in the arm. im sure u could fix this if u wanted to and just dont feel like it though lol.

<IMG SRC="http://experimentalgame.webs.com/experimental%20games.jpg" ALT="Experimental Games Logo">
Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 2nd Feb 2010 11:08
@pictionary
With DBC 1.20, setting the shadow's ambient value to 0 seems to take care of that. You just end up with a darker shadow.

Enjoy your day.
Latch
17
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 23rd Feb 2010 10:40
So, what's next?

Enjoy your day.
Link102
19
Years of Service
User Offline
Joined: 1st Dec 2004
Location: On your head, weeeeee!
Posted: 25th Feb 2010 19:16
if someone would be so kind as to think up a new challenge

BN2 Productions
20
Years of Service
User Offline
Joined: 22nd Jan 2004
Location:
Posted: 25th Feb 2010 23:54
I have a couple, though I imagine that they wouldn't be too popular (would love to compete myself, but I have barely even had time to be active on the forums).

1) Create functions to do calculus (integrals and derivatives). I am sure its been done before, but opening up those avenues could really open the floodgates for some really cool math-based code.

2) Matrix operations (With or without using matrices). By matrix I am meaning things like cross products, simultaneous solutions (this would REALLY be useful I imagine for complicated situations), and other stuff that matrices can do.

Just ideas coming from the guy who always prefers math over functions.

Great Quote:
"Time...LINE??? Time isn't made out of lines...it is made out of circles. That is why clocks are round!" -Caboose
Caleb1994
15
Years of Service
User Offline
Joined: 10th Oct 2008
Location: The Internet you idiot!
Posted: 26th Feb 2010 08:16
Quote: "Just ideas coming from the guy who always prefers math over functions.
"


I agree. The more i get into coding the more i see (especially with games and graphics) math is a HUMUNGUS part! I have always known that it was used a lot but the more i look at it the more i see. The hole thing is built off of math and i am starting to see that now!

It makes me actually like math even more. I get to mix 2 things i already like (math and coding) and it makes something i crave!

New Site! Check it out \/
Libervurto
17
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 1st Mar 2010 20:01
I agree, lots of mathematics seems pointless when you're learning it but you see why these things exist when you learn programming.

I'm glad to see more schools teaching programming and The Game Creators getting involved in that.
Playing computer games lets you do things you couldn't normally do, writing computer games lets you apply knowledge that you wouldn't normally have the chance to use.

[back to the challenges]

Board Game Challenge
I've been obsessed with board games at the moment.
I know complete game challenges are frowned upon but something like snakes and ladders could be done in a few days and there's room for much bigger projects if you're up to it.

I think a deadline of 31st March should give everyone enough time to get something finished. That's all entries posted before the 1st April.

"With games, we create these elaborate worlds in our minds, and the computer is there to do the bookkeeping." - Will Wright
Sinani201
17
Years of Service
User Offline
Joined: 16th Apr 2007
Location: Aperture Science Enrichment Center
Posted: 2nd Mar 2010 02:11 Edited at: 2nd Mar 2010 02:11
A board game? That seems like an interesting challenge. Since I've switched to Mac and learning C++ and Objective C, my DB knowledge is fading (which is why my challenge entry for Roman Numerals was purely command-line), it might be difficult for me to use 2D graphics. Or maybe not... we'll see. I'll get to work (in Boot Camp).

Your signature has been erased by a mod - Please reduce it to 600x120 maximum size
Caleb1994
15
Years of Service
User Offline
Joined: 10th Oct 2008
Location: The Internet you idiot!
Posted: 2nd Mar 2010 03:38
Quote: "I'm glad to see more schools teaching programming and The Game Creators getting involved in that."


Everything i know about programming i have tought myself lol well with the help of the forums and one c++ book, and a lot of google a programmers... heck everyones best friend!

Quote: "writing computer games lets you apply knowledge that you wouldn't normally have the chance to use.
"


Yup. I find that i love half the stuff i study in school when i actually get to use it! lol

Quote: "Board Game Challenge"


Sounds fun. If i can squeeze in some time i will enter this one!

New Site! Check it out \/
Link102
19
Years of Service
User Offline
Joined: 1st Dec 2004
Location: On your head, weeeeee!
Posted: 2nd Mar 2010 11:27 Edited at: 2nd Mar 2010 11:27
posting a pic, trying to get everyone exited :3


Attachments

Login to view attachments
LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 3rd Mar 2010 14:54
Sounds like an interesting challenge and the timeframe is helpful. Perhaps I will have time to make an entry.

Libervurto
17
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 7th Mar 2010 04:14 Edited at: 7th Mar 2010 05:22
I've made a start.
I'm going to do simple old snakes and ladders.
Like my board so far?
Apparently 10x10 doesn't work, you're supposed to start in the bottom left corner and finish top right. Now I have to go in and change all the references to 10 and 100!!
Use variables kids.
[edit]
Now I've changed it I've found some versions that do end on the same side. Confused
Anyway, it's better now I have variables controlling it.
[edit]
I've changed it again. Now you can specify the size of the board. I will put in some randomly spawning snakes and ladders too, so every time you play it will be different. Trust me to not just do simple snakes and ladders


"With games, we create these elaborate worlds in our minds, and the computer is there to do the bookkeeping." - Will Wright
LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 7th Mar 2010 15:23 Edited at: 7th Mar 2010 15:24
I am working on a version of Yahtzee. Here is a pic of it so far:



Attachments

Login to view attachments
Link102
19
Years of Service
User Offline
Joined: 1st Dec 2004
Location: On your head, weeeeee!
Posted: 7th Mar 2010 16:14
Is Yahtzee considered a board game? Since it doesn't have a board.

Libervurto
17
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 8th Mar 2010 04:11
Yahtzee is close enough. I like Yahtzee
Any game is fine. Buckaroo would be cool
hmmm, what would you call all games that you play sitting down?
Parlour games?

"With games, we create these elaborate worlds in our minds, and the computer is there to do the bookkeeping." - Will Wright
LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 8th Mar 2010 04:44
Thanks for the clarification Obese87. Actually, if you Google "board games Yahtzee", it will come up with a number of references to it being considered a board game. I never really gave it a thought.

Libervurto
17
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 20th Mar 2010 16:27
I haven't made any real progress but I have tidied up my code a lot, even listing the variables I used.
You really can get lost in your own code; I was struggling to see what I had to do next but now my code is nice and neat everything is easier.


"With games, we create these elaborate worlds in our minds, and the computer is there to do the bookkeeping." - Will Wright
LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 20th Mar 2010 22:09 Edited at: 3rd Apr 2010 16:27
Looking pretty good so far. Maybe you could list the max size available when asking for input.

Caleb1994
15
Years of Service
User Offline
Joined: 10th Oct 2008
Location: The Internet you idiot!
Posted: 21st Mar 2010 03:15 Edited at: 21st Mar 2010 03:18
Why use goto? Why not a loop? just wondering. it looks like it's surving the same purpose. Tried it with the do/loop and it works the same.

New Site! Check it out \/
LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 28th Mar 2010 00:02
Here is my entry. I really wanted to work on it some more to clean everything up, but time is hard to come by of late. It is a little different than Yahtzee (on purpose), but it generally follows the same rules. I have in here a basic framework for where a computer player could be added later on.



Libervurto
17
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 28th Mar 2010 08:01
Aaah I completely forgot about this, luckily a few days left.
Nice LBFN. When I got yahtzee the points for getting it wasnt positioned properly for some reason. Every other category was fine.
There was also a weird flickering of the player name if you rolled without selecting any dice.

"With games, we create these elaborate worlds in our minds, and the computer is there to do the bookkeeping." - Will Wright
LBFN
17
Years of Service
User Offline
Joined: 7th Apr 2007
Location: USA
Posted: 28th Mar 2010 21:17
Quote: "When I got yahtzee the points for getting it wasnt positioned properly for some reason."


I fixed that the other day, but I must not have saved the file or something, as I see it is still there. Another problem I see is that even if you don't have a Yahtzee, you can put whatever you have into that category and it simply ignores it and allows you another turn. (i.e. you can cheat easily)

One other thing I hope to put in, is checking to see if the player is trying to put into a category in which they will have no score, and then asking them if they really want to do that.

Sinani201
17
Years of Service
User Offline
Joined: 16th Apr 2007
Location: Aperture Science Enrichment Center
Posted: 29th Mar 2010 00:18
If the text is flashing in your program, try putting a WAIT 1 or WAIT 2 in your loop. That might fix the problem. It worked for me once. I can't test it myself because I'm using my Mac right now but it should work.

Your signature has been erased by a mod - Please reduce it to 600x120 maximum size

Login to post a reply

Server time is: 2024-04-20 01:51:59
Your offset time is: 2024-04-20 01:51:59