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
Must Program
18
Years of Service
User Offline
Joined: 22nd Nov 2007
Location:
Posted: 19th May 2008 18:29
heres my entry its a jokey entry




yay i win [/jokiness]

it should have been a txt based game
CuCuMBeR
23
Years of Service
User Offline
Joined: 11th Jan 2003
Location: Turkey
Posted: 19th May 2008 19:59 Edited at: 19th May 2008 20:03
Okay i did this in 4 minutes, just changed my code from previous challenge:



One thing id like to add here, there is a BUG with particle commands since DBPro 5.7 or below. Fog commands do not work when you have particles and advanced terrain together. So thats why i never use particles. Nothing related to these challenges but i believe these codes here should be re-usable for anyone so id suggest everyone to avoid particle commands.

Another thing is, with a decent texture, these codes in these challenges should be cut into half and things would be much easier.

There is always one more imbecile than you counted on.
jason p sage
19
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 19th May 2008 20:06
CuCuMBer - You See your honorable mention in the first post here: http://forum.thegamecreators.com/?m=forum_view&t=129759&b=5 It's for your Bryce'y clouds... (I'd a emailed ya but you don't have email published)

BMacZero
20
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 20th May 2008 01:54
It may have been way over your head, but you sure met the challenge, sinisterstuf.

And Must Program, test your code before you post it, for crying out loud!

Unterseeboot - Has you played it?
Los Mineros are on leave...
BMacZero
20
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 20th May 2008 03:17
Here's an early version of my entry. It's in 2D, I hope that's fine with you Jeff . Looks cool so far if I do say so myself. Now I just need to figure out how to generate some realistic water without media...



Unterseeboot - Has you played it?
Los Mineros are on leave...
sinisterstuf
19
Years of Service
User Offline
Joined: 28th Mar 2007
Location: Namibia, Southern Africa
Posted: 20th May 2008 08:29
Thanks bmaczero. Hmm... I wonder if I'll be able to do much for challenges now because I have exams coming up!

@jeffhuys
does the waterfall have to be made out of water?

Happy, always happy!
Penfold
22
Years of Service
User Offline
Joined: 3rd Dec 2003
Location: RED postbox houses of parliment
Posted: 20th May 2008 11:43
Quote: "does the waterfall have to be made out of water?"


I'm guessing so.. If it was LAVA it would be a lavafall..

Or porridge would be a porridgefall

'Ooh 'eck chief'...'crumbs'
sinisterstuf
19
Years of Service
User Offline
Joined: 28th Mar 2007
Location: Namibia, Southern Africa
Posted: 20th May 2008 12:02
No. I think that even though the word water is in the word waterfall I think that just because when you say waterfall yo mean water falling it could be something else. I think that, if yo look in literatures for example you will find plenty of other things described as waterfalls. Using waterfall as something like the opposite of fountain. So I think that waterfall is normally liquid movind downwards off something. So if you had lava or porridge falling you wouldn't say lavafall or porridge fall, normal people would say "a waterfall of lava" ...or porridge... or something else!

Happy, always happy!
jeffhuys
20
Years of Service
User Offline
Joined: 24th May 2006
Location: No cheesy line here.
Posted: 20th May 2008 16:40

CuCuMBer:
Really nice! Very clever, too!

bmaczero:
That one's very cool, even though it's 2D! Ofcourse you will get bonus points if you have it in 3D. But 2D is fine too!


Quote: "No. I think that even though the word water is in the word waterfall I think that just because when you say waterfall yo mean water falling it could be something else. I think that, if yo look in literatures for example you will find plenty of other things described as waterfalls. Using waterfall as something like the opposite of fountain. So I think that waterfall is normally liquid movind downwards off something. So if you had lava or porridge falling you wouldn't say lavafall or porridge fall, normal people would say "a waterfall of lava" ...or porridge... or something else!
"


Yes, it needs to be made out of water. Make it as realistic as you can .


