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
RiiDii
21
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Inatincan
Posted: 16th May 2005 13:57 Edited at: 16th May 2005 13:57
Bob, I thought the challenge was a good one too and I wanted to do more. This week though - bad week for any coding challenge.

"Droids don't rip your arms off when they lose." -H. Solo
REALITY II
IBOL
Retired Moderator
22
Years of Service
User Offline
Joined: 30th Mar 2004
Location: @IBOL17
Posted: 16th May 2005 15:03
rii, thanks. i liked your approach to it, with the effects of and on the wheels. we'll see what the next one produces. bob

http://astrumgames.com
completed games: Astrum Erus, Centipoid, Hero Of Garaven, WarpFlight, Higher Ground , Circular Breakout
Nicholas Thompson
21
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 16th May 2005 19:27
i really wanted to enter that - but like everyone else, time got the better of me...

My Website:
Ric
21
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 17th May 2005 03:48 Edited at: 17th May 2005 05:53
-- Challenge 17 --

_____________________________________________________________________

Challenge setter: Ric

The challenge:

Okay - here it is. It's specific, but has room for originality, it's simple, but has scope for complexity, it's a minigame challenge, it's ..............



It's also one classic I've not yet had a go at. Points will be awarded for:

Gameplay (10)
Style (10)
Originality (10)

Time limit: until Sunday night (22/5/05)

____________________________________________________________________

<edit> You can use this if you like:





Nicholas Thompson
21
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 17th May 2005 04:05
HEY HEY!!! Great idea!!

I think I might enter this one

This would be a good compo to practice animating a model.. or at least rotating a limb in a sine wave curve (the jaw)

My Website:
Neofish
22
Years of Service
User Offline
Joined: 7th Apr 2004
Location: A swimming pool of coke
Posted: 17th May 2005 04:31
My first exam is tomorrow so don't expect to see me entering

Pi = 8
Nicholas Thompson
21
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 17th May 2005 04:49
Good luck

My Website:
Ric
21
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 17th May 2005 05:10
@ Neofish: Hey, come on, what do you think resits are for?

Ric
21
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 17th May 2005 05:58
Just because I'm in a sharing mood, I've made an animated pacman sprite for anyone who wants it.



p.s. @Nick: trawling will commence soon - the weekend turned out to be shorter than usual!

Neofish
22
Years of Service
User Offline
Joined: 7th Apr 2004
Location: A swimming pool of coke
Posted: 17th May 2005 07:09
Thanks Nick, I have French orals tomorrow, then 2 days of art

Ric: I don't intend to pay to retake an entire year and then the paper of a subject I hate

Pi = 8
RiiDii
21
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Inatincan
Posted: 17th May 2005 16:39
Here's my start:



And anyone wants to use the 3D pac model, feel free. I'm still going to win this challenge.

"Droids don't rip your arms off when they lose." -H. Solo
REALITY II
Ric
21
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 18th May 2005 03:09 Edited at: 18th May 2005 07:33
Fighting talk. I like it!

Here's an alternative 3D pacman for people like me who hate vertex manipulation!



RiiDii
21
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Inatincan
Posted: 18th May 2005 04:12
Ric,
Heh-heh. Close. Needs some work.

"Droids don't rip your arms off when they lose." -H. Solo
REALITY II
Ric
21
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 22nd May 2005 09:04
Oh dear - this one looks doomed! Challenge too hard, or is everyone on holiday? Deadline is tomorrow, and it's looking like Rii is going to win by default!

Nicholas Thompson
21
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 22nd May 2005 09:09 Edited at: 22nd May 2005 09:23
I would enter, but lack of time...

I LOVE PACMAN!!

My Website:
IBOL
Retired Moderator
22
Years of Service
User Offline
Joined: 30th Mar 2004
Location: @IBOL17
Posted: 22nd May 2005 12:30
i would enter, but i don't want to win and have to pick another challenge right now.

