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
Insert Name Here
19
Years of Service
User Offline
Joined: 20th Mar 2007
Location: Worcester, England
Posted: 2nd Nov 2007 20:23
Compo ends tomorrow, lads!

Nya!
Well, yes but - wait, what?
Tone3e
19
Years of Service
User Offline
Joined: 17th Feb 2007
Location: here
Posted: 3rd Nov 2007 01:08
Thanks you guys, the loading screen was a pretty good addition and the sinc rate 0 seemed to speed things up quite a bit. I like your sun too obese although it doesnt really seem like a sun it adds something that i think was sort of missing from the picture. I cant wait till tomorrow. If iI win I have an idea for a challenge, which is along the same lines as this one, but a little different and it hasnt been done before.

It is when I am weak, when I am truly strong.
Link102
21
Years of Service
User Offline
Joined: 1st Dec 2004
Location: On your head, weeeeee!
Posted: 3rd Nov 2007 18:33 Edited at: 4th Nov 2007 21:25
Tone3e gets the honor
my seccond entry:


Don't look at my sig!
Insert Name Here
19
Years of Service
User Offline
Joined: 20th Mar 2007
Location: Worcester, England
Posted: 3rd Nov 2007 21:30
No no no, I get the honor, because I was the first one to 'guess what it is'. I guessed first. I didn't guess first, but I still guessed.
Honor is mine.

Nya!
Well, yes but - wait, what?
TDK
Retired Moderator
23
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 3rd Nov 2007 23:29
Link102:

What's with all the # symbols in your entry?

TDK_Man