***

Can anyone achieve this?



You're the 'th to view this signature!
BMacZero
20
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 20th May 2008 16:44
I actually don't like that very much, it looks like a pile of cobwebs

Unterseeboot - Has you played it?
Los Mineros are on leave...
CuCuMBeR
23
Years of Service
User Offline
Joined: 11th Jan 2003
Location: Turkey
Posted: 20th May 2008 19:21
Quote: "Can anyone achieve this? "


Sure, if you let us use media.

Okay here i added some more stuff, still looks disgusting though..if only i was allowed to use some media..



There is always one more imbecile than you counted on.
RedFlames
18
Years of Service
User Offline
Joined: 25th Aug 2007
Location: Germania
Posted: 20th May 2008 20:59 Edited at: 21st May 2008 08:31
i started a 2D-terrain-waterfall-sideview-landscape, but i havent done anything about the hardest part - the water - yet ^^

Terrain:


will be more like particles i think, please tell me if it works ( the recursive-filling sometimes loops endless and causes the app to crash )

Garzu
21
Years of Service
User Offline
Joined: 31st Oct 2004
Location: London
Posted: 21st May 2008 12:39
knowing next to nothing about shaders, I thought I'd post a related question.

these challenges are medialess, but as i beleive, shaders are text based, so you could have your code to write out a text file containing the code for a water shader, and load that into your challenge entry (along with some suitable wibbly wobbly moving mesh thing)?

Penfold
22
Years of Service
User Offline
Joined: 3rd Dec 2003
Location: RED postbox houses of parliment
Posted: 21st May 2008 15:02
yuppers/ only reason for no media is no faffing about downloading and making sure its in the right folder etc.. all code should be easilly be cut n paste into the editor

'Ooh 'eck chief'...'crumbs'
Ric
22
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 21st May 2008 16:14
Quote: "these challenges are medialess, but as i beleive, shaders are text based, so you could have your code to write out a text file containing the code for a water shader, and load that into your challenge entry "


Shaders are not allowed in these challenges I'm afraid. This question has cropped up before - shaders are not DBPro code, they are HLSL (higher level shader language), and the very first rule of these challenges is that all code must be pure DBPro.

Penfold
22
Years of Service
User Offline
Joined: 3rd Dec 2003
Location: RED postbox houses of parliment
Posted: 21st May 2008 16:17
my bad

'Ooh 'eck chief'...'crumbs'
jeffhuys
20
Years of Service
User Offline
Joined: 24th May 2006
Location: No cheesy line here.
Posted: 21st May 2008 17:56
I think he means that the program writes a .fx file. That you programmed it to export a textfile with a .fx extension.



You're the 'th to view this signature!
BMacZero
20
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 22nd May 2008 03:30 Edited at: 22nd May 2008 03:31
But that's still against the rules even if that's the case, isn't it?

Anyway, here's a new version of my entry. I added some nifty mist. Less noticable but equally important, I converted the program to need only 10 or so sprites for the water rather than the 850 I had before . lol



Unterseeboot - Has you played it?
Los Mineros are on leave...
RedFlames
18
Years of Service
User Offline
Joined: 25th Aug 2007
Location: Germania
Posted: 22nd May 2008 15:14 Edited at: 22nd May 2008 15:15
my first version with water:
(uses paste image + box command = sloooo00oow ._. )
(but it saves the terrain to a BMP to load faster next time)



i think ill have to use sprites ^^

jeffhuys
20
Years of Service
User Offline
Joined: 24th May 2006
Location: No cheesy line here.
Posted: 22nd May 2008 18:05
bmaczero:
Excellent work! Looks really nice now!

RedFlames:
Cool , but a pain it is too slow... Try sprites indeed!

Everyone:
I think I'll move the deadline to +1 week. So not this sunday, but next sunday the judgements will be. (It is now Thursday here, so not 3 days, but 10 days left! Thank you.



