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
Alexb Orsova
18
Years of Service
User Offline
Joined: 6th Dec 2005
Location:
Posted: 10th May 2006 02:03 Edited at: 10th May 2006 03:58
@GG

I didn't feel like re-doing the entire camera system so I simply added on to it.

[EDIT]
@GG

I forgot to mention, the +/- keys do something for both camera modes.
Ric
20
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 10th May 2006 02:59
Quote: "I'm still thinking about domains - do people like db-site pr dbpro-site ?"


Those are more like it. DBPzone is also available. I have heard people say you should avoid hyphens ( - ) in domain names if possible, as people tend to forget them when trying to type into the address bar and end up at the wrong site (usually your competitor who got the domain without the hyphen in it before you did!) I've been rethinking my sector-1.net domain for exactly that reason - too many people remembering the 'sector1' bit, but not the - and the .net bit. By the way, on the off-topic of website development, have you heard anything good/bad about Fusion9 (or whichever version) as a website design and management tool? I want to make a professional looking website but don't want to spend much time on it, or have to go on a training course to be able to use it.

BillR
21
Years of Service
User Offline
Joined: 19th Mar 2003
Location: United States
Posted: 10th May 2006 03:32
I like dbpro being in the name, since we are supporting dbpro and not db classic.
Daemon
18
Years of Service
User Offline
Joined: 16th Dec 2005
Location: Everywhere
Posted: 10th May 2006 04:31
I have to go to bed so I have no time to comment on my program so far, but here it is.



I have DBPro 6.0.

Insanity is just a state of mind
Alexb Orsova
18
Years of Service
User Offline
Joined: 6th Dec 2005
Location:
Posted: 10th May 2006 04:42 Edited at: 10th May 2006 22:26
testing my sig...again...and again...and again...and again...and again...

[img]
www.danasoft.com/sig/customsig15525.jpg
[/img]
The end is near
19
Years of Service
User Offline
Joined: 19th Jun 2005
Location: USA
Posted: 10th May 2006 05:31 Edited at: 10th May 2006 05:31
alex- ([img]www.danasoft.com/sig/customsig15525.jpg[/img])



put [] around the img and /img
imgwww.danasoft.com/sig/customsig15525.jpg/img

stargate sg-1 the one show that never gets old
RiiDii
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Inatincan
Posted: 10th May 2006 10:23
Great waves Nic!


Open MMORPG: It's your game!
Nicholas Thompson
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 10th May 2006 11:11
@Ric - I have never used Fusion 9 (or heard of it for that matter). I'm using Drupal as a CMS for my site's from now on - with a little learning its fantastically powerfull.

I think I'll go for dbpro-site.com. I agree about the hyphen in the URL - it tends to be forgotten, however the hyphen helps search engines - they break up domain names on hyphens... also, dbprosite.com looks wrong

@riidii - cheers I just tried it on my work machine and get no less than 17fps (I got about 200-300 on my home machine). I've had a thought abuot how to make it better though - using normal mapping

Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 10th May 2006 11:15
@Daemon

Thanks for the entry - and for letting me know the DBP version. A good start.

Just three comments:

1. the terrain is rather dark
2. you might want to ensure the camera stays above the terrain
3. the bushes are sometimes below the water.

You've still got over a week to make improvements.

@Nicholas Thompson

Hope you can make an entry. Great wave effect. Here is a modified version of your earlier code with changes to the uv data so you can use a texture. I've attached the texture I was using.

Attachments

Login to view attachments
Nicholas Thompson
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 10th May 2006 11:33
@GG - nice! Shame you didn't use the code I posted above - then you wouldn't have the whole edge-not-moving issue.

Darth Vader
19
Years of Service
User Offline
Joined: 10th May 2005
Location: Adelaide SA, I am the only DB user here!
Posted: 10th May 2006 17:00
Sort of of topic but I have a question.
How many of you guys learned to program in Dark Basic pro by studying other peoples code snippets?
Is this a good way to learn?
Thanks!


When in Trouble with anything visit here your number one stop for help
Nicholas Thompson
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 10th May 2006 17:22
*looks for a hands up smily*

