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 Professional Discussion / - DBPro Coding Challenges -

Author
Message
Peter H
22
Years of Service
User Offline
Joined: 20th Feb 2004
Location: Witness Protection Program
Posted: 15th Nov 2006 18:38
your menu beats mine

"One man, one lawnmower, plenty of angry groundhogs."
Spopovich
20
Years of Service
User Offline
Joined: 12th Jul 2006
Location:
Posted: 15th Nov 2006 21:21
Wow that is awsome, nice job

Do not ask what the forums can do ask what you can do for the forums.
RiiDii
21
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Inatincan
Posted: 16th Nov 2006 18:25 Edited at: 16th Nov 2006 18:25
Wow Ric! And in at well under 1000 lines. I suspect that can make it into the 20 line challenge if you work it.


Open MMORPG: It's your game!
Ric
22
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 16th Nov 2006 22:41 Edited at: 16th Nov 2006 23:55
Thanks guys! Haven't seen you here for a while R2 - thought you'd gone to the dark side for good! 20 lines ... think it'd be a push. I'm not quite sure how the 25 commands per line rule is enforced. If it really does mean commands - as in highlighted keywords, then I might be able to do it, but if 'y=1:x=3:z=5' counts as three commands even though they're not really commands, then you basically reach your limit after 500 non-compressed lines.

Besides, I won the 20 line challenge once already anyway - think I'll let someone else have a go!

RiiDii
21
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Inatincan
Posted: 17th Nov 2006 03:40
I've been lurking. Just no time to participate. And while you won the 20 Line challenge once, wasn't that nearly a year ago? Anyway, you might be right - it would be a tough squeeze.


Open MMORPG: It's your game!
Ric
22
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 17th Nov 2006 23:25
Am I right in thinking today is deadline day?

acelepage
22
Years of Service
User Offline
Joined: 2nd Jun 2004
Location: Plattsville
Posted: 18th Nov 2006 00:24
Today is the deadline day for the X&O challenge. Not sure what timezone the deadline is in. I am in GMT-5.

( 2b || !2b ), that is the question. The answer: true
Nicholas Thompson
21
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 18th Nov 2006 00:29
Good luck to all!

[center]
acelepage
22
Years of Service
User Offline
Joined: 2nd Jun 2004
Location: Plattsville
Posted: 18th Nov 2006 03:38
X & O Challenge Results.

Daemon:
interesting twist on the game. Playing 6 boards at once provided a change in strategy. I had to look at the code to figure out the game play. A bit of instructions would always be helpful. I was able to beat the computer.

Peter H:
nice visual board. Crisp display, highlighting the playing squares when making a move. Computer can play either X or O and has AI for both. I could not beat the computer.

RBurke:
I could not detect the AI at work. Sometimes I was allowed to make 2 moves in a row (suspect the computer played on a square already occupied?). Human vs Human worked fine.

Spopovich:
menu needs a feedback mechanism so the user can tell what s/he clicked. AI is good. Could not beat computer. I always had to go first.

Ric:
AI works well. Could not beat the computer. 4 and 5 row games seem impossible to win (probably why X&O only has 3 rows). AI consistent through all game options. Computer can play first, or second, but is always X. Anti-aliasing the X & O made them look like they were behind a layer of fog.
Note: I think the 4 in a row on a 6x6 grid would be interesting. There is a game called Pente which plays like that, with additional rules to allow removing opponent's pieces. Pente uses a large grid (12x12?)

The winner of the X&O challenge is:



( 2b || !2b ), that is the question. The answer: true
Ric
22
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 18th Nov 2006 11:35
Congrats Peter. Good to see quite a few entries for this challenge, too.

So ... what's next?

Peter H
22
Years of Service
User Offline
Joined: 20th Feb 2004
Location: Witness Protection Program
Posted: 18th Nov 2006 14:17
w00t! first time i've won one!

i'm leaving town in a hour, and will be gone for one day. and i don't really have any challenge in mind, so, any suggestions?

if ya'll don't want to wait until sunday someone else can pick the challenge (as long as i get to judge )

"One man, one lawnmower, plenty of angry groundhogs."
UFO
20
Years of Service
User Offline
Joined: 11th Oct 2005
Location:
Posted: 18th Nov 2006 15:09
Can't you just let Ric chose?

I don't want to wait until Sunday, because I am going on a trip to somewhere without internet access for a few days. I would like to know the challenge before I go.

Thanks.

Peter H
22
Years of Service
User Offline
Joined: 20th Feb 2004
Location: Witness Protection Program
Posted: 18th Nov 2006 15:35
*is walking out the door*

sure, ric please go ahead and choose.

"One man, one lawnmower, plenty of angry groundhogs."
Ric
22
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 18th Nov 2006 18:56
Okay - time for some quick thinking then ......



Right.

_____________________________________________________


*** New Challenge ***

Create a cursor effect.

Deadline: 2 weeks (Saturday 2nd December)

One example of a cursor effect is where you have a trail of images following the cursor around as you move it with the mouse. This can involve some physics aspects - like gravity and elasticity, or it could involve flocking AI, or particle effects.