You're the 'th to view this signature!
jeffhuys
20
Years of Service
User Offline
Joined: 24th May 2006
Location: No cheesy line here.
Posted: 22nd May 2008 18:09
Quote: "Shaders are not allowed in these challenges I'm afraid. This question has cropped up before - shaders are not DBPro code, they are HLSL (higher level shader language), and the very first rule of these challenges is that all code must be pure DBPro. "


From the rules:

Quote: "You may create pictures within Dbpro, and have your code save them as picture files, and load them back again (to be used as an advanced terrain texture, for example), so long as your code does all this with one single execution."


Therefore, I think it is allowed.



You're the 'th to view this signature!
BMacZero
20
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 23rd May 2008 01:47
Thanks Jeff!

@RedFlames: Your code won't run for me. It opens a window briefly and then immediately closes

Unterseeboot - Has you played it?
Los Mineros are on leave...
Ric
22
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 23rd May 2008 14:05
Quote: "You may create pictures within Dbpro, and have your code save them as picture files, and load them back again (to be used as an advanced terrain texture, for example), so long as your code does all this with one single execution."

Therefore, I think it is allowed."


Nope, sorry. Just because it satisfies one rule does not make it ok. Entries must adhere to ALL of the rules.

As I stated before, shaders are not media, they are a language, and therefore the entry would not be pure DBPro, thus contravening rule number 1. If we allowed this, then the flood gates would be open to other non DBPro scripting languages being used. It is possible, for example, to write strings of VBScript or JavaScript into your code, save them out as a text file with a .vbs or .js extension, and call the windows script host (wscript.exe) to execute it, all with the one single execution of your DBPro code. But it really defeats the whole point of having a DBPro challenge if we allow entries with elements written in other languages.

Besides, spare a thought for those people who might be running DBPro on a PC that doesn't support shaders, like many school PC's for example.



Must Program
18
Years of Service
User Offline
Joined: 22nd Nov 2007
Location:
Posted: 23rd May 2008 14:19
im a bit behind whats the current challenge

Working on The Hunt and 7 Stages both are text based games want a demo of either then just ask.
RedFlames
18
Years of Service
User Offline
Joined: 25th Aug 2007
Location: Germania
Posted: 23rd May 2008 18:16
just go back one page and look... it maybe even has bold and underlined headlines so you'll see it easy

I wont tell you, lazy guy

jeffhuys
20
Years of Service
User Offline
Joined: 24th May 2006
Location: No cheesy line here.
Posted: 23rd May 2008 18:36
Quote: "Nope, sorry. Just because it satisfies one rule does not make it ok. Entries must adhere to ALL of the rules.

As I stated before, shaders are not media, they are a language, and therefore the entry would not be pure DBPro, thus contravening rule number 1. If we allowed this, then the flood gates would be open to other non DBPro scripting languages being used. It is possible, for example, to write strings of VBScript or JavaScript into your code, save them out as a text file with a .vbs or .js extension, and call the windows script host (wscript.exe) to execute it, all with the one single execution of your DBPro code. But it really defeats the whole point of having a DBPro challenge if we allow entries with elements written in other languages.

Besides, spare a thought for those people who might be running DBPro on a PC that doesn't support shaders, like many school PC's for example.


"


Yes, you are right My bad A shame really, it could be so much fun ^^

Jeff



You're the 'th to view this signature!
BMacZero
20
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 24th May 2008 02:00
@MustProgram: The challenge is to make a waterfall.

@RedFlames: See? That wasn't so hard

Unterseeboot - Has you played it?
Los Mineros are on leave...
RedFlames
18
Years of Service
User Offline
Joined: 25th Aug 2007
Location: Germania
Posted: 24th May 2008 15:04
Ok i changed it to Sprites and improved it a bit:


Next i'll try to add splashing/mist...

BMacZero
20
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 24th May 2008 15:59
It still won't work for me RedFlames...it just closes.