I also learned by setting my self challenges - the hardest part was always finding something to program about! These threads solve that problem. My plan is to use these threads to learn techniques and produce my own codebase of functions/methods/idea's/theories and eventually produce a kickass game which I can retire on

Ric
20
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 10th May 2006 20:07
Quote: "How many of you guys learned to program in Dark Basic pro by studying other peoples code snippets?
Is this a good way to learn?"


Yep - what other way is there?

Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 10th May 2006 22:32 Edited at: 10th May 2006 22:34
Quote: "How many of you guys learned to program in Dark Basic pro by studying other peoples code snippets?"


Yes and no. [Edit: actually that's not an answer to your question either way! And I certainly don't know how many! But I think you know what I mean.]

I started with a background in other languages which didn't have graphics support, so I was able to get DBP programs up and running for calculations and data manipulation very quickly. What I found hard was getting to grips with the graphics stuff - and there is a lot of it - and there is still a lot which is a total mystery to me (like zdepth, zbuffering, etc). What helped a lot was this site - people willing and able to help, plus lots of example code. Hardly a day passes without me learning something new on this site.

I often find a good way to understand something is to try and answer other people's questions - I don't always get the best answer (and don't bother posting it if I'm not happy with it), but I usually learn something in the process.

And, yes, studying other people's code definitely helps.
Daemon
18
Years of Service
User Offline
Joined: 16th Dec 2005
Location: Everywhere
Posted: 10th May 2006 23:36 Edited at: 10th May 2006 23:45
Changes:

