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
Latch
19
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 28th Aug 2007 00:58
It sounds harder than it is.

In the most basic form, if it were done in 2d, the main object would have some x and y position. Compare that to any chasing object's x and y.

if chase x < main x then inc chase x
if chase x > main x then dec chase x

same for y.

Enjoy your day.
Insert Name Here
19
Years of Service
User Offline
Joined: 20th Mar 2007
Location: Worcester, England
Posted: 28th Aug 2007 01:06
That bits obvious, 'tis just the lookin' bit.

All those using the old version of this image must change to this image immediately.
Latch
19
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 28th Aug 2007 01:15
I can't think of any more clues that won't give away the whole challenge...

Enjoy your day.
Pixelator
18
Years of Service
User Offline
Joined: 8th Jul 2007
Location: here
Posted: 28th Aug 2007 04:15
@ obese87

http://golly.sourceforge.net/

a CA!!! (like your thing)
try it!!! it is really cool

how do i put an image here?
Libervurto
19
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 28th Aug 2007 13:14 Edited at: 28th Aug 2007 13:15
@Pixel
Thanks, looks awesome

Your signature has been erased by a mod because it was rubbish.
Insert Name Here
19
Years of Service
User Offline
Joined: 20th Mar 2007
Location: Worcester, England
Posted: 28th Aug 2007 14:13
I've started on my entry, but so far you can only lose. The boxes are funnily stupid though.

Acording to Grandma, I am now enemy of the evil republic, who captured Paris Hilton and couldn't manage it.
Libervurto
19
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 28th Aug 2007 14:32
@Pixel
Woah! That is mind blowing
I can't believe what I've just seen!

Your signature has been erased by a mod because it was rubbish.
Insert Name Here
19
Years of Service
User Offline
Joined: 20th Mar 2007
Location: Worcester, England
Posted: 28th Aug 2007 14:34
What did you see? Tell us!!

Acording to Grandma, I am now enemy of the evil republic, who captured Paris Hilton and couldn't manage it.
Libervurto
19
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 28th Aug 2007 14:42
That golly thing that Pixel posted, some of the things are unbelievable!
Very cool

Your signature has been erased by a mod because it was rubbish.
Dark Dragon
18
Years of Service
User Offline
Joined: 22nd Jun 2007
Location: In the ring, Kickin\' *donkeybutt*.
Posted: 28th Aug 2007 16:40
cool challange. sounds like mario(the ghosts in the house...you know....)
Comrade Robski
20
Years of Service
User Offline
Joined: 12th Sep 2005
Location:
Posted: 28th Aug 2007 17:53
Obese87> My first entry in this thread many months ago was the 'Make a House' competition - My house had a persian rug made using a similar effect to the one you are playing with now
Libervurto
19
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 28th Aug 2007 19:40
Oh yeah, I remember that from when I looked through this thread about a month ago.

Your signature has been erased by a mod because it was rubbish.
Pixelator
18
Years of Service
User Offline
Joined: 8th Jul 2007
Location: here
Posted: 29th Aug 2007 04:09
@obese87
Quote: "@Pixel
Woah! That is mind blowing
I can't believe what I've just seen!"


i think so too, i am experimenting on making my own stuff(wish me luck)

"tada, and now my sig: AND NOW MY SIG(hint hint):
sorry we seem to be experiencing technical difficulties... oh and the sig is missing."
Dark Dragon
18
Years of Service
User Offline
Joined: 22nd Jun 2007
Location: In the ring, Kickin\' *donkeybutt*.
Posted: 29th Aug 2007 16:48
woah, this challange is tough!
Insert Name Here
19
Years of Service
User Offline
Joined: 20th Mar 2007
Location: Worcester, England
Posted: 29th Aug 2007 19:31
Tell me about. I think I have the solution...