Unterseeboot - Has you played it?
Los Mineros are on leave...
RedFlames
18
Years of Service
User Offline
Joined: 25th Aug 2007
Location: Germania
Posted: 24th May 2008 16:12 Edited at: 24th May 2008 16:14
Oh... could be because the filling-algorithm hangs up... maybe i can convert the image to data-statements for you. (or upload it, so you place it into the exe's folder and its loaded instead of generated)

Anyway first of all here's the new version with mist/splash:


Edit: before it closes, does the Window-Title say "Generating Terrain..." ? or "Setup..." or "Water Demo" ^^

BMacZero
20
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 24th May 2008 16:18
I'm not sure, its too fast. And the problem with your filling thing is that it creates an infinite loop - it keeps calling itself. That can probably be fixed

Unterseeboot - Has you played it?
Los Mineros are on leave...
RedFlames
18
Years of Service
User Offline
Joined: 25th Aug 2007
Location: Germania
Posted: 24th May 2008 16:32 Edited at: 24th May 2008 17:10
yeah but i dont know how

and i just tried to convert a 800x600 image to "data r,g,b,r,g,b,..." for every row... its a "little bit" much
(even if its "one" data-line its wrapped to 1300 lines in synergy )

Edit: does it work if you comment out line 35 ("fill2(5,50)") ?
(would just give white terrain

Sorry, cant help you ... but im wondering why it compiles for me...

New Version: improved gravity (bounce/splash on ground)


CuCuMBeR
23
Years of Service
User Offline
Joined: 11th Jan 2003
Location: Turkey
Posted: 24th May 2008 16:54
Here is some fake reflection kinda thing added.


There is always one more imbecile than you counted on.
BMacZero
20
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 24th May 2008 19:18 Edited at: 24th May 2008 19:20
@RedFlames:

Ah, it works if I comment line 34. I looks pretty neat, I especially like how they splash when they hit the ground. But it's really, really slow. You better work on that mainly.
Also, if you could find some way of doing CCD on the particles so they don't fall through the floor (which they do often), that would improve it a lot.

@CuCuMBeR:

Cool reflection!

Unterseeboot - Has you played it?
Los Mineros are on leave...
RedFlames
18
Years of Service
User Offline
Joined: 25th Aug 2007
Location: Germania
Posted: 24th May 2008 22:15
comment out line 35 instead, because if you comment out 34 the terrain is just a line and collision will not work. with 35 commented the terrain will be completely white (maybe delete "terrain.bmp" first or it'll be reused with the line)

i'll attach the right terrain.bmp with this post so you can use it along with the executable.

BillR
23
Years of Service
User Offline
Joined: 19th Mar 2003
Location: United States
Posted: 25th May 2008 03:53 Edited at: 25th May 2008 04:58
@RedFlames - Nice Job!

I only get 5 fps with 300 particles, so I changed Pnum to 100, then I get 15fps. I guess I need a faster computer.

I wrote a quick fillline function because I was having water fall through the ground, it seems to help, you may use it if you like.


***This is not an entry by me - just me playing with RedFlames code.

I like the misting, very nice.
CuCuMBeR
23
Years of Service
User Offline
Joined: 11th Jan 2003
Location: Turkey
Posted: 25th May 2008 12:44
That was cool BillR, however i get some sort of a glitching like the simulation resets itself once in a while.

There is always one more imbecile than you counted on.
BillR
23
Years of Service
User Offline
Joined: 19th Mar 2003
Location: United States
Posted: 25th May 2008 14:47
Glad you liked it, but it is not my code, it is RedFlames.
jeffhuys
20
Years of Service
User Offline
Joined: 24th May 2006
Location: No cheesy line here.
Posted: 25th May 2008 16:02
@BillR: Nice edit, but I get 15 fps too at PNum = 100. I have GeForce 8800GT and Core2Quad Q6600...



You're the 'th to view this signature!
Penfold
22
Years of Service
User Offline
Joined: 3rd Dec 2003
Location: RED postbox houses of parliment
Posted: 25th May 2008 20:50 Edited at: 25th May 2008 20:50
Hmm not getting as far as I'd like to, particles seem to be coming out of the bottom of the emitter as well as the top.

Looks a bit poo, hopefully I'll make it a bit better before next week. and YES no media as you can tell from the cone trees.



'Ooh 'eck chief'...'crumbs'
RedFlames
18
Years of Service
User Offline
Joined: 25th Aug 2007
Location: Germania
Posted: 25th May 2008 21:32
Looks really good...
...but where is the code

jeffhuys
20
Years of Service
User Offline
Joined: 24th May 2006
Location: No cheesy line here.
Posted: 25th May 2008 22:28
Wow seems nice man, Penfold!
Keep up the good work!



You're the 'th to view this signature!
bergice
19
Years of Service
User Offline
Joined: 5th Jun 2007
Location: Oslo,Norway
Posted: 25th May 2008 22:44
@jinzai > Thanks!


Dont delete my sig mods, it is 600X120...
Slash!
Penfold
22
Years of Service
User Offline
Joined: 3rd Dec 2003
Location: RED postbox houses of parliment
Posted: 25th May 2008 23:54
I'll post the code during the week. got a lot of bugs n issues to sort out.

'Ooh 'eck chief'...'crumbs'
BillR
23
Years of Service
User Offline
Joined: 19th Mar 2003
Location: United States
Posted: 26th May 2008 06:53
@jeffhuys - That can't be right, only 15fps, and you have a SCREAMING system.

I only have a dual cpu mobo
two AMD MP 1800+ cpu's
nVidia GeForce 3 Ti/200 64k video card (weak, I know)
1 Gig RAM
Windows XP SP2

Are you using Vista?
Something is holding your system back I think.
There is a sync rate 30 command in the code, you might try changing it to zero
I would have expected 100+fps from your system
jeffhuys
20
Years of Service
User Offline
Joined: 24th May 2006
Location: No cheesy line here.
Posted: 26th May 2008 08:46 Edited at: 26th May 2008 08:48
@BillR:
I don't know it comes from my system. It CAN'T be, I agree. But DBPro is the thing that holds my system back. I think that DBPro can't handle 2D images so well, really less than 3D graphics. Look, my system runs Crysis at Highest in XP (I have XP) at this moment, so nothing is holding my system back .

Jeff



You're the 'th to view this signature!
acelepage
22
Years of Service
User Offline
Joined: 2nd Jun 2004
Location: Plattsville
Posted: 28th May 2008 19:27
Waterfall entry.



( 2b || !2b ), that is the question. The answer: true
BillR
23
Years of Service
User Offline
Joined: 19th Mar 2003
Location: United States
Posted: 29th May 2008 01:35
@acelepage - Wow, that's really nice!

Your variable max is a reserved word for a DBPro Expansion pack, try to get used to saying maxwhat?, like maxitems, or maxobjects, etc, thanks. It gets to be a pain to change all your max to max2, or something else.

Hey, nice job with your waterfall.
acelepage
22
Years of Service
User Offline
Joined: 2nd Jun 2004
Location: Plattsville
Posted: 29th May 2008 03:41
Thanks for the pointer BillR. I often get caught using reserved words, and not just in DBP (I somwtimes to use reserved words in SQL for column names, and then my queries don't work). I will remember to be more descriptive with the variable names, and avoid that issue in the future.

Thanks for the compliment

( 2b || !2b ), that is the question. The answer: true
jeffhuys
20
Years of Service
User Offline
Joined: 24th May 2006
Location: No cheesy line here.
Posted: 29th May 2008 17:13
acelepage: Really nice, indeed. But I had to put in a Sync command to make it work Yes. Really nice



You're the 'th to view this signature!

Login to post a reply

Server time is: 2026-07-17 23:24:54
Your offset time is: 2026-07-17 23:24:54