-the terrain is lighter
-water is lighter (I don't know how I should make the water look)
-if you hit the spacebar you switch between walking mode and camera mode.
-there is a cloud type thing in the sky
-the plants no longer have a black edge (the edge is now green)

I would like to point out this remark in my code-
`add shadows to matrix
`All hail Yarbles for this code
`http://forum.thegamecreators.com/?m=forum_view&t=24971&b=1 is where I found it
-just to give credit to what I didn't program myself.



Insanity is just a state of mind
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 10th May 2006 23:45
Thanks Daemon, definitely an improvement. Weird sky though.
Daemon
18
Years of Service
User Offline
Joined: 16th Dec 2005
Location: Everywhere
Posted: 11th May 2006 00:34 Edited at: 11th May 2006 01:39
I don't like it either. That's why instead of calling it cloud I said:
Quote: "
-there is a cloud type thing in the sky
"

just so that people would know what it was supposed to be.

Edit: I did'nt think this was worth another post, but I had another attempt at the sky. I don't know which sky is better.



Insanity is just a state of mind
Nicholas Thompson
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 11th May 2006 00:37
Deamon - thats VERY nice indeed!!!

Hints: Take a look at my vertex manipulation thread in this board and find the function that I use to calculate normals for each vert - you could use that for your terrain. The water doesn't look right as it is... Apart from that - superb!!

Daemon
18
Years of Service
User Offline
Joined: 16th Dec 2005
Location: Everywhere
Posted: 11th May 2006 02:15 Edited at: 11th May 2006 02:56
Thanks Nicholas. I changed your function in my program to make the waves look right in my program. Other than that the movement of the water is now completely based on your function. The normals use Yarble's function.



Insanity is just a state of mind
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 11th May 2006 02:25 Edited at: 11th May 2006 02:32
Daemon, yours is coming along nicely - looks particularly good from a distance or close to the water's edge. Nick's right, you can improve the effect of the water by getting the shadowing effect by adjusting the normals. Getting realistic clouds is difficult. I think your latest set of clouds are better. [Edit: I was talking about your third version - but the same applies to your fourth version which you've just posted. Looking good.]

We've had five definite entries now with promises of some more. Still more than a week to go, so plenty of time for new entries or improvements. By that time digital dude RELOADED should have a whole marina full of random yachts - and palm trees full of coconuts. We'll see.
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 11th May 2006 06:33
Haven't looked at many, but I got a tip for everyone.

If you make your water plane manually through memblocks, then you'll have control over the alpha and can make it fade from the island out to the deep ocean.


Nicholas Thompson
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 11th May 2006 09:12
I've got some idea's for mine.... Now all I need is some time (as per bloody usual!) I wish a day was 48 hours long...

HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 11th May 2006 16:27
Quote: "I wish a day was 48 hours long...
"


Only if its a play day.

I'm not getting you down am I, Ho Look! another fancy Door?
Sven B
19
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 11th May 2006 22:02 Edited at: 11th May 2006 22:03


2 hours of work... positioning all the heights on the heightmap took the most of my time...

It's the programmer's life:
Have a problem, solve the problem, and have a new problem to solve.
spooky
22
Years of Service
User Offline
Joined: 30th Aug 2002
Location: United Kingdom
Posted: 11th May 2006 22:53
If you still have a yearning for some serious stickman action, take a look at this;

http://forum.thegamecreators.com/?m=forum_view&t=78784&b=5

Best thing since sliced bread!

Boo!
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 12th May 2006 00:29
Thanks for your entry, Sven B, that makes 6 now. Still plenty of time to make improvements or add extra features.

Thanks for the tip Phaelax - I'll give that a go sometime.

To all of you, I won't be near a computer again till Monday, so you'll have to comment on each other's code while I'm away. I'll catch up with all the new entries/updates when I return.

Good luck.
Nicholas Thompson
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 15th May 2006 04:40
Well guys - this is what I've been working on the past few weeks...

http://forum.thegamecreators.com/?m=forum_view&t=79125&b=2

The actual URL to the site is in my siggy.

Features to do:
* Leaderboard
* A view to list entries by user rather than by category
* other stuff

[center]
RiiDii
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Inatincan
Posted: 15th May 2006 18:40
Nice work Nic! It gave me an idea (but it would change things too much, and even I would probably not 'vote' for it): Have a poll on the site for the latest challenge, and folks vote for it (or rate it). The polls could either be used to determine the winner, or help the judge make a decisions - especially in the case of a close call. Yeah - there are a few problems, like folks voting for their own, multiple votes, etc. But it was a thought.


Open MMORPG: It's your game!
Nicholas Thompson
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 15th May 2006 18:57
I would like to have a voting system... Just maybe for the best overall entry if anything.

Limiting votes is easy. Just limit votes to users-only. All users have to be enabled by me before they get activated.

You cant post comments without being a user too - I got annoyed by spammers in my last site.

[center]
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 15th May 2006 21:29
Quote: " or help the judge make a decisions"


That would be useful at the very least.

Any more entries/updates for the current challenge? Things seem to have gone a bit quiet.
Sven B
19
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 15th May 2006 21:36 Edited at: 15th May 2006 21:50
I'm working on the trees, but I can't seem to position my trees ON the object world, without using Sparky's DLL file like I always do...

[EDIT]
A solution for now... But pretty slow. It could take some time to load. (10 sec here)



It's the programmer's life:
Have a problem, solve the problem, and have a new problem to solve.
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 16th May 2006 00:01
Thanks, Sven. Nice waterfall. Any chance of including code to allow us to explore your island?
Nicholas Thompson
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 16th May 2006 01:30
I'm working on an idea - but struggling with it. I'll post what I have before I sleep.

[center]
Nicholas Thompson
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 16th May 2006 02:37
Bugger it - I cant get it to work properly.

I was hoping to use a dynamic image with the bump mapping in DBP to produce a really nice ripple effect... Instead I get nothing nice at all!



Oh well, I doubt it'll get me a 4th win! Move the mouse around to... well.. move the mouse around and you'll see.

Thing is - the principle is there. Its making a dynamic normal/bump map... Its applying it - its just pathetic.. Its probably a lighting issue...

[center]
Ric
20
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 16th May 2006 03:27
@Nick: Nice looking site - I love the simplicity of the design. Just a thought - how easy would it be to have a 'copy code to clipboard' button, to make it easier to copy some of the longer pieces of code? Looking forward to seeing some interactive elements too, like the ability to review other peoples (or, perhaps even more useful, your own) code. Just registered.

@All: I'm in the process of moving house at the moment - so I'm struggling to find much time for coding/posting at the moment. I'll still be lurking, but probably won't be up to normal code-output levels for the next two months whilst we get ourselves settled.

Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 16th May 2006 15:51
@Nick

Quote: "Thing is - the principle is there. Its making a dynamic normal/bump map... Its applying it - its just pathetic.. Its probably a lighting issue..."


Hmm ... as you say. Is the attached screenshot something like what you wanted?

At least it's another entry ...

Attachments

Login to view attachments
Nicholas Thompson
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 16th May 2006 17:07
yeah thats basically what I get, however I was hoping for a better 3D effect by the bump mapping. Maybe its just not possible...

[center]
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 16th May 2006 19:31 Edited at: 16th May 2006 19:32
I'm sure it's possible - but not sure how to do it quickly and efficiently. I think you probably need to align the bumpmap with the texture to get a realistic effect - and then scroll both textures in the same way. But this seems to need straight wavefronts rather than concentric circles - food for thought. If I come up with anything I'll post it.

All I did to get the screenshot was change the height function so I got waves near the centre - used sqrt(x*x+z*z) times an appropriate scale factor inside your sine function.

You are probably right that there's also a lighting issue involved - I had to experiment quite a bit to get my bump-maps working properly.

[Edit: that's just the sort of thing that might make a challenge in itself ...]
Sven B
19
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 16th May 2006 21:46
Okay, you can move now. And for the ppl that don't like waiting: here's a screenie:





It's the programmer's life:
Have a problem, solve the problem, and have a new problem to solve.
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 17th May 2006 00:39
thats pretty good sven


Chris Franklin
19
Years of Service
User Offline
Joined: 2nd Aug 2005
Location: UK
Posted: 17th May 2006 09:46
Nice

Theme park simulator wip boards

Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 17th May 2006 12:00
@Sven B

Looking good. Couple of suggestions: when I reach the top of the hill the waterfall seems to gush out from a black lake, also, the waterfall is invisible when you are underneath it. Use set object cull, perhaps?

@ all entrants

At the moment I have entries from:

Sven B (version 3)
Alexb Orsova (version 4)
digital dude RELOADED (version 3)
Daemon (version 4)
Nicholas Thompson (version 1)
Phaelax (version 1)
RiiDii (version 3)

and a non-entry from

Homey the Clown (version 1).

Let me know if I've missed anyone - and keep the entries coming.
Nicholas Thompson
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 17th May 2006 13:44
when's the deadline?

[center]
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 17th May 2006 15:55
I was about to ask the same question. I thought this ended awhile ago. I've just been so busy on my java ide lately.


Sven B
19
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 17th May 2006 17:38


After replacing the particles with some own code with ordinary plains, the fps didn't drop below 60...

Particles seem to be very slow...



Added: The dark color of the waterfall spring, the cull(both suggested by Gr Gandalf) and particle replacement

It's the programmer's life:
Have a problem, solve the problem, and have a new problem to solve.
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 17th May 2006 22:12
In answer to the question:

Quote: "when's the deadline?"


look at the original challenge (5th May) where I said:

Quote: "Two week deadline, say 10am UK time 20 May, sound reasonable?"


No-one objected to this so it stands (the time was chosen to allow our friends across the Atlantic to get some last minute entries organised before they got to bed).

Plenty of time yet ...
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 17th May 2006 22:21
@Sven B

Looking good - looks like we have two front runners now ...
Ric
20
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 18th May 2006 03:36
No island as yet, but I did a bit of work on a cloud generator:



Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 18th May 2006 06:35 Edited at: 18th May 2006 09:07
very cool ric, mind if I swipe it?

I'm pretty sure I got a good method of calculate the normals smoothly, but it never looks quite right. Usually looks too dark.





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: 18th May 2006 12:24
Thanks for the new (and revised) entries.

Ric

Great clouds - will probably pinch those sometime.

Phaelax

Could you post a brief summary of what the various key presses do? I like the idea of being able to modify the random heightmap.

Looks like judging will be fun since people have gone off in different directions with their entries.

Login to post a reply

Server time is: 2024-11-25 00:36:51
Your offset time is: 2024-11-25 00:36:51