http://astrumgames.com
completed games: Astrum Erus, Centipoid, Hero Of Garaven, WarpFlight, Higher Ground , Circular Breakout
Neofish
22
Years of Service
User Offline
Joined: 7th Apr 2004
Location: A swimming pool of coke
Posted: 22nd May 2005 18:41
I have my third GCSE tomorrow

Pi = 8
Ric
21
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 23rd May 2005 02:58
Quote: "I have my third GCSE tomorrow "


Excuses, excuses. What do you need to revise for? GCSE's are so easy these days!

Looks like Rii wins the Pacman challenge then. I kind of hope someone sets this one again some time in the future. Anyway, over to you Rii.

RiiDii
21
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Inatincan
Posted: 23rd May 2005 04:01 Edited at: 23rd May 2005 07:38
Default or not, here's what i have. Enjoy.



Edit: Ghost added and minor bug fix. Thanks Bob.

"Droids don't rip your arms off when they lose." -H. Solo
REALITY II
IBOL
Retired Moderator
22
Years of Service
User Offline
Joined: 30th Mar 2004
Location: @IBOL17
Posted: 23rd May 2005 04:42
that looks great rii! works great too. no ghosts yet, but probably easy to implement. bob

http://astrumgames.com
completed games: Astrum Erus, Centipoid, Hero Of Garaven, WarpFlight, Higher Ground , Circular Breakout
RiiDii
21
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Inatincan
Posted: 23rd May 2005 05:24 Edited at: 23rd May 2005 05:32
Okay, here's some ideas for the next challenge. Please vote for one or post your ideas.

1) Continue Pacman challenge: The challenge would be to either start a Pacman from scratch or build off the start I have (ghost object will be added and I can add remarks to help). The scoring would then be mostly on AI.

2) A Command Parser: The basic structure of a Command Parser (i.e. input interpreter for a text-based rpg game or the like). Scoring would be based on total number of possible commands and flexibility. Demo's would only need to demonstrate interpretation, not an actual game (although you could do a game if you wanted to).

3) RTS Basics UI and.or AI: Get a bunch of objects to obey the user's commands. Some functionality could include; user-friendly unit selection and direction, formations, resource collection, structure building, combat?, enemy detection.

4) 3D Object Primitives: Create new 3D Object Primitive functions (since 5.8 makes this a little easier). Links to helpfull posts will be included. Great way to learn how to use some of the new commands. Scoring would be on number of objects, plus points for good-looking graphics and usefulness, minus points for "excessive" polygon counts.

"Droids don't rip your arms off when they lose." -H. Solo
REALITY II
Neofish
22
Years of Service
User Offline
Joined: 7th Apr 2004
Location: A swimming pool of coke
Posted: 23rd May 2005 06:07
Quote: "What do you need to revise for? GCSE's are so easy these days!"

True, it's ICT so I need to revise how to be incorrect

Pi = 8
Nicholas Thompson
21
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 23rd May 2005 06:48
@Riidii:
Firstly, I tried your code and it didn't work. It just sits there at a blank screen. I thought it might be thinking about mesh creation, etc so I stared at the screen for about a minute and nothing happened, then Task Manager claimed it had stopped responding.. I user V5.8, have a 2.5Ghz machine with 1Gb DDR and a 6800GT so I cant imaging anything having to take TOO long (otherwise it would be a hoare for you to debug!!). Does anyone else have this problem?

As for those challenged, I MIGHT have a little time this week, although I'm going away on friday so maybe not, but for what its worth:
2,4,3,1

In that order.. I love the idea of a command parser - that would be a REALLY REALLY usefull snippet for people to use in their future games...

Nick

Btw: Well done Riidii for winning - you defeated some tough competition there

My Website:
RiiDii
21
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Inatincan
Posted: 23rd May 2005 07:44
@Nick:
No problems here. I even copied it from the post just to make sure. It worked for Bob too. The mesh commands are pre- 5.8, but they still work. There is a moment of blank while it does play with the mesh, but it shouldn't take more than a minute (even on a slow pc).

Quote: "Btw: Well done Riidii for winning - you defeated some tough competition there"

