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
NanoGamez guy
18
Years of Service
User Offline
Joined: 13th Jan 2007
Location: Closer than you think...
Posted: 27th Nov 2008 23:54
@Phaelax

The site is looking really good! It's very well designed and nice to look at.

Quote: "The only issue I've seen with the line numbers is with Chrome and Safari, selecting the code selects the numbers as well."


I'm using Chrome, when you select it it does select the line numbers but when you copy it it only copies the code.


"To succeed is not enough, others must fail" - Gore Vidal
Phaelax
DBPro Master
22
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 28th Nov 2008 02:39
@nano,
Ah ok, good to know.

The login is mainly for me at the moment. I've built several other functions in only accessible to admins.

I'm open to feature suggestions. I was thinking of a challenge suggestion box so when a winner draws a blank we'll have a pre-existing list of possible challenges.


BN2 Productions
21
Years of Service
User Offline
Joined: 22nd Jan 2004
Location:
Posted: 29th Nov 2008 08:52
Here is my final version.

Not much as far as updates go.

Added a menu

Misc Bug fixes

Came up with a stupid name (really, it IS bad)



Ever notice how in Microsoft word, the word "microsoft" is auto corrected to be "Microsoft" but "macintosh" just gets the dumb red underline?
Irojo
16
Years of Service
User Offline
Joined: 21st May 2008
Location: Eating toast.
Posted: 29th Nov 2008 16:49 Edited at: 29th Nov 2008 17:01
Well it's a pretty good program. I like how I cannot place the characters cursor on the stars.

@Phaelax

On the DBCC Website, I highlighted the codes, and copied it, however it copied it into one line.


I download memory.
Phaelax
DBPro Master
22
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 30th Nov 2008 01:14
I won't be able to enter. I've been out of town for the turkey day, and now that I've been home I've had friends back home from chicago and CA, so I haven't had much time to do anything new.


Irojo, I noticed that IE did this but Chrome does not. Which browser did you use? I'm looking at Geshi updates now about this.


Irojo
16
Years of Service
User Offline
Joined: 21st May 2008
Location: Eating toast.
Posted: 30th Nov 2008 02:48
Okay Phaelax.

It is IE.


I download memory.
TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 30th Nov 2008 16:17
Hey,

I know the deadline is already over, but could you give me like 1 more hour to finish my entry?

Thanks, TheComet

Peachy, and the Chaos of the Gems

TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 30th Nov 2008 17:11 Edited at: 30th Nov 2008 18:43
OK, I finished!

here is the code:



Click the mouse to draw lines, and drag the player by clicking and dragging it.

Press "Play" to play and use the arrow keys to steer.

Press "Stop" to go back to the editor.

Press "Reset" in the editor to reset all lines

TheComet

Peachy, and the Chaos of the Gems

Quirkyjim
16
Years of Service
User Offline
Joined: 18th Oct 2008
Location: At my computer
Posted: 30th Nov 2008 17:44
Whoa... Amazing...

~QJ
TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 30th Nov 2008 18:41 Edited at: 30th Nov 2008 19:25
update!

code:



VERY IMPORTANT! THE CODE WILL ONLY RUN IF YOU SAVE THE CODE TO A DBA FILE! WHEN YOU COPY AND PASTE THE CODE INTO YOUR EDITOR, SAVE THE CODE BEFORE RUNNING!

The drag player glitch is fixed. Now you have a goal to drag too!

click and hold left mouse button on player to drag. The same with the goal.

Left click the mouse on the black and drag to draw lines.
Right click, hold and drag to draw a circle.
Play will switch to play mode.
Stop will switch to edit mode.
reset will reset everything in edit mode.
exit will exit.

Use left and right arrow keys to move, up to jump. Try to reach the goal.

Have fun!

TheComet

Peachy, and the Chaos of the Gems

