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
Nicholas Thompson
21
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 17th Oct 2006 11:23
I might try to get one in this weekend (assuming i can find time).

[center]
Zotoaster
21
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 17th Oct 2006 11:37
I would, but I have alot on my mind , hopefully I'll get the next one done.

Ric
22
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 17th Oct 2006 12:34
I'll be giving this one a go. This is a three weeker, though, so there's loads of time yet!

Wisewolf
19
Years of Service
User Offline
Joined: 12th Oct 2006
Location:
Posted: 17th Oct 2006 14:31
A maths game, sounds easy enough. The only problem would be finding a way to put the math into the game and yet make it interesting... one way would be to do like a challenge of wits against a super genius. This should be do-able within the 3 weeks. I hope that I get an entry with all the work I have to do
Diggsey
20
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 17th Oct 2006 20:00
So do I

lower logic
20
Years of Service
User Offline
Joined: 15th Jun 2006
Location:
Posted: 17th Oct 2006 22:26
Use your prime gun to blast away the composites.
acelepage
22
Years of Service
User Offline
Joined: 2nd Jun 2004
Location: Plattsville
Posted: 17th Oct 2006 23:25
lower logic,
I used up all my ammo on the first level. How do I get some more?

( 2b || !2b ), that is the question. The answer: true
Diggsey
20
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 18th Oct 2006 00:03
I eventually found out that you could move using asdw, and get health from the red circles, but on level 2, I shot loads of stuff, but it wouldn't let me shoot the rest (I did have enough ammo) Could you give some more detailed instructions?

PS, I really like the colours and style

Wisewolf
19
Years of Service
User Offline
Joined: 12th Oct 2006
Location:
Posted: 18th Oct 2006 14:33
dang, must of took a while. I have to admit, this game is good but I don't think that it would appeal to a crowd that is not oriented around shooting games. Other than that, it is pretty good!
acelepage
22
Years of Service
User Offline
Joined: 2nd Jun 2004
Location: Plattsville
Posted: 18th Oct 2006 18:05
Diggsey,
I'll be entering this challenge. Just wondering if the rules say anything about multiple entries. I have a couple of ideas and don't know which one to pick.
Since there's lots of time, I could code both.

( 2b || !2b ), that is the question. The answer: true
Diggsey
20
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 18th Oct 2006 20:30
I think people have submitted multiple entries before, but I don't know. Ric might though

Hobgoblin Lord
20
Years of Service
User Offline
Joined: 29th Oct 2005
Location: Fall River, MA USA
Posted: 19th Oct 2006 08:55
you have to use the mousewheel to scroll through the diffrent guns you have to kill all the diffrent types of evil numbers. Lower Logic this is great, a little fast, but great.

http://www.cafepress.com/blackarrowgames
Check out my great stuff here
Nicholas Thompson
21
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 19th Oct 2006 11:13
You can enter as many as you like! Check this challenge out:
http://www.dbp-site.com/challenges/2d-primitives

Phaelax entered 3 times!

[center]
Zotoaster
21
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 19th Oct 2006 14:14
Can I just ask, but would you be able to use common DLLs such as Sparky's collision or something? I never really thought about that before.

Ric
22
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 19th Oct 2006 14:52
Multiple entries are certainly allowed, but no, you can't use external dll's. Please refer to this explanation: http://www.andromedus.com/dbp/html/media-rule.html

Ric
22
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 19th Oct 2006 14:52 Edited at: 19th Oct 2006 14:53
Sorry - my browser double posted for some reason.

Zotoaster
21
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 19th Oct 2006 15:02
Hmm. Damn.

Diggsey
20
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 19th Oct 2006 19:39
You could make two, one using external dlls, and one not, but only the one that doesn't use external dlls can enter. That way people can still benefit from your coding skill

Zotoaster
21
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 19th Oct 2006 19:47
Ok, without using sparky's collision dll, does anyone know how to calculate the normal of a face when you intersect it?

Diggsey
20
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 19th Oct 2006 19:56
You could cast one line above the hit, and one to the right, and find the differences in the distances to the collisions. Use atanfull on each of the differences to get the two angles. You can then convert the angles to a normal

Nicholas Thompson
21
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 20th Oct 2006 11:19
This isn't relevant to this challenge - but whats the rule on use of media from the internet... I dont mean textures or models, but say the next challenge was an RSS news reader (like the Mac Screensaver which aggregates news via RSS from bbc, etc and uses it as a practicle screensaver). You could do that by using the windows DLL's to grab the RSS from the web into C:\ or the EXE's directory...

[center]
Ric
22
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 20th Oct 2006 13:34
Interesting one. Your specific example would be ok - according to clarification of the no-media rule, which says:

Quote: "You may not enter code that requires anything that must be downloaded, in order for the code to work"


The get out clause is the 'in order for your code to work' bit.

To clarify, it would be illegal to get your code to download media from the internet, in order to use the media that your code needs to work - this would be an obvious attempt to side-step the no-media rule, which is not allowed.