Thanks Nick! It does seem that I was able to defeat the one challenger no one else could: Time.

"Droids don't rip your arms off when they lose." -H. Solo
REALITY II
Neofish
22
Years of Service
User Offline
Joined: 7th Apr 2004
Location: A swimming pool of coke
Posted: 23rd May 2005 07:52
I like 2, if I wasn't so busy I would enter!

Pi = 8
IBOL
Retired Moderator
22
Years of Service
User Offline
Joined: 30th Mar 2004
Location: @IBOL17
Posted: 23rd May 2005 14:02
my votes:
2,3,1,4
i have been interested in a parser as of late, due to another thread, though haven't tried to do anything...i don't know if i'll enter...i'm trying to work up the nerve (and graphics and economic models) to continue with my main project...
rii's pacman definitely waited a while to get going, though it did work. i use 5.2
bob

http://astrumgames.com
completed games: Astrum Erus, Centipoid, Hero Of Garaven, WarpFlight, Higher Ground , Circular Breakout
RiiDii
21
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Inatincan
Posted: 24th May 2005 02:38 Edited at: 24th May 2005 02:41
Quote: "i have been interested in a parser as of late, due to another thread"

That's where I got the idea. It's a really nice thread over in the newcomer section if anyone wants to check it out.

Okay - here's the challenge:

Build a command parser structure and (at least) a minimal demo.

Scoring:
-7pts: Quantity of commands (1 pt per 100 commands, 5 pts maximum - I might adjust the ratio later, 'cause I have no real clue)
-7pts: Flexibility
-5pts: Additional AI
-3pts: Demo/Interface (0 pts for no demo. 3 pts for a full game demo)
-3pts: Remarks and/or documentation (3 pts for a tutorial)
-3pts: Bonus points for whatever might come up

28 points maximum total

Deadline: Monday, May 30th, 2005.

Edit: Here's the post.
http://forum.thegamecreators.com/?m=forum_view&t=53769&b=7

"Droids don't rip your arms off when they lose." -H. Solo
REALITY II
Ric
21
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 24th May 2005 02:57
That is good work on the pacman challenge rii - you are quite right, it was time that was the real competition - and you beat it. I'll probably continue with making my own pacman just for fun - I love that game!

As for the next challenge - I don't even know what a parser really is - this will be an education for me!

RiiDii
21
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Inatincan
Posted: 24th May 2005 02:59 Edited at: 24th May 2005 03:02
I'd also like to ask if we can "break a rule" for this compo:

A text file with parser data can be included. This would keep down the need to have 500 data statements.

Any thoughts?

Edit: I'm sure you do know Ric, just maybe not familiar with the term "parser". Follow the link and you'll recognize it immediately.

"Droids don't rip your arms off when they lose." -H. Solo
REALITY II
IBOL
Retired Moderator
22
Years of Service
User Offline
Joined: 30th Mar 2004
Location: @IBOL17
Posted: 24th May 2005 04:27
educating ric? nah...
i doubt media files will be allowed...unless you didn't actually have to download it, like if you put it in a seperate code box, and agreed everyone would call it splang.txt (or whatever).

i also think one point per 100 commands is WAY too much. who's going to write something for this in a week that uses 300-500 commands... i find that immediately restrictive (i'm not trying to be a jerk)
bob

http://astrumgames.com
completed games: Astrum Erus, Centipoid, Hero Of Garaven, WarpFlight, Higher Ground , Circular Breakout
RiiDii
21
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Inatincan
Posted: 24th May 2005 05:09 Edited at: 24th May 2005 05:30
Here's a sample parser code.



It's not much, but I'm not going for the prize. Also, the text is being a pain in the neck. If anyone can give me advise on how to make the text stick around long enough to read, I'd really appreciate it.

@ Ibol, this sample has 45 different commands (5x9) and I threw it together in about 2 hours. But I agree, even 100 commands would probably nearly double that time. So, at the rate I coded the sample, a person could code 250 commands in about 10 hours total, or 2 hours a day for 5 days. Judging by the last few comps, even this might be prohibitive. But there also has to be something to seperate the contestants.