Latch
19
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 4th Nov 2007 00:44 Edited at: 4th Nov 2007 01:13
I thought this was kinda appropriate for this challenge since a 3d scene or 2d drawing were the criteria. This isn't an entry - it isn't even mine, I was just searching around for an old code example I wanted to reference (I still can't find it - it was for DBPro and it was some kind of chrome like reflection) and I happened upon this demo.

It's pretty good for just a "code snippet" . It takes a little time to play so just wait through it. I waited a while during "endless tunnel" but it didn't seems to end so I stopped it there.

If you're using DBC 1.20, you might have to adjust the ambient lighting and the text because it will be a bit dark and hard to see.

http://forum.thegamecreators.com/?m=forum_view&t=36158&b=6

Enjoy your day.
Insert Name Here
19
Years of Service
User Offline
Joined: 20th Mar 2007
Location: Worcester, England
Posted: 4th Nov 2007 12:00
Game over people, sorry I wasn't able to get to you sooner.
I'll get you the judging in just a tick.

Nya!
Well, yes but - wait, what?
Insert Name Here
19
Years of Service
User Offline
Joined: 20th Mar 2007
Location: Worcester, England
Posted: 4th Nov 2007 12:22 Edited at: 4th Nov 2007 12:24
Latches 'parabola tunnel':

A nice smooth entry with little code, prodcing a rather nice effect, though I think what would have improved it and would have been relatively easy to include would be a 'drawing in real time' function.

OBese87's 'sand'

This was a very clever peice of programming, and I have to say I like the effects a lot. (I had an idea of what you could use this for but I'll come to that later). I personally thnik that had it been a touch more pleasing to the eye this would have been an outstanding entry.

Tone3e 'perspective':

A good perspective effect, though I'm not sure if it was my moniter but the colours seeemed a bit... weird. With a little work this could be excellent.

Latches 'goofball eyes':

...interesting is the best way to describe this. The way that the eyes follow the mouse is good, but the eyes themselves aren't very realistic.

Demon Breath's 'step through my picture':

A clean image produced, and a nice clean step through, but it's a little... uninteresting. A nice entry overall though.

Obese87's 'circles':

A pretty little coloured image, good probably for a childs wallpaper. Nothing else much though.

Obese87's 'rounded square':

Umm... nice use of maths but... it's just a circle!

OBese87's 'rotating coin':

Clever coding going on there, could do with being a bit smoother though.

Link's 'cells':

A pretty good effect, looking very realistic too. Froze up my DarkBasic though .

Link's second entry that I don't know what it was called:

This was a really nice effect. Would work really well as a screensaver. Pretty! Nice use of colours as well.


And without further ado:
Winner

Runner up:

Well done guys.
(If I've missed out anyone, I'm sorry, and whoops)

Nya!
Well, yes but - wait, what?
Libervurto
19
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 4th Nov 2007 17:08
I won!
Finally
I'll post back with the new challenge soon (got to go to work at six)

"You must be someone's friend to make comments about them." - MySpace lied.
Sinani201
19
Years of Service
User Offline
Joined: 16th Apr 2007
Location: Aperture Science Enrichment Center
Posted: 4th Nov 2007 20:08
Congratz OBese87!! Can't wait for the next challenge!

how do you make a sig?
Link102
21
Years of Service
User Offline
Joined: 1st Dec 2004
Location: On your head, weeeeee!
Posted: 4th Nov 2007 21:19 Edited at: 4th Nov 2007 21:26
Thank you, for the next challenge I'dd like you to... what? Runner up? I'll get you next time OBese
Just kidding, I'm pretty pleased with seccond

Quote: "Link102:

What's with all the # symbols in your entry?

TDK_Man"

The source is from a script I made a while back (The verion for the contest has the needed changes)
linky
This was actually my seccond forum post, and back then I was afraid to use 2 kinds of variables. Plus it made them stand out more
edit: I polished it. for a nice effect change "if timer=0 then" to "if theworld=mine then"

Don't look at my sig!
Libervurto
19
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 5th Nov 2007 03:43 Edited at: 6th Nov 2007 03:41
Challenge: Space
Closing Date: Midnight GMT Sunday 11th November 2007

Make a 2D/3D program set in space, or any 3D program that uses all 3 axis of rotation in some way.
Extra points for agile camera movement, and as always: nifty tricks and unique ideas.
It might sound like I'm not going to rate anything 2D but there's lots of possibilities for a 2D space game/demo.

"You must be someone's friend to make comments about them." - MySpace lied.
TDK
Retired Moderator
23
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 6th Nov 2007 02:06
Quote: "The source is from a script I made a while back (The verion for the contest has the needed changes)"


Just checking that you knew that # turns a numeric variable into a float (real) - because all the values you place into them are integers.

For the benefit of anyone reading who doesn't know, integers are much faster than floats and functions like RGB() should only be given integer parameters. I know it does work with floats, but your programs run slower as DB has the extra work of converting them to integers before it can use them.

So, if you are using variables in your programs which represent things that can never be floating point numbers, (like 2D screen co-ordinates or RGB values), always use integer variables (without the # symbol).

TDK_Man

Libervurto
19
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 6th Nov 2007 02:15
Is this not a good challenge?
Or is everyone watching fireworks?

"You must be someone's friend to make comments about them." - MySpace lied.
Sinani201
19
Years of Service
User Offline
Joined: 16th Apr 2007
Location: Aperture Science Enrichment Center
Posted: 6th Nov 2007 03:09
I love the challenge! Now I just have to make my entry...

how do you make a sig?
TDK
Retired Moderator
23
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 6th Nov 2007 15:19
Quote: "Is this not a good challenge?"


Yes it is. The hardest thing is going to be controlling the ship because DB's Eulean angle rotation is a total nightmare with things like that.

It will be interesting to see how people get around the 'Gimlock' problem (apart from doing what everyone else does and use EZRotate)!

To clarify...

When you have rotated an object around one axis and you use another axis for rotation, the object will rotate around two axis instead of just the one.

Difficult to explain, but you'll see when you try it...

Oh yes - if you were thinking that if you can't make a decent looking spaceship with DB primitives it isn't worth entering, I think it's fair to say that using a plain 3D box would be quite acceptable for your entry.

TDK_Man

TDK
Retired Moderator
23
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 6th Nov 2007 15:29
*** IMPORTANT QUESTION ***


As this is a different and quite important subject, I thought it would be better in a separate post to the last one. So...

Are we all using DB Classic V1.2 now?

First of all, it has new commands which I think we should be able to use in this (or any other) challenge.

Secondly, the Enhancement pack is now built in and the additional commands should therefore now be included in the challenges. (They weren't before because not everyone had purchased the EP and it restricted the number of people who could participate).

So as the EP is now included in the free update patch, do we now alter the rules to include the new commands and the EP in the challenges or not?

TDK_Man

Insert Name Here
19
Years of Service
User Offline
Joined: 20th Mar 2007
Location: Worcester, England
Posted: 6th Nov 2007 20:41
^
Yes.
I need to upgrade...

Nya!
Well, yes but - wait, what?
Libervurto
19
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 7th Nov 2007 00:33
Yes, it's free for all so it has become the new DBC for all, and this is the DBC challenge

"You must be someone's friend to make comments about them." - MySpace lied.
Sinani201
19
Years of Service
User Offline
Joined: 16th Apr 2007
Location: Aperture Science Enrichment Center
Posted: 7th Nov 2007 01:59
I still need to update, although it's fine if you want to use the new commands, I maybe just won't be able to view it then

how do you make a sig?
Libervurto
19
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 8th Nov 2007 22:34
Where are your entries guys?
Anyone have a WIP to post?

"You must be someone's friend to make comments about them." - MySpace lied.
Latch
19
Years of Service
User Offline
Joined: 23rd Jul 2006
Location:
Posted: 9th Nov 2007 07:41
how about an extension? maybe everyone needs more time

Enjoy your day.
Libervurto
19
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 9th Nov 2007 15:55
OK then
I extend the challenge deadline to Midnight Saturday 17th November.
Entries will still be valid after this deadline until I call the challenge closed.

"You must be someone's friend to make comments about them." - MySpace lied.
Sinani201
19
Years of Service
User Offline
Joined: 16th Apr 2007
Location: Aperture Science Enrichment Center
Posted: 10th Nov 2007 03:19
Ok, now I have officially updated to the new DBC! Yay!

how do you make a sig?
Comrade Robski
20
Years of Service
User Offline
Joined: 12th Sep 2005
Location:
Posted: 13th Nov 2007 10:33
Hi here's my entry to the space challenge:



It's my attempt at a thrid person space ship control. Left and right arrowkeys roll left and right, up and down pitch down and up. (I was going for the Elite style ship movement) Spacebar engages thrusters. There's really not much to do but fly around and look at the planets. (Oh, and fly through the planets if you like....). But I think this control system could be used to create a basic Elite style game with enough work...

I got round the nasty euclidian rotation issue that TDK spoke of by simply using the roll object and pitch object commands. The camera is attached to a limb placed behind and above the ship, and is set to the ship orientation every loop. The result is the ship remains static on the screen while the surroundings move.
Libervurto
19
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 13th Nov 2007 17:57 Edited at: 13th Nov 2007 20:33
Nice little program there

I've made a spaceship that everyone is free to use if they can't be bothered to make their own



[edit]
I've been working on a solar system simulation.
The sun is so huge you can't see the other planets!
use UP and DOWN to zoom the camera (hold shift or space for faster zoom)
Press Control to track planets.


Any tips would be great, I really need to improve my 3D stuff.

"You must be someone's friend to make comments about them." - MySpace lied.
Sinani201
19
Years of Service
User Offline
Joined: 16th Apr 2007
Location: Aperture Science Enrichment Center
Posted: 14th Nov 2007 02:33
@OBese87
Where's the program? All I see is "Tracking: Sun" and in the middle, there's text that says *Sun with a spaceship running through. Does that mean it's loading or something?

how do you make a sig?
Comrade Robski
20
Years of Service
User Offline
Joined: 12th Sep 2005
Location:
Posted: 14th Nov 2007 10:44
Cool program! Maybe next you could add the moons!!

Obese / Sinani - at the start of the program, the camdist is set to a small value (20) so the camera is placed inside the sun (that's why you can't see anything). camdist is only automatically updated when you change the planet selection. Maybe start with

camdist = body#(sun,size) * 5

or something like that.

Also, OBese87, avoid color object if possible. It may not make a difference in this program, but it is a very inefficient command. Make your own 2x2 textures to colour objects a single colour.
Libervurto
19
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 14th Nov 2007 15:46 Edited at: 14th Nov 2007 16:13
Quote: "Also, OBese87, avoid color object if possible. It may not make a difference in this program, but it is a very inefficient command. Make your own 2x2 textures to colour objects a single colour."

OK, I'll try to remember that. Thanks

Quote: "Where's the program? All I see is "Tracking: Sun" and in the middle, there's text that says *Sun with a spaceship running through. Does that mean it's loading or something?"

I explained the controls, you should be able to move out so you can see the sun and the planets orbiting around it.

Anyone have any ideas how to make this program better? It's annoying that you can't see the planets because they are so much smaller than the sun

[edit]
How do I do an ATANFULL with 3D co-ordinates?

"You must be someone's friend to make comments about them." - MySpace lied.
Link102
21
Years of Service
User Offline
Joined: 1st Dec 2004
Location: On your head, weeeeee!
Posted: 14th Nov 2007 16:08
Pluto looks like it's a bit unstable, It could explode anny seccond

Don't look at my sig!
Libervurto
19
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 14th Nov 2007 16:13
I know, have no idea why that is happening

"You must be someone's friend to make comments about them." - MySpace lied.
Sinani201
19
Years of Service
User Offline
Joined: 16th Apr 2007
Location: Aperture Science Enrichment Center
Posted: 15th Nov 2007 04:39
I zoomed out, although now I can't see any planets; only the sun!

how do you make a sig?
Libervurto
19
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 15th Nov 2007 06:34
yeah that's because they are tiny in comparison, something weird happens to the text too: it goes off screen and creeps in from the left for some reason?
I'm gonna see what I can do with my spaceship

"You must be someone's friend to make comments about them." - MySpace lied.
Insert Name Here
19
Years of Service
User Offline
Joined: 20th Mar 2007
Location: Worcester, England
Posted: 15th Nov 2007 21:10
Can you make pluto explode?


Sudoku arts, the rabi and Nancy DrewG
Link102
21
Years of Service
User Offline
Joined: 1st Dec 2004
Location: On your head, weeeeee!
Posted: 15th Nov 2007 21:21
Is that in real life or in OBese's demo?

Don't look at my sig!
Insert Name Here
19
Years of Service
User Offline
Joined: 20th Mar 2007
Location: Worcester, England
Posted: 16th Nov 2007 20:01
Well, both would be rather exciting.


Sudoku arts, the rabi and Nancy DrewG
Libervurto
19
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 17th Nov 2007 00:34
I want some entries

"You must be someone's friend to make comments about them." - MySpace lied.
Libervurto
19
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 19th Nov 2007 00:38
Challenge closes in 21 minutes
Comrade Robski is winning by default!
I'm annoyed that you all said you liked the challenge and none of you entered
Why have entries gone down so much recently?

"You must be someone's friend to make comments about them." - MySpace lied.
Zombie 20
19
Years of Service
User Offline
Joined: 26th Nov 2006
Location: Etters, PA
Posted: 19th Nov 2007 00:46
well..I can't do space right now, but I will happily do your next one, or comrade's. I've been hoping I could see what I can do nowadays.

Dr. Mannete- OMG It's Zombie's voice, it's so Suave!

Libervurto
19
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 19th Nov 2007 01:06 Edited at: 19th Nov 2007 01:07
CHALLENGE CLOSED: SPACE

It was a hard decision but after considering the entry I decided on a winner.

Comradulations!

CHALLENGE MUST BE SET BEFORE MIDNIGHT TOMORROW OR I SET THE NEW CHALLENGE
Is that a good idea TDK?

"You must be someone's friend to make comments about them." - MySpace lied.
Zombie 20
19
Years of Service
User Offline
Joined: 26th Nov 2006
Location: Etters, PA
Posted: 19th Nov 2007 03:13
sounds good...I eagerly await the challenge.

Dr. Mannete- OMG It's Zombie's voice, it's so Suave!

TDK
Retired Moderator
23
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 19th Nov 2007 08:49
Quote: "CHALLENGE MUST BE SET BEFORE MIDNIGHT TOMORROW OR I SET THE NEW CHALLENGE
Is that a good idea TDK?"


Yes.

TDK_Man

Comrade Robski
20
Years of Service
User Offline
Joined: 12th Sep 2005
Location:
Posted: 19th Nov 2007 10:35
Well if I'm still in time, here is the new challenge:

Create a Character Challenge

I want this one to have a wide remit so anyone can enter. In many RPG games you have to create your character - giving him/her/it skills/attributes etc. This challenge is to make a program that creates a character for an RPG.

*It doesn't have to be an established RPG - make up your own character classes / skills / attributes / whatever. But feel free to base it on something familar like D&D if you like. Any RPG setting is acceptable, space, modern, medieval, gothic, prehistoric, alternative history, ANYTHING!

*The method of character creation is up to you - It could be a straight dice rolling machine that spits out attributes. Or for more complexity, you could progress your character through various jobs gaining skill points on the way.

* The bare minimum is to be able to name your character, give them a gender, and at least 3 attributes or skills which the user can change in some way (even if it's only re-rolling).

*Bonus points ande ideas:

-Include a basic graphical representation of your character (difficult using only DBC commands...)
-Be able to save the character you create
-Be able to create more than one character (i.e. a party)

Enjoy the challenge. If its ok with the boss I'll set a two week time limit, seeing as entries have been slow of late.

So the deadline is Monday 3rd December 2007 at midnight GMT
Zombie 20
19
Years of Service
User Offline
Joined: 26th Nov 2006
Location: Etters, PA
Posted: 19th Nov 2007 11:02
Alright bro, I was working on this anyways for my rpg I'm making sooo..this will be fun . Good challenge.

Zombie

Dr. Mannete- OMG It's Zombie's voice, it's so Suave!

Zombie 20
19
Years of Service
User Offline
Joined: 26th Nov 2006
Location: Etters, PA
Posted: 19th Nov 2007 13:10 Edited at: 19th Nov 2007 14:25
Just started on it a bit before i go to bed, setting up the characters name, gender is being put in right now. This is really fun, thanks for the challenge, I think I've gotten better at coding as well. Well here's what I have as of now.



Zombie

Dr. Mannete- OMG It's Zombie's voice, it's so Suave!

Comrade Robski
20
Years of Service
User Offline
Joined: 12th Sep 2005
Location:
Posted: 19th Nov 2007 15:28 Edited at: 19th Nov 2007 15:29
Wow that's a lot of work already Zombie! Glad you like the challenge!!

I realise it's not the finished program, but be careful with the layout of those gosubs and subroutines. For instance, as it stands, the subroutine start_game will be run twice - the first time when it is called by the gosub start_game command (line 12), and the second time after the program hits the return command (line 26) it will jump back to line 13 and run the subroutine again.

I find a good way to lay out subroutines is as follows:



The end command makes sure the program never runs into the subroutines unless you specifically call them with a gosub.
Libervurto
19
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 19th Nov 2007 17:13 Edited at: 19th Nov 2007 17:34
@Zombie
I found it confusing, wasn't really sure when I was supposed to input.
Quote: "I'll need to know the name of your character now."

Doesn't really indicate that you want me to type in the name, especially since this appears after a string of messages. I pressed return here and was confused when the next message displayed
Quote: "So your character's name will be"

"Do I type now?"

The original message would be better if it were something like this
Quote: "What will be your character's name? >"

The ">" indicates that an input is required

At the start of the program you warn the user that
Quote: "Input is case sensitive, put in what you see!!"

You can easily get around this though.
Most names begin with a capital letter and the rest lower case.
So after the user has input their name you could run this line of code.

This turned "guNthEr" into "Gunther"

A good trick I found for programs that require input choices like "Yes/No" or "Male/Female" is that in both cases the first letter is unique, so we only need to check the first character of the input.

So typing "Yes", "Y", "Yeah", "You Bet ", "Yeehaaaw!" or "Yoghurt" would all be treated as "Y".
You'll also notice that I made the string upper case too, you should always do this with input so that case isn't an issue.
I didn't realise it but I wasn't actually answering any of your questions because of this problem.

Sorry for harping on about your code which isn't even a day old
but another thing is that every question in your editor MUST have an answer, but your code lets the user continue without a valid input.

When I ran the program I typed in "y", which isn't equal to "Y" or "N" so the program just hit the RETURN command.
OK, so let's assume that you've taken my advice and made it so the user's input will be cut to the first character, and that character is set to upper case.
What we want to do is to detain the user until they give a valid input. Something like this would work. I changed the input to q$ because it's quicker.

Aaaaaah I just noticed you are using gotos!
Re-write everything NOW!
Anyway, this code will keep asking for input until it's valid.
So no matter how many times your type "Go Fish" it wont be fooled

"You must be someone's friend to make comments about them." - MySpace lied.
Insert Name Here
19
Years of Service
User Offline
Joined: 20th Mar 2007
Location: Worcester, England
Posted: 19th Nov 2007 19:44
And one last thing:
Whoorp, Whoorp, you need to update, whoorp whoorpy, text is massive in DBC 1.2, Whoorp!


Sudoku arts, the rabi and Nancy DrewG
Zombie 20
19
Years of Service
User Offline
Joined: 26th Nov 2006
Location: Etters, PA
Posted: 19th Nov 2007 21:57
@Comrade- Ya...this has been really fun, i don't get many chances to code so I jumped at it while I coulld..it was neat how it all just came to me . I will put end in there, thank you for the tip, that should make it less glitchy.

@Obese- Wow that was a lot haha but I don't think you're harping on my code obese, I posted it so people could see what I had done on my own, criticism is always welcome with me, I want to get better if I can and thus I am greatly apprecitaive that you took the time to help me out. About the goto's, I orginally intended them to be gosubs but wasn't sure if I should or not, I know that its bad practice to use goto's but I think gosub's will change that.

@INH- I plan to upgrade eventually, after all I don't want to mess people up with my progs, but for now I'm sticking with 1.13.

Thank you, the three of you have helped me, I appreciate it, happy coding

Zombie

Dr. Mannete- OMG It's Zombie's voice, it's so Suave!

Insert Name Here
19
Years of Service
User Offline
Joined: 20th Mar 2007
Location: Worcester, England
Posted: 19th Nov 2007 22:06
Quote: "@INH- I plan to upgrade eventually, after all I don't want to mess people up with my progs, but for now I'm sticking with 1.13"

I would recoomend upgrading regardless, if the text is too big in 1.2, then it'll be marked down, seeing as the current standard is 1.2.


Sudoku arts, the rabi and Nancy DrewG

Login to post a reply

Server time is: 2026-06-08 07:00:02
Your offset time is: 2026-06-08 07:00:02