Acording to Grandma, I am now enemy of the evil republic, who captured Paris Hilton and couldn't manage it.
Dark Dragon
18
Years of Service
User Offline
Joined: 22nd Jun 2007
Location: In the ring, Kickin\' *donkeybutt*.
Posted: 29th Aug 2007 19:33
hmmm....static line of sight might help...
Insert Name Here
19
Years of Service
User Offline
Joined: 20th Mar 2007
Location: Worcester, England
Posted: 29th Aug 2007 19:49
Possibly, but static is... static.

Acording to Grandma, I am now enemy of the evil republic, who captured Paris Hilton and couldn't manage it.
Dark Dragon
18
Years of Service
User Offline
Joined: 22nd Jun 2007
Location: In the ring, Kickin\' *donkeybutt*.
Posted: 29th Aug 2007 19:51
Latch
19
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 30th Aug 2007 07:54
I've included an example attachment that has particles migrate towards the mouse pointer. There are a couple thousand of them and they move at different speeds. Press and hold the left mouse button to make them flee from the pointer.

The actual function that plots their positions towards and away from the pointer is only 7 commands (no multiple commands on a single line). I use the mouse click as a trigger for the run away just because I was testing an idea I had to move the particles in the opposite direction. I liked the effect so I kept it in. The trigger could have just as well been a movement in a different direction, collision, a distance comparison, pretty much anything.

Let many particles collect at the mouse position, then hold the left button and watch what happens.

Enjoy your day.
Libervurto
19
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 31st Aug 2007 03:23 Edited at: 31st Aug 2007 15:45
I have a feeling I'm going to finally use TANGENT wooh!
That's awesome Latch!
Reminds me of when you get stuck to a cobweb and can't get it off

Here's my first entry


Your signature has been erased by a mod because it was rubbish.
Libervurto
19
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 31st Aug 2007 22:37 Edited at: 31st Aug 2007 22:39
Woooh! never used ATANFULL before, and I don't understand it, but hey it works . See that's why you use the Help file

When's the deadline Latch?

[edit]
oops, sorry guys didn't mean to double post there.
deadline is midnight GMT Monday 10th September. Does that mean 00:00am on Tues 11th? I know some people got confused last time

Your signature has been erased by a mod because it was rubbish.
Latch
19
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 1st Sep 2007 01:00
@Obese

Entry looks good! I got a chuckle at how the circles run away. That little line gives them a bit of character.

In your distance function, you can save a bit of processing power by removing the ABS() calls. Keep the subtraction though. If you are squaring 2 numbers the result will be positive no matter what, so it's unnecssary in this case. It's no big deal, but those extra function calls slow things down and can add up with a lot of computation.

Quote: "midnight GMT Monday 10th September. Does that mean 00:00am on Tues 11th? "


Very late on Monday 10th and very early on Tuesday.

Enjoy your day.
Libervurto
19
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 1st Sep 2007 01:56 Edited at: 1st Sep 2007 02:03
thanks Latch, yeah I was kind of in a muddle with the ABS and stuff forgot that squares are positive. I like efficient code so don't feel you are putting me down by pointing out stuff , thanks.

I'm thinking of making a whole game out of the shepherding thing

[edit]
here it is without the ABS's


I like programs like this, I haven't done any fixes it just works because of the maths

Your signature has been erased by a mod because it was rubbish.
roddman
18
Years of Service
User Offline
Joined: 24th Jul 2007
Location: Over There
Posted: 1st Sep 2007 03:01 Edited at: 1st Sep 2007 03:03
Quote: "Woooh! never used ATANFULL before, and I don't understand it"


ATANFULL may sound confusing because of it's name but this simple function I made does the exact same thing. I tested the function and it even returns the exact same value. I like to see if I can create functions that do something useful whenever I can.



Cory
Latch
19
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 1st Sep 2007 05:53
@roddman

Nice.

That's classic slope.

slope = tan(theta) = y2-y1/x2-x1
theta = arctan(slope)