As an example, it would obviously be illegal to get your code to find a link to Sparky's collision dll, and then automatically download it to be used in your code.

However, if the challenge was to write a piece of code which can download or link to some form of internet media, then this would not contravene the rules, as you do not need the external media for your code to work. The judging would be based on the ability of your code to capture/process the media - not based on the quality of the media you captured.

It would, by the way, be a pretty cool challenge!

Zotoaster
21
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 20th Oct 2006 17:26
Damn right, and I wouldn't enter as I don't have the faintest on how to pull it off

Nicholas Thompson
21
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 20th Oct 2006 18:17
It'd be easy - if I set it, I'd probably provide the code to download the file as the real challenge is creating something which could read the string and break it up accurately.. Effectively writing an XML parser in DBP

I am going to try to enter THIS challenge over the weekend - I have the basis of a fun maths game involving flying numbers and a gun...

[center]
Diggsey
20
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 21st Oct 2006 01:51
I'm on holiday for a week from tommorrow, so don't expect any posts from me for a while

I'll be looking for some good games when I come back! (hint)

acelepage
22
Years of Service
User Offline
Joined: 2nd Jun 2004
Location: Plattsville
Posted: 21st Oct 2006 02:03
Code challange entry for maths game.

Title: Maximum
Game Play: 8x8 grid of numbers from 1 to 64. 2 players alternate picking numbers from the grid. One player picks from rows, other player picks from columns. Each number picked defines the next row/column for the next player.
Object: total the highest score.

Play 2 players, 1 player against the computer, or let the computer play itself.



( 2b || !2b ), that is the question. The answer: true
Ric
22
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 21st Oct 2006 03:11 Edited at: 21st Oct 2006 03:12
That's brilliant - AI, presentation, gameplay - it's got everything! I beat the computer on the third attempt - and had real fun playing it. That's one hell of a benchmark for the rest of us to compete against!

Gil Galvanti
21
Years of Service
User Offline
Joined: 22nd Dec 2004
Location: Texas, United States
Posted: 21st Oct 2006 03:17
@acelepage: Hmmm...it freezes up after the humming noise and intro thing, and I have to close it using the task manager, because it stops responding .

Pirates of Port Royale
Live the life of a pirate.
Hobgoblin Lord
20
Years of Service
User Offline
Joined: 29th Oct 2005
Location: Fall River, MA USA
Posted: 21st Oct 2006 08:49
Acelepage, great job. I have always loved this game think I first played it on a Data General. I remember making a version for the Vic-20 and C64 and have to say you did a hell of a job on the AI. it looks incredible for no media and I have to say that even if someone had posted this with media this would still stand up visually.

A++

http://www.cafepress.com/blackarrowgames
Check out my great stuff here
Diggsey
20
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 21st Oct 2006 12:34
My last message of the week:
BLOODY BRILLIANT!!!

(but that doesn't mean somebody can't do better)

Zotoaster
21
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 21st Oct 2006 13:52
Damn that's cool. It would boggle my mind just designing this thing.

Sixty Squares
20
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 21st Oct 2006 18:52
Same issue as Gil Galvanti here.

Ummm...
Daemon
20
Years of Service
User Offline
Joined: 16th Dec 2005
Location: Everywhere
Posted: 21st Oct 2006 21:47
Quote: "Same issue as Gil Galvanti here."

Here too.

Nicholas Thompson
21
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 21st Oct 2006 21:54
Which versions of DBP are you all using and which was it developed on?

[center]
Spopovich
20
Years of Service
User Offline
Joined: 12th Jul 2006
Location:
Posted: 21st Oct 2006 23:15
It worked fine for me and that was an amazing game. A great entry especially considering we have two more weeks.

Do not ask what the forums can do ask what you can do for the forums.
acelepage
22
Years of Service
User Offline
Joined: 2nd Jun 2004
Location: Plattsville
Posted: 22nd Oct 2006 01:54
Sorry to here it is not running on some machines. I wonder if it has to do with the memblocks it uses to create the sounds.
It was developed on the latest DBPro (which I believe it 6.20). I ran DBProVersionScan and it reports the DBPCompiler.exe is 1.05.

If you wish to debug, you could rem out all of the sound commands and see if it is the memblocks function that is hanging the compiler. Sound commands are on the following lines: 48-53, 263, 355, 380, 381, 397, 491. Try running without the sound commands and see if the same symptoms occur.

( 2b || !2b ), that is the question. The answer: true
Nicholas Thompson
21
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 22nd Oct 2006 02:19
Worked perfectly for me - I used 6.2.

That was simply fantastic!!! Hint: Put a sync rate 60 just after sync on otherwise it runs annoyingly fast (or at least it did on mine).

[center]
Nicholas Thompson
21
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 22nd Oct 2006 03:58
Ok here is my initial entry..


Idea/prinicple: Two player (Human Vs AI at first? Who knows!) basically you'll fire a beam to a number thats being projectiled towards you. A Green will give you that number of points, a red will lose you that many. Is this maths-ie enough?