So let's say 1 point for every 50 commands?
i.e 1-50=1pt; 51-100=2pts; 101-150=3pts; 151-200=4pts; 201+ =5pts.
And the limit is to prevent someone from winning the comp by ONLY adding more commands.

Edit: <Reponse to post below>: Yeah, I probably should have worded it better than I did. Maybe I should say "1 point for every 50 combinations."

Edit 2: It's funny, just the other day I helped someone get their input and sync command to work. Now I can't get mine to work. Talk about frustrating.

"Droids don't rip your arms off when they lose." -H. Solo
REALITY II
IBOL
Retired Moderator
22
Years of Service
User Offline
Joined: 30th Mar 2004
Location: @IBOL17
Posted: 24th May 2005 05:24 Edited at: 24th May 2005 05:26
oh, i mistook 'commands' for 'keywords'...
you're saying the total number of things you can do...like
'make' counts as a command for each thing that can be 'made' with it, not just as a single word...ok,
i very much see your point...bob.

ps: i moved the sync around, but to no avail...the problem is with the nature of the input command...it behaves differently than anything else.

http://astrumgames.com
completed games: Astrum Erus, Centipoid, Hero Of Garaven, WarpFlight, Higher Ground , Circular Breakout
RiiDii
21
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Inatincan
Posted: 26th May 2005 02:39
Okay - are we dying here??
Suddenly, no on is interested in Parsers??
No one has time??
Everyone is doing the puzzle compo??

Hello??

"Droids don't rip your arms off when they lose." -H. Solo
REALITY II
IBOL
Retired Moderator
22
Years of Service
User Offline
Joined: 30th Mar 2004
Location: @IBOL17
Posted: 26th May 2005 06:09
yeah, i feel the same way...no one cares ... whether it's
"right now" or "anymore", i don't know... i'm honestly not
working on this right now...i've got my own problems...it's not the challenge...bob.

http://astrumgames.com
completed games: Astrum Erus, Centipoid, Hero Of Garaven, WarpFlight, Higher Ground , Circular Breakout
Nicholas Thompson
21
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 26th May 2005 08:15
I agree its not the challenge - I think everyone has suddenly had an upsurge in their personal life.

I would REALLY REALLY like to enter this, but I have been so busy up till now that my PC hasn't even been on! Such a shame really...

My Website:
Philip
23
Years of Service
User Offline
Joined: 15th Jun 2003
Location: United Kingdom
Posted: 26th May 2005 09:01
I would REALLY REALLY like to enter this as well, only I can't be bothered.

Cheer if you like bears! Cheer if you like jam sandwiches!
P3.2ghz / 1 gig / GeForce FX 5900 128meg / WinXP home
RiiDii
21
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Inatincan
Posted: 26th May 2005 10:09
Maybe a small break is in order, two or three weeks?

"Droids don't rip your arms off when they lose." -H. Solo
REALITY II
Nicholas Thompson
21
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 26th May 2005 10:38
Man with a plan = Riidii

My Website:
Phaelax
DBPro Master
23
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 26th May 2005 12:12 Edited at: 26th May 2005 12:13
attached is a screenshot of my current parser. also, if we really wanna go towards that RTS challenge......


PETA - People for the Eating of Tasty Animals
RiiDii
21
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Inatincan
Posted: 26th May 2005 15:00
Phaelax, can you post a sample text file to run with it?

"Droids don't rip your arms off when they lose." -H. Solo
REALITY II
robo cat
22
Years of Service
User Offline
Joined: 23rd Feb 2004
Location: In a cat litter tray, near you...
Posted: 26th May 2005 21:31 Edited at: 26th May 2005 21:34
Suppose its a little bit cheating to submit code I entered for a previous challenge (the 2D drawing one) but it was actually more of a parser:



Last time, no-one knew how to use it so heres an explanation...

In a text file simply write the commands present in the 2D graphics section of DBPro, such as the command below:

circle 5, 5, 30

as you would in a darkBASIC source file.

