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
NanoGamez guy
18
Years of Service
User Offline
Joined: 13th Jan 2007
Location: Closer than you think...
Posted: 13th Jun 2009 15:53 Edited at: 13th Jun 2009 15:57
Congratulations pictionaryjr!

A similar challenge has already been done:

http://zimnox.com/dbcc/index.php?page=view&challenge=Target%20Shooting

But that was more of a shooting challenge, as you seem to be avoiding.

@Smart Guy
Good game, although it was simple, I found it quite adrenaline filled!

@Razerx
Very fun and simple, I liked all the different levels. I did find one small glitch, when you restart, the font sizes stay at 100, even though I can see in you code that you reset them. I fixed this just by putting a sync after the reset of font.

So here's my entry (I posted it for the old challenge but I've tidied it up a lot):

ENTRY

CHALLENGE: Target Hitting
ENTRANT: NanoGamez Guy




I challenge you to get more than 3000!


"I trust you have prepared new insults for today" - Spock, Star Trek
pictionaryjr
16
Years of Service
User Offline
Joined: 12th Mar 2009
Location:
Posted: 13th Jun 2009 17:40
hahaha didn't know that this challenge was basically already done, i never took the time to go back and look. The game is cool though lol, does it ever end?
NanoGamez guy
18
Years of Service
User Offline
Joined: 13th Jan 2007
Location: Closer than you think...
Posted: 13th Jun 2009 18:59
It never ends - you play till you die!


"I trust you have prepared new insults for today" - Spock, Star Trek
That1Smart Guy
16
Years of Service
User Offline
Joined: 26th Feb 2009
Location: Somewhere...... yep
Posted: 13th Jun 2009 21:11
wow so simple and yet so fun

There are only 10 kinds of people in the world, those who understand binary and those who dont
That1Smart Guy
16
Years of Service
User Offline
Joined: 26th Feb 2009
Location: Somewhere...... yep
Posted: 13th Jun 2009 21:12
it still doesnt work pic

There are only 10 kinds of people in the world, those who understand binary and those who dont
Ashingda 27
17
Years of Service
User Offline
Joined: 15th Feb 2008
Location:
Posted: 13th Jun 2009 23:57
I'm going to enter this one too. Going to start working on my entry.
That1Smart Guy
16
Years of Service
User Offline
Joined: 26th Feb 2009
Location: Somewhere...... yep
Posted: 14th Jun 2009 08:20 Edited at: 14th Jun 2009 08:20
v3:

lemme know if you have any problems with bonus round, you shouldnt but i kinda coded it in a hurry and may have overlooked something



There are only 10 kinds of people in the world, those who understand binary and those who dont
t10dimensional
16
Years of Service
User Offline
Joined: 22nd Mar 2009
Location: Code Cave, USA
Posted: 14th Jun 2009 22:07 Edited at: 14th Jun 2009 22:08
I am redoing my Entry,seeing how good everyone elses is and because I had a BIG lightbulb apear over my head.
.........

So my old entry is my V2.I'm going to make my game a little longer
and more fun.

If at first you don't succeed-Pause-Go to last checkpoint
Phaelax
DBPro Master
22
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 14th Jun 2009 23:21
Thanks for pointing that out Nano, I thought this challenge seemed familiar.

Here's a preview of my entry so far. (yes I do participate once in awhile)
Click and drag back on the character to adjust it's power and angle.



Drawing is soooo slow in DBC. I get 20fps, but over 400fps in Pro.

[url="http://dbcc.zimnox.com"][/url]
That1Smart Guy
16
Years of Service
User Offline
Joined: 26th Feb 2009
Location: Somewhere...... yep
Posted: 14th Jun 2009 23:42
wow, show off

There are only 10 kinds of people in the world, those who understand binary and those who dont
Ashingda 27
17
Years of Service
User Offline
Joined: 15th Feb 2008
Location:
Posted: 15th Jun 2009 04:08
@That1Smart Guy
It's simple but quite fun