Another example - I saw a nice cursor effect once where the cursor became a magnifying glass, and everything under it became enlarged and distorted.

Those are just examples, but there are no restrictions - it can be something completely original. So long as it involves use of the cursor in some way, and it is some kind of effect, then it is allowed.

Peter will be judging the entries, so I can't say what he will be looking for, but I would think one of the mains thing will be creativity.

I think two weeks will be plenty of time for this one.

Have fun. (oh, and I presume I'm still allowed to enter?)

Nicholas Thompson
21
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 18th Nov 2006 23:58
Ooo I really like this, and I think Ric should be allowed to enter as you're just choosing the challenge on behalf of the judge...

[center]
Phaelax
DBPro Master
23
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 19th Nov 2006 01:37
Do we really need a 2 week period for a cursor effect?
I was just thinking about when we first started the challenges they were only 2-3 days. Then again, thanksgiving is next week.

RiiDii
21
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Inatincan
Posted: 19th Nov 2006 08:24
Fun. Annoying. Short.




Open MMORPG: It's your game!
Nicholas Thompson
21
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 19th Nov 2006 15:23
haha... That'd be cool for a game - "DRUNK MODE!!!"

[center]
Ric
22
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 19th Nov 2006 16:40 Edited at: 19th Nov 2006 16:41
Quote: "Do we really need a 2 week period for a cursor effect"


I did wonder whether to shorten it to one week - but then once I started thinking about the possibilities, I figured that a mouse effect could actually get quite involved if you want it to. I was thinking about doing an aquarium, using a flocking algorithm to make the fish swim towards/away from the cursor. Could be a nice screen saver if it works.


@Rii


Quote: "Fun. Annoying. Short."


Well, two out of three anyway!

Crit
20
Years of Service
User Offline
Joined: 24th May 2006
Location:
Posted: 19th Nov 2006 21:20 Edited at: 19th Nov 2006 22:07
I like to follow this thread, but I never have time to enter. I still don't know if I'll have time to finish, so here's my entry.

edit: added trails.


CHESS ENCOUNTER
Demo
WIP
Peter H
22
Years of Service
User Offline
Joined: 20th Feb 2004
Location: Witness Protection Program
Posted: 19th Nov 2006 23:30
i'm backz, thanks ric, nice challenge! and yes, it would be anal not to let you enter.

"One man, one lawnmower, plenty of angry groundhogs."
RiiDii
21
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Inatincan
Posted: 20th Nov 2006 07:48
Quote: "Well, two out of three anyway!"

Hey! It's short. Just take out the extra spaces.


Open MMORPG: It's your game!
Ric
22
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 20th Nov 2006 14:44
Very true!

@Crit: Welcome to the challenges. How's your chess engine coming along? After the last challenge (noughts and crosses AI), I don't even want to think about how difficult writing a chess engine from scratch must be!

Crit
20
Years of Service
User Offline
Joined: 24th May 2006
Location:
Posted: 20th Nov 2006 19:56
Thanks for the welcome, Ric. I haven't worked on the chess ai in several months, mostly because I've been too busy, but also because I haven't had any lightbulbs over my head. My last few attempts ran too slowly for my taste.

CHESS ENCOUNTER
Demo
WIP
Diggsey
20
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 20th Nov 2006 22:44 Edited at: 20th Nov 2006 22:54
Here's my entry.

I named it crazy mouse, because it is pretty crazy!

See what happens when you try to move the the mouse horizontally, or vertically, or even diagonally!



Peter H
22
Years of Service
User Offline
Joined: 20th Feb 2004
Location: Witness Protection Program
Posted: 20th Nov 2006 23:34
nice sine waves

not so sure about how you wrap around when you hit a edge, kind of almost too annoying

"One man, one lawnmower, plenty of angry groundhogs."
NA170425
User Deleted
Posted: 21st Nov 2006 15:09 Edited at: 22nd Nov 2006 14:56
Here's my entry.



[edit]
If you click the button in the middle you win $1,000,000!

Peter H
22
Years of Service
User Offline
Joined: 20th Feb 2004
Location: Witness Protection Program
Posted: 21st Nov 2006 15:19 Edited at: 21st Nov 2006 15:19
lol


that's darling, but i think the goal of the competiton is more visual
Quote: "One example of a cursor effect is where you have a trail of images following the cursor around as you move it with the mouse. This can involve some physics aspects - like gravity and elasticity, or it could involve flocking AI, or particle effects.

Another example - I saw a nice cursor effect once where the cursor became a magnifying glass, and everything under it became enlarged and distorted."

rather then messing with the position of the mouse. (and the users brain!)

"One man, one lawnmower, plenty of angry groundhogs."
acelepage
22
Years of Service
User Offline
Joined: 2nd Jun 2004
Location: Plattsville
Posted: 21st Nov 2006 17:30
Thanks for the tip Peter H. I was working on an inertial system where the mouse slows to a stop after you stop moving it, but it looks like you're not looking for that kind of effect here.

( 2b || !2b ), that is the question. The answer: true
RiiDii
21
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Inatincan
Posted: 21st Nov 2006 17:57
That might actually make for a fun game. Kind of like the old Marble Madness. Try to control the momentum of the object (cursor), rather than the position.


Open MMORPG: It's your game!
acelepage
22
Years of Service
User Offline
Joined: 2nd Jun 2004
Location: Plattsville
Posted: 21st Nov 2006 18:13
Here's my entry. There is a click effect as well, but only when the red target circle is locked on. Of course, this will make no sense to you until you try it.



( 2b || !2b ), that is the question. The answer: true
Nicholas Thompson
21
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 21st Nov 2006 18:33
Ahh nice! A targeting-type system. Nice!

[center]
Daemon
20
Years of Service
User Offline
Joined: 16th Dec 2005
Location: Everywhere
Posted: 22nd Nov 2006 00:47
I couldn't come up with anything creative, so its just dots.

Left click and rightclick make them do different things.



qwe
22
Years of Service
User Offline
Joined: 3rd Sep 2003
Location: place
Posted: 22nd Nov 2006 01:44 Edited at: 22nd Nov 2006 01:51
^my favorite so far. right click is awsome. who says dots aren't creative?
acelepage
22
Years of Service
User Offline
Joined: 2nd Jun 2004
Location: Plattsville
Posted: 22nd Nov 2006 05:25
@Daemon,
Fascinating! Lots of different patterns can be achieved with a few simple movements.

( 2b || !2b ), that is the question. The answer: true
RiiDii
21
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Inatincan
Posted: 22nd Nov 2006 11:35
Here's some cursor fun. Okay, maybe it's window fun. Image the window is a big cursor, and it's all good.




Open MMORPG: It's your game!
UFO
20
Years of Service
User Offline
Joined: 11th Oct 2005
Location:
Posted: 22nd Nov 2006 21:55 Edited at: 23rd Nov 2006 19:58
Cool

Here's my first entry:



I'm going to add to this as my second entry, if I have time.

Edit: Fixed stupid bug

RiiDii
21
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Inatincan
Posted: 23rd Nov 2006 18:42 Edited at: 23rd Nov 2006 19:03
Here's one that plays with memblocks - always fun.



Slight variation



Edit: Another variation:




Open MMORPG: It's your game!
Diggsey
20
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 23rd Nov 2006 20:14
This is NOT an entry, but I just had to edit RiiDii's code a bit



Sven B
21
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 23rd Nov 2006 20:21 Edited at: 23rd Nov 2006 20:54
Hi guys!

This sounds like a fun challenge... I'll see what I can put together...

[EDIT]
I'll post this one. Might not be much, but I found it... well... funny



It's the programmer's life:
Have a problem, solve the problem, and have a new problem to solve.
RiiDii
21
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Inatincan
Posted: 23rd Nov 2006 20:23 Edited at: 23rd Nov 2006 20:30
Cool. Negative image.

Turn about is fair play.

BTW. Click mouse buttons & wheel to do stuff.




Open MMORPG: It's your game!
ThinkDigital
20
Years of Service
User Offline
Joined: 18th Aug 2005
Location: A galaxy far, far away...
Posted: 24th Nov 2006 02:22 Edited at: 24th Nov 2006 09:07
My entry. There is an object to it, I assume that's OK


ThinkDigital

I use Firefox 2
Zotoaster
21
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 24th Nov 2006 12:07
Here's my entry


Crit
20
Years of Service
User Offline
Joined: 24th May 2006
Location:
Posted: 24th Nov 2006 13:19
Looks like Riidii beat me to the punch with a magnifying cursor. Here's my version.



CHESS ENCOUNTER
Demo
WIP
Peter H
22
Years of Service
User Offline
Joined: 20th Feb 2004
Location: Witness Protection Program
Posted: 24th Nov 2006 14:16 Edited at: 24th Nov 2006 14:17
@Crit- actually RiiDii's was more of a offset glass... youts magnifies

One man, one lawnmower, plenty of angry groundhogs.
ThinkDigital
20
Years of Service
User Offline
Joined: 18th Aug 2005
Location: A galaxy far, far away...
Posted: 24th Nov 2006 15:54
Zotoaster - nice, but the lines are off. I tried it at 6:50 and when the number said 6:50, the lines were pretending that it was 9:50.

I use Firefox 2
Zotoaster
21
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 24th Nov 2006 16:00
I know, the hour one doesn't seem to work right atm

ThinkDigital
20
Years of Service
User Offline
Joined: 18th Aug 2005
Location: A galaxy far, far away...
Posted: 24th Nov 2006 16:02 Edited at: 24th Nov 2006 16:14
It'd actually be pretty easy to fix, just add enough to the rotation of the minute hand to make it constantly in the right place. That'd be the lazy way.

BTW: Are we allowed to make more than one entry?
Zotoaster
21
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 24th Nov 2006 16:43
Yeah.

Crit
20
Years of Service
User Offline
Joined: 24th May 2006
Location:
Posted: 24th Nov 2006 16:57
Here's my final submission for the magnifying glass.



CHESS ENCOUNTER
Demo
WIP

Login to post a reply

Server time is: 2026-07-21 09:13:14
Your offset time is: 2026-07-21 09:13:14