Libervurto
18
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 1st Dec 2008 01:09
@Phaelax
When I copy code from the site it either has the line numbers too (with Ctrl+A) or # in between the lines (dragging mouse to select).
Is there a way to get just the code on it's own?
Oh I'm using FireFox btw.

A small program that works is better than a large one that doesn't.

DBC Challenge Rank: Rookie
Irojo
16
Years of Service
User Offline
Joined: 21st May 2008
Location: Eating toast.
Posted: 1st Dec 2008 04:09
No more entries!


I am judging now...


I download memory.
Irojo
16
Years of Service
User Offline
Joined: 21st May 2008
Location: Eating toast.
Posted: 1st Dec 2008 04:18
Okay! The results...
Phaelax's- Looked like it was well thought out, however it didn't have any character controls.

BN2 Proudction's- Good controls, ran well, and nice to be able to add where the player starts.

TheComet's-
Quite impressive entry, although using a file to control the physics lost a point. I also couldn't move the character, or the goal. The jumping and falling weren't very realilistic.

Thanks to everyone for entering!

Winner


Runner-up


Congratulations to everyone.

To you winner!


I download memory.
TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 1st Dec 2008 08:59 Edited at: 1st Dec 2008 09:05
Wow, Thanks!

What? You couldn`t move the character? Did you download the latest code? Did you leftclik on the character, hold down the left mouse button and drag?

The theory behind my collision is, that I have a dimension (pixel(640,480)) that defines every pixel on the screen. That`s where I import the image and check, which pixel is white. I it`s white, the dimension pixel(x,y) will be one, else zero. And when the player moves, I check if the player is on any of those dimensions, and if yes, I position it above the dimension.

So, to check every pixel on the screen, you could use Point(), but that would take about 3 hours. So the quickest solution I could think of, was to save the screen to a bitmap, and import the rgb values from there.

But that`s a different story.

Challenge

-What could you do with a spiral?

first off, the sentence was inspired by these videos:

Pimp Cup
Wii Mote
PIKACHU

This is the code that will make a spiral:



Whoever comes up with the most innovative game that uses the spiral above wins! Your game has to use the spiral, and it has to be on the screen.

Deadline

A week should be enough, so:

7th December 2008 12:00 midday CET



So, what do you think?

TheComet

Peachy, and the Chaos of the Gems

Ashingda 27
17
Years of Service
User Offline
Joined: 15th Feb 2008
Location:
Posted: 1st Dec 2008 15:09
That's true POINT takes a ridiculusly long time.

I think that's quite challenging, cant seem to think of any idea right now for it lol.
TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 1st Dec 2008 16:35
Quote: "I think that's quite challenging, cant seem to think of any idea right now for it lol."