@Phaelax
That's cool. I'm bad with math and cannot make an arrow fly with gravity.
t10dimensional
16
Years of Service
User Offline
Joined: 22nd Mar 2009
Location: Code Cave, USA
Posted: 15th Jun 2009 09:53 Edited at: 15th Jun 2009 10:09
V3,
let me know if there are any problems with the game,thanks.



If at first you don't succeed-Pause-Go to last checkpoint
That1Smart Guy
16
Years of Service
User Offline
Joined: 26th Feb 2009
Location: Somewhere...... yep
Posted: 15th Jun 2009 14:12
still not working, i keep clicking the targets but nothing happens to them or my score

There are only 10 kinds of people in the world, those who understand binary and those who dont
Ashingda 27
17
Years of Service
User Offline
Joined: 15th Feb 2008
Location:
Posted: 15th Jun 2009 16:56 Edited at: 15th Jun 2009 16:58
[ENTRY]
I learned to do this working with the DarkNoob DBPro team. Coded everything from scratch.

That1Smart Guy
16
Years of Service
User Offline
Joined: 26th Feb 2009
Location: Somewhere...... yep
Posted: 15th Jun 2009 18:07 Edited at: 15th Jun 2009 18:17
AWESOME! show off

only problem, once you lose as go back to the main menu, the mouse was hidden so you couldnt click anything

also isnt there some rule about you cant encode media into data?

There are only 10 kinds of people in the world, those who understand binary and those who dont
NanoGamez guy
18
Years of Service
User Offline
Joined: 13th Jan 2007
Location: Closer than you think...
Posted: 15th Jun 2009 19:04 Edited at: 15th Jun 2009 19:05
@Smart Guy
The bonus round was a very good idea, it adds a bit of variation to the game.

@Phaelax
Although it doesn't do much (as far as I can tell), it's very nice to look at and very realistic. I can get about 50FPS on my computer, but if I change it so the background is drawn first and is then captured as an image and just pasted every loop, I can get about 70FPS.

@razerx
A lot of variation which is great (although the game is a bit short). I noticed that it was quite slow, and after a bit of searching I found that you used the point() command 5 times every loop, which is notoriously slow. Why don't you measure the distance from the mouse and each target to find if it is in it?

@Ashingda
A very nice game with a lot of extra things which enhanced the gaming experience. However Smart Guy was right in that you can't encode media in the code. Why don't you procedurally generate it or something.

This is really heating up! Man I wish I didn't have exams so that I could work more on my entry!


"I trust you have prepared new insults for today" - Spock, Star Trek
Libervurto
19
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 15th Jun 2009 19:11
Quote: "also isnt there some rule about you cant encode media into data?"

I think we should agree a maximum size for data images (8x8?).
As long as no one is encoding massively detailed images which could not have been created in db without some serious labour, I can't see the problem.
I had some very blocky encoded graphics for my Jack & The Beanstalk entry a while back, it looked very oldschool

There is an eight letter word. You can insert a letter into it or remove a letter from it without changing its meaning. Answer
That1Smart Guy
16
Years of Service
User Offline
Joined: 26th Feb 2009
Location: Somewhere...... yep
Posted: 15th Jun 2009 19:18 Edited at: 15th Jun 2009 19:18
ok, that makes sense because techinically whats the difference between his data encoding and me making my target images?

only the method we used, and i guess the amount of typing we had to do

There are only 10 kinds of people in the world, those who understand binary and those who dont
Ashingda 27
17
Years of Service
User Offline
Joined: 15th Feb 2008
Location:
Posted: 15th Jun 2009 20:35 Edited at: 15th Jun 2009 20:41
Quote: "rule about you cant encode media into data"

Yikes I didn't know, I figured that the use of Data ,,, was allowed that mines was too.

If it makes any difference, my image data were all produced by a paint like program I coded just for this project. The Image size was 16x16 and I just blew it up by 200% or 400% with a function. I can post my image editor if anyone is curious about it.

