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
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Inatincan
Posted: 23rd Oct 2005 05:14 Edited at: 23rd Oct 2005 05:15
Okay - my fireworks are bit more firework-ish, but I stuck with the nuke-effect.

This is an annual galactic celibration of the Ventian Treaty, which bans all races from possessing any nuclear weapons, bringing peace to the galaxey. All races get together and set off hundreds of nuclear weapons for this celibration.




Open MMORPG: It's your game!
RiiDii
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Inatincan
Posted: 23rd Oct 2005 05:22
Looks like Ric has built this demo on a lot of past work. The blur is from the perspective challenge.


Open MMORPG: It's your game!
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 23rd Oct 2005 07:31 Edited at: 23rd Oct 2005 07:33
I like Ric's, but I think Nicolas' fireworks demonstrate more accurate physics. In Ric's, I can see where the particles stop expanding and just kinda hover there for a moment. r2d2, yours pauses a lot on me when it creates a new explosion.

I just remembered a program I did in Classic a long time ago. You'd draw a shape with a block of DATA statements, then particles explode out and form the shape.


Deadly Night Assassins
Nicholas Thompson
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 23rd Oct 2005 14:03
Ooo its deadline today!!

Ric
20
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 23rd Oct 2005 17:50
Final final version. Again, nothing major, just tweaking. New blurring technique which looks better and runs faster.



Tinkergirl
21
Years of Service
User Offline
Joined: 1st Jul 2003
Location: United Kingdom
Posted: 23rd Oct 2005 20:24
RiiDii - very nice 'nuclear fireworks' They do slow down like beasts at the initialising of a new blast, but despite that, it's very grand and gives a nice sense of being massive. Good colours too.

Ric - again, very good. You've got the colours working much better now!

This is going to be hard as heck to judge once you're all done, in just under 2 hours

And I'm always scared of last minute entries...
Tinkergirl
21
Years of Service
User Offline
Joined: 1st Jul 2003
Location: United Kingdom
Posted: 23rd Oct 2005 22:12
Time's up, gentlemen. Judging will be commencing shortly...
CPU
21
Years of Service
User Offline
Joined: 4th Jul 2003
Location: Carlsbad, CA
Posted: 23rd Oct 2005 22:47
Hoo haa... have fun tinkergirl!

Perhaps I'll have time for the next competition, we'll have to see depending on how much school I have left to do

CPU

[center]K-OS Battlefields
IS
///---///---///---UNDER CONSTRUCTION---\\\---\\\---\\\
[center]
Tinkergirl
21
Years of Service
User Offline
Joined: 1st Jul 2003
Location: United Kingdom
Posted: 23rd Oct 2005 23:06 Edited at: 23rd Oct 2005 23:07
Excellent entries for this one - well done all four for your attempts!

Dave: great start and the sheer number of effects were amazing. Great colours and good use of 2d.

Nicholas: loved the projectile look of your fireworks, the late addition of the Ric-inspired city was good and lent it some scale. The flashing was muted but nice when you noticed it.

RiiDii: very nice 'nuclear fireworks' as I said earlier. It does slow down when it creates a new blast, but it's quite a different fireworks pattern, combining the shell of Rics and your earlier work with the nuclear blast.

Ric: your last version ran fast, but it looked good doing it. You got your colours sorted and nice and bright. The sound was great (in small measures) and the city was a master touch that inspired others