Well, that`s why I came up with that

After all, it is the Dark Basic Classic Challenge Thread, right?

TheComet

Peachy, and the Chaos of the Gems

Libervurto
18
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 1st Dec 2008 22:11 Edited at: 1st Dec 2008 23:29
I've stripped down your snippet a bit, taking out stuff that wasn't needed - unless you have a specific reason for those things.


I made a function to give more flexibility to the spiral size...

can this be my entry? I'm going to make it so you can define how coiled the spiral is, and it's rotation.

[edit]
scrub that last one I've improved it greatly, now you can set the angle, radius and coil. I had a bit of a dilemma; I could either make it so tightening the coil would reduce the radius of the spiral (like in real life) or whatever happens to the coil the length of the line adjusts to maintain the radius. I chose to maintain the radius as A) it's easier to code, B) easier for the user to specify a radius than try to work out the correct length.


This better shows what you can do with it...


Here's a hypnotic one...


A small program that works is better than a large one that doesn't.

DBC Challenge Rank: Rookie
Ashingda 27
17
Years of Service
User Offline
Joined: 15th Feb 2008
Location:
Posted: 2nd Dec 2008 01:26
Wow those are neat Obese, I've been thinking for a while now, still got no good idea to use a spiral with lol.
Irojo
16
Years of Service
User Offline
Joined: 21st May 2008
Location: Eating toast.
Posted: 2nd Dec 2008 02:43
Well I was debating whether or not to post this question (for fear you'd guess what I am doing and get some ideas), but I couldn't figure it out.

Heehee.

So why isn't the box on the tip of the spiral?




I download memory.
Sinani201
18
Years of Service
User Offline
Joined: 16th Apr 2007
Location: Aperture Science Enrichment Center
Posted: 2nd Dec 2008 04:51
lol, the videos were fuh-nee.
Anyways, I'll try out the challenge.


"I reveal my trap card, GEORGE DUBYA BUSH!
America loses 2000 Life Points! America loses." -Deucalion2
BN2 Productions
21
Years of Service
User Offline
Joined: 22nd Jan 2004
Location:
Posted: 2nd Dec 2008 23:18
Question:

Can we use the MATH from the spiral? Or do we have to use the image itself?

Ever notice how in Microsoft word, the word "microsoft" is auto corrected to be "Microsoft" but "macintosh" just gets the dumb red underline?
Libervurto
18
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 2nd Dec 2008 23:47 Edited at: 3rd Dec 2008 00:10
@Irojo
Quote: "So why isn't the box on the tip of the spiral?"

Because the angle gets altered by the coil value, what you've done is position the box on the edge of a circle with a 50 radius.
I added to your x and y variables.
Since in the function the coil is added every cycle I added the coil (8) multiplied by the radius (50+1 as the extra 1 seemed to work better)


[edit]

I've added two functions to make it easier to place stuff on the spiral. Here's an example to show how to use them, any questions just ask.
The radius parameter in SPIRAL_X and SPIRAL_Y will place the object at the appropriate place on the spiral for the radius specified, this can be different to the spiral's radius.


A small program that works is better than a large one that doesn't.

DBC Challenge Rank: Rookie
Irojo
16
Years of Service
User Offline
Joined: 21st May 2008
Location: Eating toast.
Posted: 3rd Dec 2008 00:37
Thank you Obese!

That will help me a bundle....

This is going to be by FAR my most creative entry yet.


I download memory.
Libervurto
18
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 3rd Dec 2008 01:05 Edited at: 3rd Dec 2008 01:15
@Irojo
glad to be of help

I stuck a spiral on every point of the spiral and it made something that looks like a fossil.


Wow! Check these out...


A small program that works is better than a large one that doesn't.

DBC Challenge Rank: Rookie
Ashingda 27
17
Years of Service
User Offline
Joined: 15th Feb 2008
Location:
Posted: 3rd Dec 2008 04:21
@Obese
LOL you never fail to amaze me. That looks so cool.
TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 3rd Dec 2008 10:15
Quote: "Can we use the MATH from the spiral? Or do we have to use the image itself?"


Anything you want, the spiral just has to be somewhere visible on the screen and have a reasonable size. (Not a small speck on the screen)

Cool, obese!

TheComet

Peachy, and the Chaos of the Gems

Phaelax
DBPro Master
22
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 4th Dec 2008 20:42
In case anyone else needs to figure this out, here's how you can traverse along a spiral in even increments. I needed this for my game, and using time along the spiral wouldn't work because objects appear to move faster the further from the center you get.

Find the overall length of the spiral first.



Where p# is between 0 and length#. I left (220*5) as is instead of making it 1100 to show where the value came from.


Phaelax
DBPro Master
22
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 5th Dec 2008 00:21
I take that back, it's not accurate.


TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 5th Dec 2008 18:40
So, hows it all going?

2 more days until the Deadline, and only obese has entered an entry. Is anyone having trouble?

TheComet

Peachy, and the Chaos of the Gems

Phaelax
DBPro Master
22
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 5th Dec 2008 20:16
my whole plan is depends on me incrementing along the spiral in even amounts accurately


Irojo
16
Years of Service
User Offline
Joined: 21st May 2008
Location: Eating toast.
Posted: 5th Dec 2008 22:51
I'm trying to put as much into the entry as possible before I post it.

It's pretty

lame,
laggy,
easy,
uneffeciently coded.
Although the concept is rather good, if I do say so myself.


I download memory.
Libervurto
18
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 6th Dec 2008 01:11
@Phaelax
Are my Spiral_X and Spiral_Y functions (that I posted earlier as an edit) any use to you?

A small program that works is better than a large one that doesn't.

DBC Challenge Rank: Rookie
TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 7th Dec 2008 14:19 Edited at: 7th Dec 2008 14:21
I could end the challenge now, but I am disappointed that no one entered (except obese).

Irojo, you have a challenge, right? I will leave you some time to enter it.

@all

What`s wrong? Was it too short? Should I extend the Deadline? Or is there something wrong with the challenge?