@That1Smart Guy
I cant believe I missed that about the mouse.

[edit]
This is how my raw data looks like.
Phaelax
DBPro Master
22
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 15th Jun 2009 21:49
Quote: "Yikes I didn't know, I figured that the use of Data was allowed"


I don't see any problem with how you used it. As Obese said, we just don't want to see someone have an actual image converted into data statements. If you can do it by hand then I think it's fine, and yours is only a few lines.

Yea my game doesn't do anything...yet. There will be a twist, but I'll never Tell. (get the hint?)

[url="http://dbcc.zimnox.com"][/url]
t10dimensional
16
Years of Service
User Offline
Joined: 22nd Mar 2009
Location: Code Cave, USA
Posted: 15th Jun 2009 22:03 Edited at: 16th Jun 2009 00:45
@Nano,
Do you mean get the radius of the target?Sounds difficult.

EDIT:
I just tested it and got 99 FPS the whole time.

@Smartguy,
There are only two ways why it's not working.
1.
Display mode must be 640,480,16
2.
(I think it's this one)
Your point command returns a diffrent nummber number.
Just put a print point(mx,my) in the "WHILE forever" loop and see if
blue is 222.

How much time we got?

If at first you don't succeed-Pause-Go to last checkpoint
pictionaryjr
16
Years of Service
User Offline
Joined: 12th Mar 2009
Location:
Posted: 16th Jun 2009 00:10
I think the 17 at midnight.
That1Smart Guy
16
Years of Service
User Offline
Joined: 26th Feb 2009
Location: Somewhere...... yep
Posted: 16th Jun 2009 00:20 Edited at: 16th Jun 2009 00:23
i believe the challenge ends at midnight on the 19th/20th line

ill check on that razer and get back to you, o and btw, you spelled it smartgut

There are only 10 kinds of people in the world, those who understand binary and those who dont
That1Smart Guy
16
Years of Service
User Offline
Joined: 26th Feb 2009
Location: Somewhere...... yep
Posted: 16th Jun 2009 00:28
sorry for dp

I used phaelax's suggestion about you're game razer and it occured to me, mx,my is the center of the crosshair, so it keeps checking THAT instead of the target behind it, so it always returns the value for white!!

try putting a black dot in the center of the crosshair when you make the image (if you're just pasting a crosshair image) or if you're using line to redraw it every loop then make it 4 line instead of 2 and leave space between them in the center

There are only 10 kinds of people in the world, those who understand binary and those who dont
t10dimensional
16
Years of Service
User Offline
Joined: 22nd Mar 2009
Location: Code Cave, USA
Posted: 16th Jun 2009 00:49
Thats weird,I made the crosshair be pasted after it checks for the point().But I'll put a dot anyways.

V4


If at first you don't succeed-Pause-Go to last checkpoint
That1Smart Guy
16
Years of Service
User Offline
Joined: 26th Feb 2009
Location: Somewhere...... yep
Posted: 16th Jun 2009 00:55
ok that allowed me to check if my colors equaled what you're checking for and they didnt, for example, you have blue=222, blue on my monitor (which is a TV with HDMI input if it matters) shows up as 225, i changed it and blue now score so ill change the colors to suit my TV and report back on if they all work

There are only 10 kinds of people in the world, those who understand binary and those who dont
That1Smart Guy
16
Years of Service
User Offline
Joined: 26th Feb 2009
Location: Somewhere...... yep
Posted: 16th Jun 2009 01:00
ok i got em all changed and they all work, YAAAAAAAAAY!!

you know it might have been easier to save the values for those 4 colors into variables or an array

There are only 10 kinds of people in the world, those who understand binary and those who dont
t10dimensional
16
Years of Service
User Offline
Joined: 22nd Mar 2009
Location: Code Cave, USA
Posted: 16th Jun 2009 01:02 Edited at: 16th Jun 2009 01:02
good idea thanks.did you like the game?

If at first you don't succeed-Pause-Go to last checkpoint
That1Smart Guy
16
Years of Service
User Offline
Joined: 26th Feb 2009
Location: Somewhere...... yep
Posted: 16th Jun 2009 01:14
didnt play it all the way through, but i assume its just more target shooting

kinda cool though if somewhat cliched

There are only 10 kinds of people in the world, those who understand binary and those who dont
That1Smart Guy
16
Years of Service
User Offline
Joined: 26th Feb 2009
Location: Somewhere...... yep
Posted: 16th Jun 2009 01:29
so doea the rule about putting image data into data statements pertain to all external media or only images?

There are only 10 kinds of people in the world, those who understand binary and those who dont
t10dimensional
16
Years of Service
User Offline
Joined: 22nd Mar 2009
Location: Code Cave, USA
Posted: 16th Jun 2009 01:30 Edited at: 16th Jun 2009 06:27
ENTRY

It's faster because it does'nt use point() anymore.
It's longer,5 rounds.



If at first you don't succeed-Pause-Go to last checkpoint
BN2 Productions
21
Years of Service
User Offline
Joined: 22nd Jan 2004
Location:
Posted: 16th Jun 2009 01:34
I think the consensus is that it can be done for REASONABLY sized images that can REASONABLY be created with darkbasic. Largest size should be agreed on. My vote is a size cap of 16x16.

Great Quote:
"Time...LINE??? Time isn't made out of lines...it is made out of circles. That is why clocks are round!" -Caboose
NanoGamez guy
18
Years of Service
User Offline
Joined: 13th Jan 2007
Location: Closer than you think...
Posted: 16th Jun 2009 18:47
@Phaelax

lol, good pun, Will it be like a story? (I tried )

@razerx
Much faster now, which makes it a lot easier, I got 100% accuracy and 98% bullseyes! If you want to make the target hit check faster still, try using all square values, to miss out the sqrt() function. Like this:




"I trust you have prepared new insults for today" - Spock, Star Trek
pictionaryjr
16
Years of Service
User Offline
Joined: 12th Mar 2009
Location:
Posted: 16th Jun 2009 18:52
This is going to be hard to judge
That1Smart Guy
16
Years of Service
User Offline
Joined: 26th Feb 2009
Location: Somewhere...... yep
Posted: 17th Jun 2009 06:22 Edited at: 17th Jun 2009 20:32
heres v4

changes:

MUCH more organized code

another new round, this one has more of a skill theme than a click as fast as you can kinda idea



I make NO promises on the accuracy of the new mode, I did the best I could to make it look accurate but I know some people will be angry

There are only 10 kinds of people in the world, those who understand binary and those who dont
pictionaryjr
16
Years of Service
User Offline
Joined: 12th Mar 2009
Location:
Posted: 18th Jun 2009 23:51
Competition ends tomorrow at midnight, just so everyone knows, just incase anyone wanted to get a last minute entry in.
That1Smart Guy
16
Years of Service
User Offline
Joined: 26th Feb 2009
Location: Somewhere...... yep
Posted: 19th Jun 2009 00:04
ok ill try to get a v5 in, but I make no promises

There are only 10 kinds of people in the world, those who understand binary and those who dont
Ashingda 27
17
Years of Service
User Offline
Joined: 15th Feb 2008
Location:
Posted: 19th Jun 2009 00:06
Here's Ver.2 of my Entry with the mouse bug fix that was mentioned.

That1Smart Guy
16
Years of Service
User Offline
Joined: 26th Feb 2009
Location: Somewhere...... yep
Posted: 19th Jun 2009 00:32
is that the only change?

There are only 10 kinds of people in the world, those who understand binary and those who dont
Ashingda 27
17
Years of Service
User Offline
Joined: 15th Feb 2008
Location:
Posted: 19th Jun 2009 00:50
Yeah sadly...
That1Smart Guy
16
Years of Service
User Offline
Joined: 26th Feb 2009
Location: Somewhere...... yep
Posted: 19th Jun 2009 00:56 Edited at: 19th Jun 2009 00:58
im not sure you really need to do anything, in my opinion you have a good shot at winning as it is

although..... depending on how you define "target hitting" your game may not count, but that will be up to pictionary

also, what are we voting as a max size for data encrypted images?

im fine with 16*16, but what are we defining as data encrypted, do my target images in my game count?

There are only 10 kinds of people in the world, those who understand binary and those who dont
pictionaryjr
16
Years of Service
User Offline
Joined: 12th Mar 2009
Location:
Posted: 19th Jun 2009 01:02
Lol i honestly dont know if thats too far from target hitting or not.
That1Smart Guy
16
Years of Service
User Offline
Joined: 26th Feb 2009
Location: Somewhere...... yep
Posted: 19th Jun 2009 01:11
maybe instead of just saying a game is disqualified for being too far from topic, we should factor in how on topic an entry is into the judging

There are only 10 kinds of people in the world, those who understand binary and those who dont
That1Smart Guy
16
Years of Service
User Offline
Joined: 26th Feb 2009
Location: Somewhere...... yep
Posted: 19th Jun 2009 06:28
sorry for dp

does the rule about no external media pertain to media that came with DBC?

after all the rule was put down so that we could just copy + paste the code, run it and be done, and you could still do that since the media would be guaranteed to be on all computers that ran it

There are only 10 kinds of people in the world, those who understand binary and those who dont
BN2 Productions
21
Years of Service
User Offline
Joined: 22nd Jan 2004
Location:
Posted: 19th Jun 2009 12:38
DB lite doesn't have it but is still the same language. I would say no. The idea isn't so much copy and paste-ability (though that is a lot of it), it is so that all that is there is the code. That is what this is, it isn't a media compeition, or a nicest looking game competition, it is a PROGRAMMING competition.

Great Quote:
"Time...LINE??? Time isn't made out of lines...it is made out of circles. That is why clocks are round!" -Caboose
Libervurto
19
Years of Service
User Offline
Joined: 30th Jun 2006
Location: On Toast
Posted: 19th Jun 2009 13:38
BN2 is right, and also YOU didn't make the DBC models.
Saying that the models will be on everyone's computer is like allowing all windows dlls to be used.
Just code, nothing external.
There was talk about whether to allow external files if the code itself generated them. I think that should be allowed but what does everyone else think?
I can't see it being of use for this challenge though.

There is an eight letter word. You can insert a letter into it or remove a letter from it without changing its meaning. Answer
BN2 Productions
21
Years of Service
User Offline
Joined: 22nd Jan 2004
Location:
Posted: 19th Jun 2009 20:48
I see no problem, as long as the program generates it.

Great Quote:
"Time...LINE??? Time isn't made out of lines...it is made out of circles. That is why clocks are round!" -Caboose
Phaelax
DBPro Master
22
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 20th Jun 2009 00:22
External media that has been created through code should be allowed. We've allowed it in the DBP challenge where many of us would generate WAV files and load them.

Here's my entry. I didn't have time to optimize very much or add a lot of fancy effects, but the game play is there for the most part.

Entry:


[url="http://dbcc.zimnox.com"][/url]
That1Smart Guy
16
Years of Service
User Offline
Joined: 26th Feb 2009
Location: Somewhere...... yep
Posted: 20th Jun 2009 00:39
cool, but i found a glitch

if you hit him, then fire again quickly it disregards your hitting him and you continue on that level

There are only 10 kinds of people in the world, those who understand binary and those who dont
Phaelax
DBPro Master
22
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 20th Jun 2009 00:54
thats not a glitch, its a feature! (one that should've stayed hidden!)

[url="http://dbcc.zimnox.com"][/url]

Login to post a reply

Server time is: 2025-08-08 20:41:56
Your offset time is: 2025-08-08 20:41:56