Enjoy your day.
Libervurto
19
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 4th Sep 2007 03:57 Edited at: 4th Sep 2007 04:09
I didn't think this was worthy of it's own thread:
Does anyone know if you can do recurring numbers in DB?
I'm making an Isometric game and I need 0.66 recurring for it to be perfect. If I make a variable TwoThirds# =2/3 would that give me a recurring number?

[edit]

While I'm on a hijacking moment, here's my custom LINE function, if you want to use it that's OK with me
These images were drawn using the same co-ordinates.




In programming, nothing exists
roddman
18
Years of Service
User Offline
Joined: 24th Jul 2007
Location: Over There
Posted: 4th Sep 2007 04:45
Quote: "If I make a variable TwoThirds# =2/3 would that give me a recurring number"


It should, but when I tested the variable TwoThirds# it returned a zero, when I displayed it. I don't know why, however 0.666 did work. So I don't know.

Anyway here is my entry for this challenge
ZOMBIE ATTACK

I borrowed much of the base game from OBESE including his Move_Player function and the way the players look. But the upper parts of the game were done by me. So thanks OBESE, by the way I put your name in there.

It's sort of like space invaders, wherein you may only have one projectile on the screen at all times. Except instead of aliens it involves... you know, zombies.

I've included many option variables including things like BulletSpd, Damage, Life, and MaxEnemies so feel free to experiment with different values. By default the game is really easy, just to demonstrate what it does, but if you jack up the enemy speed and damage you have yourself a fairly hard game. The MaxEnemies variable does better with multiples of 3 (i.e. 6,9,12,etc) because of the way it positions them. Press CTRL to switch control styles (I prefer the Default mouse style, because it's easier to aim).

I've tested the game and there shouldn't be any glitches.



Hope you enjoy

Cory
Libervurto
19
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 4th Sep 2007 11:25
Quote: "It should, but when I tested the variable TwoThirds# it returned a zero, when I displayed it. I don't know why, however 0.666 did work. So I don't know."

I found that and changed it to 2/3.0 and it worked
I think it's because it was dividing by and integer so with DB being stupid it would only return an integer, and because DB truncates floats to make them integers it returned 0!

In programming, nothing exists
Phaelax
DBPro Master
23
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 6th Sep 2007 04:39 Edited at: 11th Sep 2007 01:58
Quote: "and younger programmers may not know how to do the math"

I believe that's the point of the challenges, to learn something new. (yes I know it took me 2 weeks to reply)


Sinani201
19
Years of Service
User Offline
Joined: 16th Apr 2007
Location: Aperture Science Enrichment Center
Posted: 6th Sep 2007 05:00
phaelax, end your quotes.