TheComet

Peachy, and the Chaos of the Gems

Irojo
16
Years of Service
User Offline
Joined: 21st May 2008
Location: Eating toast.
Posted: 7th Dec 2008 15:46
Thanks for letting me still enter TheComet.
Personally, I liked the challenge, and think I got a good concept off it, however my program is very rough.

The scoring system doesn't work, but the idea is to click on the circles, while not hitting the box. You'll figure it out after a few tries. I can't remember if the box's health is working properly again. It got buggy for some reason that I couldn't find in the time I had.

I have been insanely busy lately, so sorry it's so buggy, and doesn't have anything pretty, i.g. a menu, but here it is:




I download memory.
Ashingda 27
17
Years of Service
User Offline
Joined: 15th Feb 2008
Location:
Posted: 7th Dec 2008 15:58
@TheComet
Your challenge is actually pretty good and requires alot of creativity, but personally I'd be more active if it's something that is more related to the kind of projects I'm working on right now.

For say if I'm working on an RPG and I get a change to improve my skills on something related to a FPS, although it'll be usefull my mind just wont be on it.

Well that's my opinion anyways and don't take it too hard on yourself.
TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 7th Dec 2008 18:05
That`s fine Ashingda. So the next challenge I make will be based on an RPG, OK?

Thanks, Irojo, for still entering. I will check it out.



The Challenge is OVER!!!
========================


Calculating results...

TheComet

Peachy, and the Chaos of the Gems

TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 7th Dec 2008 18:23
OK, Irojo, I edited your game and the scoring works. At places you wrote "heatlh" instead of "health", and the part where you check if health=0, is just under the command "exit", which means it doesn`t even get there.

Here is the edited code:



Obese, I loved the fossil effect and the other weird effect. I could just stare at that for hours.

Irojo, your game was pretty fun once you get the hang of it and has quite a lot of inspiration.


The runner up iiiiiiiiss :


And the WINNER iiiiiiiiiiiiiiiiisssss :


TheComet

Peachy, and the Chaos of the Gems