[center]
Daemon
20
Years of Service
User Offline
Joined: 16th Dec 2005
Location: Everywhere
Posted: 22nd Oct 2006 08:32
I use version 6.2.
I tried remming out those lines (and line 669) but it still frose.

peabnuts
20
Years of Service
User Offline
Joined: 9th Nov 2005
Location: New Zealand
Posted: 22nd Oct 2006 12:37
this is irrelevant to the actual challenge, but i sorta found the rules a bit vague in parts..

for example, it says

Quote: "You may not do anything which attempts to ‘get around’ the rules. An example of this would be converting a media file, such as a .jpg, into a huge stream of data, and pasting it as data statements into your code. This is still classed as media."


yet a little further down it says

Quote: "You may use data statements in your code to assist in the creation of media, so long as it is data you have produced yourself, rather than copied/converted from existing media files."


granted it sort of says u can't use a jpg>data statements thing... but wouldn't say, creating a bitmap in photoshop be counted as pruducing it myself??

i just sorta thought it was a little unclear.

BTW does anyone know why my DBP doesn't have the convert to DATA statements command in the menu AT ALL..??
BillR
23
Years of Service
User Offline
Joined: 19th Mar 2003
Location: United States
Posted: 22nd Oct 2006 14:12 Edited at: 26th Oct 2006 11:44
@acelepage - Simply AMAZING!

Works fine for me, I have 6.2.
I have played 7 times, winning each one, but just by luck sometimes.
It can be so frustrating when the computer leaves you only small numbers to pick from.

Simply a great game, and a job well done!
I can't wait to play all the other entries too.
Nicholas Thompson
21
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 22nd Oct 2006 16:19 Edited at: 23rd Oct 2006 13:12
Slight update...


You can now shoot the numbers down.... I still need to think of a nice point to the game

[center]
Ric
22
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 22nd Oct 2006 18:57 Edited at: 23rd Oct 2006 01:30
@Aclepage: I had another look through your code to see if I could spot any obvious reasons why it's causing problems for some users. I think the sound memblocks are the most likely, but if they have already been eliminated as the cause, then you could check to make sure there is no drawing to areas outside of set bitmaps, which has been found to cause crashes on some pc's in the past. Also, although I doubt it, is it possible some users don't have 1024x768 capability - if so 'check display mode' is recommended before using 'set display mode'. Other than those things, I can see no other contentious bits of code in there.

@Peabnuts: The rule is saying that you can only use data statements if you or an editor written by you creates the data. However, converting a jpg into data statements is not 'creating' the data. You create the image, true, but Paintshop creates the data - and that's not allowed.

@Nick: It's not very mathsie at the moment, but if you put some simple arithmetic problems at the bottom of the screen, and made it so that you had to shoot the answers, it would be more 'mathsie' - or perhap you could be shooting the factors that make a certain total? Or the numbers in a progression .... just ideas.

Nicholas Thompson
21
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 22nd Oct 2006 19:50
I was thinking that you had to hit numbers to reach a total (or deplete a value to zero, like in Darts). Green takes you closer, red does the opposite...

[center]
Daemon
20
Years of Service
User Offline
Joined: 16th Dec 2005
Location: Everywhere
Posted: 23rd Oct 2006 02:50
Quote: "some users don't have 1024x768 "

My computer supports it, and I'm having problems with his code, so that's not it.

Ric
22
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 23rd Oct 2006 11:43
I still think the most likely source is the sound memblocks - try getting rid of the entire sound function (lines 576-642) as well as the play sound commands and see what happens.

Nicholas Thompson
21
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 23rd Oct 2006 13:13
Interestingly, my snippet above comes out with only grey numbers on my work machine (Intel graphics decelerator). Christ knows why! Works on my home machine....

[center]
Ric
22
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 23rd Oct 2006 21:07
Have you tried rgb values instead of hex values?

Phaelax
DBPro Master
23
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 23rd Oct 2006 21:29
Quote: "Phaelax entered 3 times!"


Yea, and I still lost!


I haven't disappeared completely. Something has been causing a serious memory leak on my system. Nothing open but IE and I get a low resource error and screen gets all screwy. Did all the usual stuff, nothing worked so I been spending my spare time lately doing backups. Finally got around to reformatting and threw on Vista last night, the public beta 5728.

"Using Unix is the computing equivalent of listening only to music by David Cassidy" - Rob Pike
Rburke
19
Years of Service
User Offline
Joined: 28th Sep 2006
Location:
Posted: 25th Oct 2006 14:04
Okay, I think I have done enough work to this. The game is called GravMath. Solve simple basic math under a time limit. use the number keys to enter in your answer then hit enter to submit them. Hit backspace to delete a number you have accidently entered. Hope you like it.

Login to post a reply

Server time is: 2026-07-13 19:35:10
Your offset time is: 2026-07-13 19:35:10