Read the below sentence to keep idiots busy.
Read the above sentence to keep idiots busy.
luke810
19
Years of Service
User Offline
Joined: 4th Sep 2006
Location: United States
Posted: 6th Sep 2007 05:33
He tried but missed a parenthesis
Insert Name Here
19
Years of Service
User Offline
Joined: 20th Mar 2007
Location: Worcester, England
Posted: 6th Sep 2007 18:30
Isn't a parenthesis one these '('? So what's one of these? '['

Acording to Grandma, I am now enemy of the evil republic, who captured Paris Hilton and couldn't manage it.
TDK
Retired Moderator
23
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 8th Sep 2007 00:16
Quote: "So what's one of these? '['"


A close square bracket.

TDK_Man

demons breath
22
Years of Service
User Offline
Joined: 4th Oct 2003
Location: Surrey, UK
Posted: 8th Sep 2007 01:18
open square bracket. close would be thatways round ']'

http://jamesmason01.googlepages.com/index.htm
TDK
Retired Moderator
23
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 10th Sep 2007 01:57
Yes, sorry - didn't have my glasses on when I replied!

TDK_Man

Phaelax
DBPro Master
23
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 11th Sep 2007 02:00 Edited at: 11th Sep 2007 02:01
5 days later and the only new posts are about my incorrect quote. I believe the challenge ends tonight, whatever it was.

If TDK wouldn't mind, perhaps we should put the name and deadline of each challenge in the first thread post, just to make it easier for us who don't check here everyday anymore.


Latch
19
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 11th Sep 2007 04:31
The challenge is over. This was a bit of an AI challenge. The object was to create objects that follow a main object with this criteria:

Main objectives:
* at least 1 main player controllable object in 2d or 3d
* at least 5 non-player objects that follow the player object(s)
* following objects must respond (run away from or move to the side of) a player object that is facing them

Extra points:
* Make it a game of out-run or escape
* Have following objects move at different speeds
* Create levels where more following objects are added
* Any bells and whistles you want to stick in

There were 2 entries.

Runner up



Winner



Congratulations to all entries.

Enjoy your day.
roddman
18
Years of Service
User Offline
Joined: 24th Jul 2007
Location: Over There
Posted: 11th Sep 2007 17:11 Edited at: 11th Sep 2007 17:13
Thanks latch

I wasn't planning on actually winning this one, I figured more people would enter besides me and obese. So I don't really have any good ideas for a new challenge. But i'll just throw one out there.

Boat Physics

I got the idea for this challenge while browsing through the old DBC challenges when I saw the challenge "Vehicle Physics". It's basically the same thing except... with a boat.

Rules

Nothing too fancy on this one, I was thinking you could use a matrix for the water and have it move randomly and a cube for the boat.

More points if it is in 2-d since I believe that would be harder to program.

More points if the boat rises/falls and tilts like in real life.

It could just be a boat simulation, although if you make it into some sort of game that would be better. Also having more than one boat would recieve more points, if say you get some sort of "Bumper Boats" thing going.

I'm looking mainly at the physics involved and not at the textures or anything like that.

Look to the JetSki program for inspiration

DEADLINE
2 Weeks from today
9/23/07 @ 11:59:59 PM GMT

@Obese
If you have a better idea I would be happy to let you take over this challenge.

Cory
Libervurto
19
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 11th Sep 2007 18:33
@Roddman
I demand 20% of your victory!
Nah, I like it when people add to each other's code.

That's a good challenge, I'm happy with it
I'm up for the challenge of doing this in 2D!

In programming, nothing exists
Phaelax
DBPro Master
23
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 12th Sep 2007 04:11
hmmmm, fluid dynamics anyone?


demons breath
22
Years of Service
User Offline
Joined: 4th Oct 2003
Location: Surrey, UK
Posted: 12th Sep 2007 17:30 Edited at: 13th Sep 2007 02:34
I might have a go at doing this challenge

Ok I will have a go, but if I say might then if I fail miserably I can say I decided not to try :p

I have a few ideas for how to do some of it... I just need a more random way of making the waves work than just a sine graph because otherwise all the waves will be identical... maybe sine coupled with a random number generator? i don't know

but anyway I agree you should list the current and past challenges on the first post, because even if a challenge is closed it'd be interesting to have a go at them.


EDIT:
OK I've started but I've got a way to go:


Matrix that updates to simulate waves
Controllable boat with third person camera
Create something to form a boundary so that there's a more obvious reason as to why you can't go beyond a certain point
Boat tilt... I think I know how I'm going to do this though
Missiles, Mines and Shields and their use (Mario Kart battles style game I'm thinking)
AI for opponents (this is going to be the hardest part I think... even less experience with this than with matrices and suchlike - all I've ever done that's vaguely related was guards that shoot at you if you get within a certain distance using pythagoras theorem and otherwise patrol predetermined paths)
A HUD



As you can see still got a ways to go. Mind you no-one else seems to have shown an interest so far so maybe I can win with a pathetic programme by default OK it's a hollow victory but I don't need pride anyway

http://jamesmason01.googlepages.com/index.htm
Tone3e
19
Years of Service
User Offline
Joined: 17th Feb 2007
Location: here
Posted: 13th Sep 2007 03:42
I will have a go at this challenge as well. I might have to borrow a lot of code from the jetski program though. I have wanting to try another one of thiese for a while. I keep checking the new posts, ut the thread seems to be dying, so maybe if i try others will too. I guess you have a challenge demons breath.

Future programming master.
Phaelax
DBPro Master
23
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 14th Sep 2007 01:40
I wonder if anyone is aware/remembers the jet ski demo?


Sinani201
19
Years of Service
User Offline
Joined: 16th Apr 2007
Location: Aperture Science Enrichment Center
Posted: 14th Sep 2007 02:01
I love that demo! It's sooo fun

how do you make a sig?
Libervurto
19
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 14th Sep 2007 02:34 Edited at: 14th Sep 2007 02:43
Quote: "I wonder if anyone is aware/remembers the jet ski demo?"

The one with the goblin right?

I'm going to try and make waves with crests in 2D!
Wish me luck

[edit]
It appears that crests only form near land, so my waves wont have crests. phew!

In programming, nothing exists
demons breath
22
Years of Service
User Offline
Joined: 4th Oct 2003
Location: Surrey, UK
Posted: 14th Sep 2007 10:41
@ Tone3e: Bring it son...


@Phaelax: I remember that demo, but I never really looked at the code cos I always thought it would be too complicated... I don't want to use it either 'cos it feels like that would be cheating. I'm just using the help files that come with DarkBASIC to refresh my memory of how to use the commands and I'll probably end up using the Monster Hunt tutorials for the HUD - does anyone know how I can make trails of smoke to come out of the back of missiles? Any tutorials about that sorta stuff on here?

http://jamesmason01.googlepages.com/index.htm
roddman
18
Years of Service
User Offline
Joined: 24th Jul 2007
Location: Over There
Posted: 14th Sep 2007 16:17
Quote: "feels like that would be cheating"


I don't think anyone would mind if you "sampled" from the JetSki demo just as long as you made a note of where it originally came from. On the last challenge I used one of Obese's functions and put a note at the top.

If you were to copy and paste the entire code then I would call think of that as being cheating. But just looking at it and sampling certain things would be fine, since you're just talking about the waves anyway.

Quote: "how I can make trails of smoke to come out of the back of missiles"


The only way I can think of would involve you managing to create a smoke texture inside your program using only the draw commands. Then once you launch your missle every time the missle travels a certain distance, say 10 or so, you could call a function that makes a plane, textures it with the smoke texture, and points it at the player, I don't really know how that would look though. Oh yeah, you'd have to ghost the plane object to make it look more like smoke.

Cory
demons breath
22
Years of Service
User Offline
Joined: 4th Oct 2003
Location: Surrey, UK
Posted: 14th Sep 2007 17:22 Edited at: 14th Sep 2007 19:48
By the way does anyone know some way that I can make a boat in DarkBASIC... I'm using external media at the moment but I'll obviously have to replace that before I actually enter the challenge...

One more thing, I'm trying to copy some stuff I put in a text file to darkBasic but it won't paste... it'll paste into word though...

http://jamesmason01.googlepages.com/index.htm
luke810
19
Years of Service
User Offline
Joined: 4th Sep 2006
Location: United States
Posted: 15th Sep 2007 01:33
If you were allowed to use the enhancement pack you could use a memblock mesh, but you could probably just join together some different primitives to make something boatish instead...
Sinani201
19
Years of Service
User Offline
Joined: 16th Apr 2007
Location: Aperture Science Enrichment Center
Posted: 15th Sep 2007 01:40 Edited at: 15th Sep 2007 01:40
cool!

how do you make a sig?

Login to post a reply

Server time is: 2026-06-08 23:24:54
Your offset time is: 2026-06-08 23:24:54