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
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 18th May 2006 14:01
f = fault formation randomize
r = randomize
s = smooth
n = calculate normals


Nicholas Thompson
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 19th May 2006 01:08 Edited at: 19th May 2006 01:09
aaaaaaaaaaaaaaaaaaaaaand here is my entry:


The terrain is randomly generated using the fault line method + multiple pass smoothing.
The clouds are produced using the heights of the terrain to produce the alpha channel mapped onto some randomly chosen shades of grey.

No time to do anymore... you may hand me my trophie now hehe..

Oh yeah - I get about 650fps out of that code...

EDIT: Screeny..


[center]

Attachments

Login to view attachments
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 19th May 2006 10:35
Nick

Thanks for that. I get an fps of about 42 on my machine (but it's almost as old as me).

Strangely, the camera was in a completely different position the second time I ran it, so it looked like a fish tank without the glass or fish.

I'll hold off awarding you your prize for a bit ...

I wonder if digital dude RELOADED is going to offer an update to amaze us?
Nicholas Thompson
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 19th May 2006 11:18
Thats interesting - I just tried it on my work machine (which is ANYTHING but a games machine - more of a glorified calculator) And this is what it produced - it doesn't seem able to render all the terrain...

[center]

Attachments

Login to view attachments
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 19th May 2006 12:34
Yeah, this is what I get.

Attachments

Login to view attachments
Nicholas Thompson
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 19th May 2006 12:47
bugger... Lol!! Well I can assue you it looked like the first screenshot on mine!! I doubt it can be a poly limit - the terrain is 128x128... with 2 poly's per square, so thats 32768 poly's... well within DBP's limits!

[center]
The end is near
19
Years of Service
User Offline
Joined: 19th Jun 2005
Location: USA
Posted: 20th May 2006 00:17
i will be away from the computer this week-end so here it is:


stargate sg-1 the one show that never gets old
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 20th May 2006 00:34
digital dude RELOADED

Thanks. I liked the lightning and the rain - shame it was so slow though (fps about 5 on my machine). There was some discussion on the Bug Reports list about high object id numbers causing an fps slowdown - not sure it was resolved. You are using a large number of objects though.

Some nice effects there.
Daemon
18
Years of Service
User Offline
Joined: 16th Dec 2005
Location: Everywhere
Posted: 20th May 2006 03:00
Sorry I haven't improved my code much, but I keep getting too much English homework.

I changed the sky slightly and that is all.



Insanity is just a state of mind
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 20th May 2006 05:52 Edited at: 20th May 2006 05:53
Nic, when I ran yours it looked like the screenshot.

Digital, where'd the waterfall go? It also locked up when I tried to exit.


Well, I thought to myself that my island needs some plants. But there's no media allowed, so could I make something look realistic without textures? Hmmm, well a fern sounds like a tropical island plant. Fern fractal?.......



A little slow, given the amount of passes and blurring. I was quite satisfied with the results, considering I wrote the thing soley based on an image created by the fern fractal.



Attachments

Login to view attachments
Lost in Thought
20
Years of Service
User Offline
Joined: 4th Feb 2004
Location: U.S.A. : Douglas, Georgia
Posted: 20th May 2006 07:30 Edited at: 20th May 2006 08:08
@Nicholas Thompson Make sure you limit it to 21845 or less polys per limb (use more than 1 limb).

[edit] Not saying there may not be a flaw in the code as I haven't looked at it really. I haven't had any luck with limbs over that limit though.

Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 20th May 2006 07:30 Edited at: 20th May 2006 07:32
This may be my last entry, I'm hexed at working on this. Just got a bloody nose and spilled water all over the desk.



f = fault formation randomize
r = randomize
s = smooth
n = calculate normals
p = repopulate ferns across map




Attachments

Login to view attachments
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 20th May 2006 11:24 Edited at: 20th May 2006 12:01
Thanks for the late entries, guys. Still 38 minutes to go ... then the painful bit.

@Phaelax

I like the ferns - but it should be possible to do it much faster. Will post some code when I remember ...

Edit: time's up!
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 20th May 2006 12:43 Edited at: 20th May 2006 12:44
I can't think of any optimizations for the fern, but I didn't have anything to go on really. I'll do some research. There's probably an actual equation I should be using.

Are you the judge GG?


Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 20th May 2006 13:30
Yes, I'm the judge and here are some preliminary comments:

Alexb Orsova
Good day/night effect and sunrise. Shrubs/trees look like tombstones (blame my wife for that comment!). Sea like a bedspread with waves. Can't explore terrain properly.

Daemon
Good waves lapping the shore. Sea is mountainous. Trees look like seaweed.

digital dude RELOADED
Lightning very good. Colouring good. Liked the rain - but a bit hard to see. Slow to load/exit from program. Couldn't see waves on the sea (not sure though!).

Nicholas Thompson
Looked promising. Has potential ...

Phaelax
Discworld sky. Ferns good. Not much happening on the sea.

Ric
Great clouds. No terrain (or sea?). Has potential ...

RiiDii
Reeds good. No difference between sea and sky. No waves. Terrain good but sometimes disappeared/reappeared for no obvious reason as terrain is explored. Has a lot of potential ...

Sven B
Excellent waterfall (wife's comment). Sea textured but not moving. Sky blank. Good colour overall.

and the shortlist (in no particular order) is ...

Daemon, digital dude RELOADED, Phaelax.

Final decision in a few minutes after yet another cup of coffee ...
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 20th May 2006 14:21
OK. Decision time.

There was a lot to consider in this challenge.

digital dude RELOADED produced the visually most interesting scene, but was let down by the slow running and absence of an obvious wave effect - and exiting was very awkward on my machine. Also, the camera moved all the time which made it hard to examine the landscape.

Phaelax was the only one to include controls for experimenting with constructing the terrain - but the sea was uninteresting.

Daemon followed the original brief quite closely. The code was quick to run, the terrain had hills (but was a bit chunky). The sea had (rather large) waves which washed over the terrain (alarmingly sometimes) and the sky had random clouds.

By a narrow margin, the runner up is

digital dude RELOADED

and the winner is

Daemon !!
McLaine
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location:
Posted: 20th May 2006 15:42
Damn!

I guess you are in America then.

it's only 1:40pm here and I'm working madly on my entry.

Ah well, I'll catch the next challenge, but here's my effort so far ...

Evolving Island ....



I've nicked the normal and smoothing code from other entries just so you know.

It's not my fault!
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 20th May 2006 16:36
No, I'm in Cornwall UK and the deadline was 10am UK time today - it is now 2:35pm.

Will look at your code after lunch even though it's too late for the challenge.

It's Daemon's turn to set and judge the next challenge.
Daemon
18
Years of Service
User Offline
Joined: 16th Dec 2005
Location: Everywhere
Posted: 20th May 2006 18:00
I just read that I won. Yay!

My friend has a birthday party now, so I have to go to that before I can take the time to come up with an idea for the next challenge.

Feel free to make suggestions.

Insanity is just a state of mind
The end is near
19
Years of Service
User Offline
Joined: 19th Jun 2005
Location: USA
Posted: 20th May 2006 18:28
good job daemon!

stargate sg-1 the one show that never gets old
McLaine
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location:
Posted: 20th May 2006 18:35
No problem at all.

More interested in the challenges than the winning.

It's not my fault!
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 20th May 2006 19:25
ah crap! lost again.

Daemon's trees may have looked like seaweed, but I thought they were cool.

Quote: "More interested in the challenges than the winning"

ahh the justifications of the losers. lol, just kidding.

congrats all, and may i hope to beat you all next time! (sry, im just a competitive person) I was expecting Ric to blow us away with some fancy graphics like he usually does.

Hmm, I usually have some idea for challenges but I'm drawing a blank at the moment.


Alexb Orsova
18
Years of Service
User Offline
Joined: 6th Dec 2005
Location:
Posted: 20th May 2006 20:13
how about a working model of something? galaxy(planets, moons, spacejunk), engine(moving parts),etc...

[img]
www.danasoft.com/sig/customsig15525.jpg
[/img]
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 20th May 2006 20:19
For the record, here's what would have been my entry if I'd been competing. It doesn't have waves - and you can disappear under the sea if you are not careful! Also the fog isn't quite right. Also the colouring levels could be improved.

All the textures (and the modification of the initial heightmap) are based on the initial image. All the images are saved for you to play with.

One feature you might be interested in is that the textures tile seamlessly - try them.

The program goes through a series of steps before you see the final terrain, etc. The slow part is the blurring of the initial heightmap - and I am sure it can be speeded up.

Here's the code:

Nicholas Thompson
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 20th May 2006 22:08
How about a terrain editor that could export dbo's or heightmaps?

[center]
Chris Franklin
19
Years of Service
User Offline
Joined: 2nd Aug 2005
Location: UK
Posted: 21st May 2006 00:03
Quote: "How about a terrain editor that could export dbo's or heightmaps?
"

Ditto i have some awesome ideas for that

Theme park simulator wip boards
Daemon
18
Years of Service
User Offline
Joined: 16th Dec 2005
Location: Everywhere
Posted: 21st May 2006 04:39
I am glad that Green Gandalf couldn't win his own challenge.

My top three ideas for the next challenge were...
-Make the next grand theft auto
-Create MMORPG
-Go with what people are suggesting and make it be a terrain editor

After long consideration I decided upon the terrain editor, as the others would take a while with no media.

I think two weeks is how long it should take. (By then school will have ended for me!)
I would like to end it Sunday, June 4 at 10:00 am, U.S. eastern time; that way I know I can be there to judge it.

I may add suggestions to what should be added later, but as of now this is the challenge-

-Create a terrain editor
-Must be able to save as .dbo and as a heightmap.

Insanity is just a state of mind
Nicholas Thompson
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 21st May 2006 11:01
yay

[center]
Chris Franklin
19
Years of Service
User Offline
Joined: 2nd Aug 2005
Location: UK
Posted: 21st May 2006 11:33
YAY!

Theme park simulator wip boards
Admin 7737
18
Years of Service
User Offline
Joined: 14th May 2006
Location: Japan... I WISH!!
Posted: 21st May 2006 17:18
Boo!

-----------------------------------------------------------
Im in A race With 5 People And I'm in third, I over Take 2nd, In what position am I? (Email me for the Answer!)
Chris Franklin
19
Years of Service
User Offline
Joined: 2nd Aug 2005
Location: UK
Posted: 21st May 2006 17:22
Cut your spamming

Theme park simulator wip boards
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 21st May 2006 22:36
boring. Look at Chris's signature "landscape creator", he's already done.


Chris Franklin
19
Years of Service
User Offline
Joined: 2nd Aug 2005
Location: UK
Posted: 21st May 2006 22:39
lol
That's Digital Zenith I'm beta testing their software I haven't actually made the app

Theme park simulator wip boards
Nicholas Thompson
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 21st May 2006 22:46
Even though he may have done one - is it media free? hehe... I think Phaelax is scared of a challenge!

[center]
Nicholas Thompson
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 21st May 2006 22:47
@Green Gandalf: You didn't by any chance collate the code you used for your judging so I could easily add it to the database did you?

[center]
Chris Franklin
19
Years of Service
User Offline
Joined: 2nd Aug 2005
Location: UK
Posted: 21st May 2006 23:10
Well i'll enter later on i've got a stunt driving game to make

Theme park simulator wip boards
Daemon
18
Years of Service
User Offline
Joined: 16th Dec 2005
Location: Everywhere
Posted: 22nd May 2006 00:48 Edited at: 22nd May 2006 00:51
Quote: "Look at Chris's signature "landscape creator", he's already done."


I did look at his signiture. I even went to the website to make sure that he hadn't done this before. Most of all I played with the funny menu thing at the top of the website. You should try moving your mouse really quickly over the options in the image at the top.

Insanity is just a state of mind
Ric
20
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 22nd May 2006 00:53
@Daemon: Congratulations on winning the challenge - nice work.

@GG: Good job at motivating, judging and giving feedback - three important jobs of any challenge setter! Looks like collating entries is going to be added to the list if Nick is persuasive enough! I also liked your non-judgable (is that even a word?) entry - especially the way the code tells you and shows you what it's doing at each stage.

Sorry I didn't get time on this challenge - I've been moving house. Plus I wanted to give everybody else a chance to win.

Terrain editor, eh? Sounds interesting, and may give people a reason to learn about the dbo format.

Nicholas Thompson
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 22nd May 2006 01:16
Well - I have the first entry....



Controls:
w = toggle wireframe
move mouse = moves the "pointer"
Hold Right mouse button = enabled height change mode
scroll the mouse wheel = change the height...

I think I'll change the height editing mode - I dont like it.. It kills my mouse!

I'm also going to add in the option for a "brush size"

[center]
Nicholas Thompson
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 22nd May 2006 01:24
Ok - version 1.1



Hold right mouse button and move the mouse up and down to edit the terrain.... Same Wireframe button as before too...

[center]
Daemon
18
Years of Service
User Offline
Joined: 16th Dec 2005
Location: Everywhere
Posted: 22nd May 2006 03:35 Edited at: 22nd May 2006 03:35
@Nicholas Thompson
That was quick.
The camera angle makes it difficult to move points that have already been moven down or up. Once I do get my mouse onto a point that has moved up or down the camera flys towards it and then my pointer is no longer where I wanted it to be.

So far so good. I hope more people take part in this challenge than the two people who suggested it.

Insanity is just a state of mind
Segan
19
Years of Service
User Offline
Joined: 28th Aug 2005
Location: Canada
Posted: 22nd May 2006 06:01
I think I'm finally going to do this one, though it will probably become more a learning experience than a competitive entry (since I know practically nothing about advanced terrain, vertexes, or the dbo format).
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 22nd May 2006 06:49 Edited at: 22nd May 2006 10:37
Quote: " I think Phaelax is scared of a challenge! "


nope, its just that I wrote one awhile back. (media free)


Actually guys, i think im gonna take a break from this one. I've suddenly got interested in my RTS tutorial again so I'm going to work on that instead over the next. And in 3 weeks, I have my finals in technical writing and java programming, about the same week my gf is suppose to move it.

"Using Unix is the computing equivalent of listening only to music by David Cassidy" - Rob Pike
Nicholas Thompson
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 22nd May 2006 10:57
@Deamon - I agree - the camera is hard... Its next on my agenda for tweaking.

@Segan: AT basically requires a nice heightmap (greyscale image), Vertexes is like my example above and dbo format is handled for you by the save object command

[center]
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 22nd May 2006 14:21
@Nicholas Thompson

I've kept each version that was submitted for the challenge, e.g. "Daemon v1.dba", etc. What form would you like them in? A single zip file is easiest for me and I can post it here - I might need to change some of the names since I abbreviated some of them, e.g. DDR for digital dude RELOADED.

Let me know what you want exactly and I'll deal with it later today.

@Ric

Thanks for your comments. I enjoyed judging the challenge - it was particularly interesting to see the different approaches that people used. I was also impressed by the fact that every entry actually worked (some better than others of course) and none hung my machine or behaved weirdly - something of a novelty in itself.
Nicholas Thompson
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 22nd May 2006 14:28
@GG: A zip of entries would be fantastic!

[center]
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 22nd May 2006 14:46
@Nicholas Thompson

Just tried your two entries. Both failed to compile for the same reason. You've got a comment line ending with "..." which is the default line concatenation symbol. The result is that the next line is ignored by the compiler (even though it's not greyed out by the editor) - and since it is an "if" statement the compiler has a fit. I changed it to just .. and both versions compiled fine.

I'm using U6RC10 and I think comments are handled slightly differently now.

Perhaps I should spend some time on an entry of my own ... (or should that be .. ?).
Nicholas Thompson
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 22nd May 2006 14:48
now thats interesting - my default concatenation string is underscore (_)

I have had issues with comments before - I'll tweak it later

[center]
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 22nd May 2006 15:00
@Nicholas Thompson

Here's the zip file - it includes the valid entries plus the three invalid ones:
1. Homey The Clown - wasn't really making an entry and it contained media.
2. McLaine's entry - missed the deadline.
3. My own non-entry!

Feel free to delete them.

Attachments

Login to view attachments
Darth Vader
19
Years of Service
User Offline
Joined: 10th May 2005
Location: Adelaide SA, I am the only DB user here!
Posted: 22nd May 2006 15:32
Nicholases entry worked for me!

When in Trouble with anything visit here your number one stop for help

Login to post a reply

Server time is: 2024-11-25 00:20:49
Your offset time is: 2024-11-25 00:20:49