The advantage is that you can use this function to perform all the drawing commands in the file to the screen and you can offset the origin (so if you had commands for drawing a car you could move it around) and also scale the image drawn in the file about the origin.

The parameter filenumber is just an unused file number in your program. It closes it afterwards.

If that hasn't explained it well enough then please say.

Simple... yet fun!
Nicholas Thompson
21
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 26th May 2005 22:29
cool! That gives me an idea.. IF only it gave me time or the ability to time travel too.. :-(

I'm thinking a Logo clone Maybe even a 3D Logo Clone

For those who are too young or too forgetfull to remember Logo, It was a language you used to draw simple 2D images using commands like:

FD 10
RT 90
FD 10
RT 90

Thats forward 10, Turn Right 90, forward 10, Turn Right 90.

My Website:
RiiDii
21
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Inatincan
Posted: 27th May 2005 03:36
Apple IIe? Turtle? Logo? Oh oh It's scary - I remember!

Do it Nic!

Here's a time travel device I use regularly. Feel free to use it too - just don't use it too often;

It's fairly large and typically has 4 legs and stands about 3 feet high. It has very soft and comfortable area to position the time traveler during the journey. Often, this time machine comes with additional travel comfort devices which are soft and designed to protect one's head during time travel. When ready, simply climb into the time travel device. The nature of the time travel device is such that when the device leaps forward in time, the occupant is rendered unconscious. This is not an uncomfortable experience, and is often described as "quite pleasent." It's often useful to set a time-destination alert device, often located near the time machine, to stop the travel through time at the appropriate time-destination. One limitation of the device is that it's unidirectional. Reverse travel is currently being researched by fellow time travellers.

"Droids don't rip your arms off when they lose." -H. Solo
REALITY II
Ric
21
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 27th May 2005 05:14
Now I see what a parser is! See, I said it would be educational! I'm going to write one this weekend - it will be really rubbish most likely, but I'm determined to keep the challenges alive and kicking!

IBOL
Retired Moderator
22
Years of Service
User Offline
Joined: 30th Mar 2004
Location: @IBOL17
Posted: 27th May 2005 06:23
my girlfriend has just left for 5 days, and i'm not going to work...
maybe i'll write one too! bob.

http://astrumgames.com
completed games: Astrum Erus, Centipoid, Hero Of Garaven, WarpFlight, Higher Ground , Circular Breakout
RiiDii
21
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Inatincan
Posted: 27th May 2005 08:00
@ Robo cat, can you include a demo please?

"Droids don't rip your arms off when they lose." -H. Solo
REALITY II
Phaelax
DBPro Master
23
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 27th May 2005 14:19
Just copy this into a text file. I believe this was the same file I used in my example.


PETA - People for the Eating of Tasty Animals
Neofish
22
Years of Service
User Offline
Joined: 7th Apr 2004
Location: A swimming pool of coke
Posted: 28th May 2005 03:21
Woot for logo

I don't think we should have a break since I have a little more time to code, since it's the holiday

Pi = 8
robo cat
22
Years of Service
User Offline
Joined: 23rd Feb 2004
Location: In a cat litter tray, near you...
Posted: 28th May 2005 19:08 Edited at: 28th May 2005 19:09
Heres an example for a smily face:

circle 0, 0, 50
dot 20, -20
dot -20, -20
line -20, 20, -10, 30
line -10, 30, 10, 30
line 10, 30, 20, 20
line 0, 3, 0, -3

Put it in a file and then you can paste it to the screen (scaled and positioned) using the function.

Simple... yet fun!
IBOL
Retired Moderator
22
Years of Service
User Offline
Joined: 30th Mar 2004
Location: @IBOL17
Posted: 30th May 2005 14:11
isn't this one over today? are we taking a hiatus? bob.

http://astrumgames.com
completed games: Astrum Erus, Centipoid, Hero Of Garaven, WarpFlight, Higher Ground , Circular Breakout

Login to post a reply

Server time is: 2026-07-01 01:59:21
Your offset time is: 2026-07-01 01:59:21