So - the final verdicts - (as there are four, I'll do four)

Fourth -


Third -


Second -


Which means that in first -


And well done everyone! I almost hope I don't win another of these if it's going to be so hard to judge all the time!

Winner - your turn to set the challenge
Nicholas Thompson
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 23rd Oct 2005 23:28
Well done Ric!! Lets keep up the run of interesting challenges!

Ric
20
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 24th Oct 2005 00:14
Cheers Nick, and thanks TG. Good challenge, great entries all round, and great reviews to round it all off!

Give me a few hours to think up something good for the next one! Will post either tomorrow morning or tonight if I have any inspiration before I go to bed!

Nicholas Thompson
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 24th Oct 2005 01:07
If I had won, I was thinking of a GUI type challenge. Just like Windows XP has a GUI for users to.. well.. "use" the system, it might be quite a cool exercise to make some kind of file system browsing GUI which could implement special effects like MacOSX does (the genie minimize, etc)

In turn - this could be made so users can use it for their own games (like a nice save game screen?).

Just an idea..

What else can I think of... How about a Micro Machines type game? Overhead car racing with emphasis on "AI" controlling the cars around a track. Problem with that could be track design?

Hmm.. Track design.. What about some kind of 2D Tile map generator? I've made a very basic one here

Dave1974
20
Years of Service
User Offline
Joined: 1st Aug 2004
Location:
Posted: 24th Oct 2005 01:20
Well done Ric, Nicolas and RiiDii.

I have enjoyed this challenge, and look forward to the next one.
RiiDii
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Inatincan
Posted: 24th Oct 2005 02:47
You too Dave and Nic. Darn you Ric - I'll catch back up to you someday.


Open MMORPG: It's your game!
Tinkergirl
21
Years of Service
User Offline
Joined: 1st Jul 2003
Location: United Kingdom
Posted: 25th Oct 2005 00:11
Maybe you'll be able to claw one back with the next challenge, RiiDii

You two are far too good anyway
CPU
21
Years of Service
User Offline
Joined: 4th Jul 2003
Location: Carlsbad, CA
Posted: 25th Oct 2005 01:52
Arrr... Let me at em!

I'll see if I can give rii a run for his money, depending on what Ric comes up with!

CPU

[center]K-OS Battlefields
IS
///---///---///---UNDER CONSTRUCTION---\\\---\\\---\\\
[center]
RiiDii
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Inatincan
Posted: 25th Oct 2005 02:00
I have money? Wooohooo!!!!


Open MMORPG: It's your game!
Ric
20
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 25th Oct 2005 02:11
New Challenge: Make a Clock!

Easy enough for newcomers to have a go at, whilst offering plenty of scope for the experts - this can be approached from any direction you like. Just incase you didn't know, the command 'get time$' will get the time from your system clock. For example,



will print the time to the screen.

Where you go from there is up to you. Judging will be based on creativity and style - and the one I would most want to use as my screensaver!


Time limit: 1 week (until Monday night, 31st October).

Ric
20
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 25th Oct 2005 02:15
Some ideas to get you thinking:

Digital clock.
Analogue clock.
Grandfather clock.
Big Ben.
Cuckoo clock.
Marble run clock thing.
Sun dial.


Dave1974
20
Years of Service
User Offline
Joined: 1st Aug 2004
Location:
Posted: 25th Oct 2005 02:54
Just to get the ball rolling.

Ric
20
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 25th Oct 2005 04:38 Edited at: 25th Oct 2005 04:54
Good start Dave! Although - it doesn't show the correct time, it lloks like it shows the value of the timer. To extract the values of hours, minutes and seconds from the 'get time$()' command, you could do this:



Incorporated into your code, if you don't mind me playing around with it a bit, you'd get something like this -



RiiDii
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Inatincan
Posted: 25th Oct 2005 04:47
Okay - here's a teaser start. The time in the upper left corner is there just for debugging purposes.

Some notes:
The water wheel always turns at one cup / second regardless of frame rate.
The strap (which will connect to something else later) is actually a particle effect. I certainly could have done a single object with a scrolling texture, but I wanted to try something different.




Open MMORPG: It's your game!
CPU
21
Years of Service
User Offline
Joined: 4th Jul 2003
Location: Carlsbad, CA
Posted: 25th Oct 2005 04:48
Ric - Are we allowed to use, erm, extra dll's like say DavidT's time commands dll?

CPU

[center]K-OS Battlefields
IS
///---///---///---UNDER CONSTRUCTION---\\\---\\\---\\\
[center]
RiiDii
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Inatincan
Posted: 25th Oct 2005 05:00 Edited at: 25th Oct 2005 05:01
No dll's. That's been the rule from day 1.


Open MMORPG: It's your game!
Ric
20
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 25th Oct 2005 05:01
@Rii - that's fast work! Looking good so far - I love the idea of a water wheel clock!

@CPU - Sorry, no dll's allowed. It's been debated before - so I won't go into it again now - but I'm curious to know why you'd want a dll anyway? Surely the 'get time$()' command will give you all the time information you need, won't it?

CPU
21
Years of Service
User Offline
Joined: 4th Jul 2003
Location: Carlsbad, CA
Posted: 25th Oct 2005 05:13
- definantly see where your comming from, and I'll shut my mouth about the dll but realy though, the DBPro time commands (DavidT) give you much more flexibility over it, for instance, it allows you to retrieve everything from the current second to the current day of the year, the year, if daylight savings is in effect, if it's leap year, what year it is . And then to round it all off it allows you to 'format a string' so that you can put a % sign and then a letter code after it and it can put things in like, the string representation of the day (monday, tuesday, ...) or anything else... it's rather powerfull for something like this...

But anyways, must get the cognative wheels rolling...

CPU

[center]K-OS Battlefields
IS
///---///---///---UNDER CONSTRUCTION---\\\---\\\---\\\
[center]
xCept
21
Years of Service
User Offline
Joined: 15th Dec 2002
Location:
Posted: 25th Oct 2005 08:27
Sounds like a fun contest!
RiiDii
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Inatincan
Posted: 25th Oct 2005 08:31 Edited at: 25th Oct 2005 09:29
It's as fun as everyone makes it.

Here's some more fun... Added a few more features. You can zoom in and zoom out by using the up and down arrow keys.




Open MMORPG: It's your game!
Nicholas Thompson
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 25th Oct 2005 11:51
nice one riidii! Try putting:


In there just after you setup the body of the clock. Looks really nice when semi-transparent!

Dave1974
20
Years of Service
User Offline
Joined: 1st Aug 2004
Location:
Posted: 25th Oct 2005 13:08
Oops. I forgot to offset the timer by the current time.

When you boot up around midnight to check the challenge thread, the timer function is going to be fairly close to the real time.

Nicholas Thompson
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 25th Oct 2005 14:08
the timer() function actually represents the time the system has been "online". I checked that today hoping it would be from 00:00:00, but alas it isn't.

I did some simple maths on the timer to convert it to hours (divided by 1000 to get seconds, divided by 60 to get minutes and then 60 again for hours). This gave me 85 hours + the fraction. 85 hours is the same as 3 days and 13 hours which is how long my computer has been on without a reboot.

My theory was to convert the current time to milliseconds and also make a note of the timer when the program loads. I then can calculate a relative offset for the timer() function so I can get an accuracy of milliseconds for very little extra maths. I have some cunning idea's....



Ric
20
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 25th Oct 2005 14:56
Quote: "My theory was to convert the current time to milliseconds and also make a note of the timer when the program loads. I then can calculate a relative offset for the timer() function so I can get an accuracy of milliseconds for very little extra maths."


Ooh - nice idea! Sorry, couldn't help myself - had to have a go myself!!





BTW: I liked the overhead racing game idea - but as the challenge setter, I wouldn't have been able to make my own official entry! Someone else will have to set that one so that I can have a go at winning it!!

Nicholas Thompson
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 25th Oct 2005 15:22
not bad Ric - but I was thinking more efficiently. You only need to work out the offset at startup. Hopefully time is constant enough for it to stay in sync - unless your PC is moving at close to the speed of light at which point we'll need to move from Newtonian physics to the Theory Of Relativity... Err... I'll stop now...

Nice work tho Ric!

Ric
20
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 25th Oct 2005 16:40
I think I see what you mean - not quite sure how you'd measure the offset accurately though if you just checked the current time once at start up - given that the get time command is only accurate to the nearest second. I think you'd need to keep checking the value of the current time until it moves to the next second, ie. when the number of milliseconds is zero - before you let the timer take over.

@Rii - looking great! Are you going to adgust the gear ratios so that each cog represents seconds, minutes hours?

RiiDii
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Inatincan
Posted: 25th Oct 2005 18:55
Quote: "@Rii - looking great! Are you going to adgust the gear ratios so that each cog represents seconds, minutes hours?"

Ummm.... yeah.... sure....

Actually, I was thinking along those lines. Not sure if I want to go through that much work. I was going to add a lever off of one of the gears that could click once a second and rotate another set of gears to the second hand. I was also considering adding the physics developed from the robot hand challenge to actually make the gears interact with each other. But I really do not have the time for all that coolness at the moment.


Open MMORPG: It's your game!
Ric
20
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 26th Oct 2005 00:02
Here's a basic 3d analogue clock, using 4 transparent planes - one for the dial, and one for each of the three hands, rotated through the appropriate angle. Not many points for creativity, but it might be useful for some people to look at the code, as I've remarked it quite thoroughly:



Segan
19
Years of Service
User Offline
Joined: 28th Aug 2005
Location: Canada
Posted: 26th Oct 2005 06:28
Well, here is another idea for all of you serious contest entrants:

A useful alarm!



A quick beware though: I just whipped this up in a couple of minutes and didn't put any error checking into it, so don't input values it doesn't like!

I may actually make a more complete entry if I have the time. This post is just a quicky to get the rest of you thinking.
Ric
20
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 26th Oct 2005 16:22 Edited at: 26th Oct 2005 16:51
Nice idea - although I think you need a 'sync' after the 'rinnnnngggg' otherwise the screen just freezes without displaying anything. Even better would be to use the createsound() function to play a beep or something! Give me a minute, and I'll show you......

...... something like this:



Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 26th Oct 2005 23:47
hmm, im outa town until sunday night. I do have my laptop with me, but its a Mac! I suppose I could try and make something, but I'll need someone else to test the code for me to fix any dumb typing mistakes I'll probably make.


Deadly Night Assassins
Nicholas Thompson
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 27th Oct 2005 00:47
Wow - thats a challenge... Compiler-less coding!! Good luck!

Kaiyodo
19
Years of Service
User Offline
Joined: 24th Aug 2005
Location: UK
Posted: 27th Oct 2005 00:51
Hi all!

Thought I'd actually have a go at one of these challenges for once. I've been playing around with flocking code recently and had the bizarre idea to make a flocking clock!

There are some keys to control the visuals:-
1 - Switch between sphere and cube particles
2 - Rotate the particles (only useful for cubes really
3 - Toggle fading of the particles (which stops me being able to colour them oddly)
Page Up - Zoom in
Page Down - Zoom out

And that's about it. Hopefully the code will turn up ok, last time I looked I was still a moderated user.



Kaiyodo
Segan
19
Years of Service
User Offline
Joined: 28th Aug 2005
Location: Canada
Posted: 27th Oct 2005 01:57 Edited at: 27th Oct 2005 01:58
@Ric: What??? I missed SYNC!?! (Darn typing errors )

Oh, and I was thinking about a sound too, but I didn't have time to figure out the createsound function last night...Plus, you're such a pro at it that I might as well let you do it

@Kaiyodo: That is pretty sweat there! The way the numbers change is very creative. My only crit is that the balls take long enough to get to their positions that I rarely ever see the last number actually form. (Messing with the variables at the top though fixed this for me)
RiiDii
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Inatincan
Posted: 27th Oct 2005 02:55 Edited at: 27th Oct 2005 20:49
@Kaiyodo: That's great! I agree with Segan on the particles taking too long to get to where they are going (and I thought it was my slow pc).


Open MMORPG: It's your game!
Ric
20
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 27th Oct 2005 04:05 Edited at: 27th Oct 2005 04:07
Flockin'clockin'tastic!! That's one funky piece of code, Kaiyodo, and welcome to the challenges by the way! Haven't studied it in depth yet, but the code looks very neat and well remarked.

@Rii and Segan - check line 36 and line 37 ... OMPC (Iguess it must be processor speed related?), I need to set the particle speed and turn speed quite high to get the last digit to form within the space of the second it takes to change to the next one - ie.



It looks very much like spring physics - the greater the distance the particle is from its destination, the greater the force that pulls it to the destination. Gives some really 'springy' effects if you set the turn speed (gRotSpeed#) too low!

Nice work!

TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 27th Oct 2005 06:27
Not as ingenious as the other entries, but I only had an hour spare, so I decided to go for the minimalistic look!



TDK_Man

Ric
20
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 27th Oct 2005 13:39
That's pretty cool actually! Extending the idea of the previous digit falling back down smoothly, it might be nice if the digits moved across even more smoothly, like in a wave, where the crest of the wave represnts the current digit. Just a thought.

Kaiyodo
19
Years of Service
User Offline
Joined: 24th Aug 2005
Location: UK
Posted: 27th Oct 2005 15:45
I've just updated my flocking clock so that the particles used in the seconds move faster than the other numbers. Setting all of the particles to a faster speed made it look a bit hectic for my liking



Kaiyodo.
Freddy 007
19
Years of Service
User Offline
Joined: 30th Nov 2004
Location: Denmark
Posted: 27th Oct 2005 20:34
Holy mother of Bob! Theese entries are awesome!

Nicholas Thompson
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 27th Oct 2005 22:06
TDK - Rics Idea could easily be done with Curve value? I might have a go tonight

Thats frickin excelent though!

Philip
21
Years of Service
User Offline
Joined: 15th Jun 2003
Location: United Kingdom
Posted: 28th Oct 2005 01:16
Kaiyodo's flocking clock is: (1) great; and (2) a wonderful demonstration of how even 2d vectors can be used in the simplest code.

Cheer if you like bears! Cheer if you like jam sandwiches!
P3.2ghz / 1 gig / GeForce FX 5900 128meg / WinXP home

Login to post a reply

Server time is: 2024-11-27 10:16:48
Your offset time is: 2024-11-27 10:16:48