BN2 Productions
21
Years of Service
User Offline
Joined: 22nd Jan 2004
Location:
Posted: 7th Dec 2008 22:12
Congrats Irojo! This time I WILL be able to enter (probably won't be able to work on it for a week, but then school is over).

Ever notice how in Microsoft word, the word "microsoft" is auto corrected to be "Microsoft" but "macintosh" just gets the dumb red underline?
Irojo
16
Years of Service
User Offline
Joined: 21st May 2008
Location: Eating toast.
Posted: 8th Dec 2008 00:40
Thanks everybody!!!

That puts me tied with Obese.

Heehee.

I'll be putting up the new challenge as soon as I can think of one.

It'll be cool to see you competing BN2.


I download memory.
Ashingda 27
17
Years of Service
User Offline
Joined: 15th Feb 2008
Location:
Posted: 8th Dec 2008 02:30
Congrats Irojo, your spiral game was pretty cool.
Phaelax
DBPro Master
22
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 8th Dec 2008 02:56
Quote: "Or is there something wrong with the challenge?"


Here's a spiral, make something? I think challenges should be a little more focused. Agreed it did require a lot of creativity. My problem was what I mentioned earlier about finding equal points along the spiral. I tried Obese's code but it couldn't help me.

If anyone is curious, here's the game I was trying to make:
http://www.tbs.com/stories/storywide/0,,97599,00.html

Irojo
16
Years of Service
User Offline
Joined: 21st May 2008
Location: Eating toast.
Posted: 8th Dec 2008 06:22
Thanks Ashingda.

Ahhh Phaelax.... the Zuma style game. I wish I had thought of that. Not that I could have coded it.

Coming up with a challenge was difficult, (I literally have been thinking for hours, we've done 'em all ) but hopefully this one will attract some competition.

--
New Challenge!

Challenge
Balancing Skills
Create a game that requires the user to 'balance' this can be as simple as the screen scrolling, and the user staying on the line, to the user keeping a character from falling of their unicycle.
Points go to:
- Creativity
- Scoring System (Put this as your last priority)
- Entertainment (is it fun, or boring?)
----

Deadline - December 21st Midnight

Good luck guys!


I download memory.
BN2 Productions
21
Years of Service
User Offline
Joined: 22nd Jan 2004
Location:
Posted: 8th Dec 2008 08:01
Hmmmm...this could be fun. Will get to working on it now.

Ever notice how in Microsoft word, the word "microsoft" is auto corrected to be "Microsoft" but "macintosh" just gets the dumb red underline?
Ashingda 27
17
Years of Service
User Offline
Joined: 15th Feb 2008
Location:
Posted: 8th Dec 2008 16:34
I have an idea for it
Phaelax
DBPro Master
22
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 12th Dec 2008 20:54
I changed the logo of the website a little bit, hope bamber doesn't mind. Also, I added a search feature for the codebase with a few searchable easter eggs for you "classic" users.

Irojo
16
Years of Service
User Offline
Joined: 21st May 2008
Location: Eating toast.
Posted: 12th Dec 2008 22:53
Cool Phaelax!

Mind updating the Rankings? (heeheehee)


I download memory.
TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 13th Dec 2008 23:02 Edited at: 14th Dec 2008 00:47
Here is my entry:



Beer Balancing!

My score is 3521. Who can beat that?

Executable attached for those without DBC...

TheComet

Peachy, and the Chaos of the Gems

Latch
18
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 13th Dec 2008 23:35
@TheComet
WOW!!
Fun and Funny!

Good Job.

Enjoy your day.
TheComet
17
Years of Service
User Offline
Joined: 18th Oct 2007
Location: I`m under ur bridge eating ur goatz.
Posted: 14th Dec 2008 00:35 Edited at: 14th Dec 2008 00:47
I made it much harder now, and added a small new feature to it. After playing, it will say how many beers you eared in the last game!

I earned 3 Beers, who can beet me?

You also have levels, and I got to level 3. Each level you get higher, the bigger the chance is that a beer will tip.

code:



Ah, yeah, I did something really freaky in my code. Every object you see there(level, beer) is made out of triangles with the "make object triangle" command. I store every position of them in data statements, and it was really hard to imagine everything and then do it.

So, the statement "data 0,0,0,10,0,0,10,10,0,255,0,0" will make a triangle on the x1=0,y1=0,z1=0,x2=10,y2=0,z2=0,x3=10,y3=10,z3=0 colored red (r=255,g=0,b=0)

Executable attached for those that don`t own DBC.

TheComet

Peachy, and the Chaos of the Gems

Attachments

Login to view attachments
Libervurto
18
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 14th Dec 2008 17:14
@The Comet
That was cool!
The camera movement was especially good and fluid.

A small program that works is better than a large one that doesn't.

DBC Challenge Rank: Rookie

Login to post a reply

Server time is: 2025-05-17 17:22:35
Your offset time is: 2025-05-17 17:22:35