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
Sven B
19
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 30th May 2006 22:33
New update...





Features:
same as before +
- smooth tool (Third option under tools).
- round hill tool (press up/down to toggle between tools).
- bug fixes.
- export to heightmap or dbo file.

Any bugs are welcome.
I might clean up the GUI a bit later...

It's the programmer's life:
Have a problem, solve the problem, and have a new problem to solve.
Darth Vader
19
Years of Service
User Offline
Joined: 10th May 2005
Location: Adelaide SA, I am the only DB user here!
Posted: 31st May 2006 07:43
Quote: "Any bugs are welcome."

okay add this at the top of the program

An there you have it!!!
lol


When in Trouble with anything visit here your number one stop for help
Segan
19
Years of Service
User Offline
Joined: 28th Aug 2005
Location: Canada
Posted: 1st Jun 2006 01:55
Well guys, I was planning on having my program updated by now... But then this thing called the "blue screen of death" appeared... And my weekend of programming suddenly turned into a weekend with no working computer.

I'm back though now, and hopefully will be able to get some work in too!
McLaine
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location:
Posted: 1st Jun 2006 07:57
Latest code



Brush now molds to landscape and remains under mouse.

It's not my fault!
Ric
20
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 1st Jun 2006 14:36 Edited at: 1st Jun 2006 14:36
Today is the dreaded day I have to pack up my computer and put it in a box - not to be retrieved until our house move is complete (a long seven weeks away, due to our new house still being built and having to live with relatives in the meantime). I'll be watching progress here through my work PC.

Here's my progress on the terrain editor - only just started really, so not much to show, except quite a nice drop down menu system which anyone is free to use. Maybe one day I'll come back and carry on with this - I was looking forward to adding the lightmapping code which should have looked good. Anyhoo....





Attachments

Login to view attachments
Nicholas Thompson
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 1st Jun 2006 16:49
Ric - why not use your work computer? Stay after work and use it for DBP... The added advantage is you might not even need to see the relatives as they'd be asleep by the time you get home

[center]
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 1st Jun 2006 22:07
@McLaine

Just tried your latest code - looking great (and the problems I had with your earlier versions have disappeared). The Mold and File options now work nicely. I may well find myself using your code for making terrains. Keep it up.

Have you implemented the Paint option yet? (Or have I just forgotten which buttons I need to press to make it do something?)
Daemon
18
Years of Service
User Offline
Joined: 16th Dec 2005
Location: Everywhere
Posted: 1st Jun 2006 22:36 Edited at: 1st Jun 2006 22:37
@McLaine- Smooth seems to just temporarily freeze the program for me. Norm makes my computer restart.

Is it just my computer?

@Ric- I like the look of yours best. It's too bad it can't do much yet.

@Sven B- I think you are the first person to have the exporting part of this challenge completed (correct me if I'm wrong, I've only been skimming the posts and programs; I just finished final exams today.) When I click the tools button on your latest update the program just closes for me.

Is it just my computer?

School is out for summer for me now, so I can spend more time on the forums. Yay!

Insanity is just a state of mind
McLaine
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location:
Posted: 2nd Jun 2006 00:00
@Daemon

Yeah man, the smooth function and the normal function just use DBPro commands (set object normals, set object smoothing). They are buggy and unpredictable and I'm working on my own code to replace them.

It's not my fault!
Sven B
19
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 2nd Jun 2006 20:27
Quote: "@Sven B- I think you are the first person to have the exporting part of this challenge completed (correct me if I'm wrong, I've only been skimming the posts and programs; I just finished final exams today.) When I click the tools button on your latest update the program just closes for me.

Is it just my computer?
"


I haven't changed ANYTHING on the tool button thing, and now it just shuts down...

It's the programmer's life:
Have a problem, solve the problem, and have a new problem to solve.
Sven B
19
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 2nd Jun 2006 21:42
I found the bug. I had 2 labels called Tools. (One in the program and one for the data on the end). So it always took the last one which caused the program to quit.

This update should add alot of functionality...

You can add, delete and reposition worlds from now on. (options under tools)
Have fun!




It's the programmer's life:
Have a problem, solve the problem, and have a new problem to solve.
McLaine
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location:
Posted: 3rd Jun 2006 06:36 Edited at: 3rd Jun 2006 06:45
Here ya go folks



All the molding functions are now operating.

Have a play, find the bugs.



Gonna finish the load/save routines now. If I have time, I might add some texture painting operations.

It's not my fault!

Attachments

Login to view attachments
Nicholas Thompson
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 3rd Jun 2006 12:39
frick!! That looks fantastic!!

[center]
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 3rd Jun 2006 14:30
@McLaine

Yes - that's excellent. I like the way you can "paint" the hills by holding down the mouse button and moving the mouse in Mold mode - makes it very easy to get a good-looking terrain very quickly. Makes professional tools like MilkShape look very clumsy and awkward by comparison.

Looking forward to seeing the texturing part of it.
Cash Curtis II
19
Years of Service
User Offline
Joined: 8th Apr 2005
Location: Corpus Christi Texas
Posted: 3rd Jun 2006 17:29
McLaine, you're very close to having a product that's better than Landscape Creator. I bought that months ago and it doesn't even work as well as this.

If you added terrain painting, plus external object loading/positioning/scaling, it could be a product worth buying.


Come see the WIP!
McLaine
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location:
Posted: 3rd Jun 2006 17:53 Edited at: 3rd Jun 2006 18:05
Wow!

Thanks for the positive comments guys!

I probably will continue developing this after the challenge into a complete application.

So, question ...

Would you want the output from this app to be a single object (IE, all houses and other 'objects' that you might add get attatched as limbs to the terrain) that could simply be loaded into your own games/apps?

or

The output keeps all objects seperate, and has a descriptor file which would require a pre-written function to be pasted into your game to enable loading of the output my app creates?

It's not my fault!
Sven B
19
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 3rd Jun 2006 23:49

http://i17.photobucket.com/albums/b75/SvenB/TerrainEditor4.jpg

It's the programmer's life:
Have a problem, solve the problem, and have a new problem to solve.
McLaine
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location:
Posted: 4th Jun 2006 03:27 Edited at: 4th Jun 2006 03:31
Rudimentary texturing now operational

Code is now too long to fit in a snippet box.



It's not my fault!

Attachments

Login to view attachments
McLaine
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location:
Posted: 4th Jun 2006 03:32
Here's the code

It's not my fault!
Darth Vader
19
Years of Service
User Offline
Joined: 10th May 2005
Location: Adelaide SA, I am the only DB user here!
Posted: 4th Jun 2006 11:32
Looks great Mclaine I am going to try it out soon. Please do add external object support! Then I can use it as a map editor!


When in Trouble with anything visit here your number one stop for help
Darth Vader
19
Years of Service
User Offline
Joined: 10th May 2005
Location: Adelaide SA, I am the only DB user here!
Posted: 4th Jun 2006 11:44
Tried it and it comes up with an error.
Quote: "Runtime error 1002 "Could not load bitmap at line 1399""

Help!


When in Trouble with anything visit here your number one stop for help
McLaine
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location:
Posted: 4th Jun 2006 15:32
Darth, the quick and dirty texturing I did uses quite a large bitmap.

Maybe your machine doesn't have enough memory to create this bitmap.

Try making a small terrain, 20 segments, 5 segsize say, and see if that works.

It's not my fault!
Daemon
18
Years of Service
User Offline
Joined: 16th Dec 2005
Location: Everywhere
Posted: 4th Jun 2006 16:14 Edited at: 4th Jun 2006 16:49
Quote: "
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.
"


It is 9:14 am now. Just wanted to warn people.

------------------------------------------------------------------------------------------------------------------------------------------

9:44

@McLaine -

is the last line of the code I see in your most recent code thing, so I can't run it.

I tried taking the button data code from a previous copy, but then it said that a bitmap doesn't exist (same error as Darth except one line less). I'm not sure what I should change to make it work.
------------------------------------------------------------------------------------------------------------------------------------------
9:50
Ok, I found what you were talking about , I think, and changed the DefaultTerrain() function to


Insanity is just a state of mind
McLaine
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location:
Posted: 4th Jun 2006 17:02
Well,

This is the latest and final code as far as the comp goes.

I still have some work to do on it however.

It's not my fault!
McLaine
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location:
Posted: 4th Jun 2006 17:07
Grrr,

Double Grrr!

for a couple of posts now, my code has been too big for a code snippett.

So, I've been placing it in the code box that's available when you make a post.

Just discovered now that this also truncates code!!!!

That's probably why you're all getting these erros!!!

anyway, I'm now attatching the dba file, hopefully that will give you the complete code.

It's not my fault!

Attachments

Login to view attachments
Daemon
18
Years of Service
User Offline
Joined: 16th Dec 2005
Location: Everywhere
Posted: 4th Jun 2006 17:07 Edited at: 4th Jun 2006 17:14
Judging

I am very sorry to say that I never go to see Mclaine's final program to work. I ran his program and looked at the new code, so I think I can still judge fairly.

The top two programs were written by Sven B and McLaine. Thank you all others who entered too.

Sven B - Had the ability to create multiple worlds. Had a lot of useful features.

Mclaine - Had an impressive gui. His program boasted rudimentary texturing options that I never got to see.

And my final desicion is that first place goes to



and the runner up is



for the reason



---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

I got McLaine's code to work now that he has posted the .dba. Judging still is the same though.

Insanity is just a state of mind
McLaine
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location:
Posted: 4th Jun 2006 17:21
Congrats SvenB.

It's not my fault!
Daemon
18
Years of Service
User Offline
Joined: 16th Dec 2005
Location: Everywhere
Posted: 4th Jun 2006 17:29
I still think you should keep working on yours McLaine.

Insanity is just a state of mind
Nicholas Thompson
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 4th Jun 2006 18:16
bugger!! I was gonna devote today to work on mine! Frick... I was looking forward to this challenge! Daemon - have you collated ALL the entries? I'd appreciate them in a zip file so I can add them to the site. If not, have you looked at all the entries as it kind of looks like you've only reviewed the top two. I know I entered a basic entry and I know Ric's entered one too. This would havebeen a fantastic challenge to last longer than 2 weeks... :-(

[center]
Sven B
19
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 4th Jun 2006 20:21
@Daemon
(like Nicholas T) You forgot Ric's entry...

@McLaine
I'm almost sure you would've won if you added the export function. Though it is judged correctly, I still feel like I didn't win...

Maybe an idea for the next entry:
Robots! Fairly easy to create in DBP using primitives... If anyone comes up with a better idea, I'll change it to that one.

It's the programmer's life:
Have a problem, solve the problem, and have a new problem to solve.
Nicholas Thompson
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 4th Jun 2006 21:11
Robots - interesting... Are you aiming at the AI or the physical appearance of something like Marvin from HHGTG (the old one, not the new silly rounded one)

[center]
Sven B
19
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 4th Jun 2006 22:35
physical appearance.
But, usually, robots have AI, so...

When I thought "robots", I thought "serious firepower". But I suppose you don't have to do that and you can create a puzzle game with robots instead...

Ofcourse, if there isn't someone interested, I'll search for another theme. (The last time I picked the challenge, only 2 people entered)

It's the programmer's life:
Have a problem, solve the problem, and have a new problem to solve.
McLaine
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location:
Posted: 4th Jun 2006 22:42 Edited at: 4th Jun 2006 22:43
Robot theme sounds cool. Just need a bit more definition on the challenge.

I'm gonna start a thread for input on the terrain editor, as I'm definately gonna continue on that.

Shame I missed the export height map function off huh? Now I don't get the delight of picking the next challenge.

It's not my fault!
Sven B
19
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 4th Jun 2006 22:51
Lol, feel free to decide with me.

How can I decide what the next challenge is if I don't know what you guys are interested in

It's the programmer's life:
Have a problem, solve the problem, and have a new problem to solve.
Nicholas Thompson
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 5th Jun 2006 00:46
If you need any inspiration from previous challenges, try here: http://dbp-site.com/challenges-view/

Just a random idea - some kind of mini game which requires grabbing 3D objects (or sprites) and "throwing" them with the mouse? Maybe a basketball game?

Is there an easy way to get a screenshot into dbp as I remember playing a game once where it used a screenshot of your desktop (plus open windows) to produce a gameboard for a throwing game. That could be an option too - a game which takes an image (screenshot/webcam/hardcoded with basic 2d commands).

[center]
Daemon
18
Years of Service
User Offline
Joined: 16th Dec 2005
Location: Everywhere
Posted: 5th Jun 2006 01:52 Edited at: 5th Jun 2006 01:57
I'm sorry that I didn't review everyone's programs. I planned to, but I had to take some time to try to see McLaine's final post before judging. By the time that I made my post with my final judging it was already past the time I had set. I had seen everyone's programs, so don't worry about that. If it is necessary, now that I have more time, I will write my reviews of the other projects entered into this competition.

Ric -
As I posted earlier I liked the look of your program the best. The sky and shiny menu system made it really nice to look at. It could make flat ground, but not much beyond that. In the end you simply did not have enough time to make an entry which could compete with the others.

Phaelax -
Your code allowed the terrain to be move up and down, but it has a problem with the lighting. There is a diagonal line of light which appears as soon as the terrain is clicked on. Another downside is that you always had to move four points up at a time.

Segan -
It was possible to look at a matrix from many different angles with your code. I don't have IanM's Matrix1Utility.dll, so I couldn't see your other code, but I don't think that it is fair for people to have to have a dll for it to be an entrant into a coding challenge anyway

Chris Franklin -
No one is going to have the patience to input every coordinate by hand. The problem with using a matrix is that you can't use pick object.

Nicholas Thompson -
The way your camera would fly away when the cursor was put on a raised or lowered vertices made your terrain editor unusable.

I am sorry that I haven't saved the entrants; I was just copying, pasting, and running the code. If you want me to, I can go back through and put them in a zip file.

I am sorry to make such a long post, but I wanted to stop any feelings that people weren't judged fairly.

-Daemon

Insanity is just a state of mind
McLaine
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location:
Posted: 5th Jun 2006 02:01
Robot challenge should be more than just building a robot from primitives, as that kind of thing has it's own challenge thread.

An A.I. challenge would be cool, not really tried that before. Perhaps there is a way we can set something up where we can put our A.I.'s up in competition with each other?

A game is always cool.

Or .. we could take a logical step from the terrain editor and build an object modeler, one that allows operations such as carving and such like you find in all the good 3D apps. May be a tough one, but this is a challenge thread.

It's not my fault!
Nicholas Thompson
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 5th Jun 2006 02:04
AI is a pretty tough topic and the modeler has been done before (http://www.dbp-site.com/challenges/primitive-modeler)

[center]
McLaine
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location:
Posted: 5th Jun 2006 02:30
lol, ok

was just throwin stuff in of the top of my head.

ignore me.

It's not my fault!
Nicholas Thompson
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 5th Jun 2006 11:27
Hehe - nah its fine! Good idea's and as they say, great minds think alike...

[center]
Sven B
19
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 5th Jun 2006 13:09 Edited at: 5th Jun 2006 13:11
Quote: "Throwing game with the mouse"


Quote: "AI challenge"


Quote: "Robot challenge"


Or maybe throwing robots into a basket ring with AI?

My choice goes to the AI challenge. Though I have no idea how to make it into a challenge...

It's the programmer's life:
Have a problem, solve the problem, and have a new problem to solve.
Nicholas Thompson
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 5th Jun 2006 13:23
Before AI becomes the official fornightly challenge, may I draw your attention to...
http://www.dbp-site.com/challenges/artificial-intelligence
and partially...
http://www.dbp-site.com/challenges/virtual-pet

I know that was a long time ago, so maybe a new one would be good, however there is also a mini AI comptetion using the new AI pack for DBP.

[center]
Sven B
19
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 5th Jun 2006 13:33
Robots - Rejected
AI - Rejected

Throwing game

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: 5th Jun 2006 13:35
I'd love to test that primitive modeller of TDK's but it won't compile - quite a few errors, presumably where your colour coder messes up the code. Maybe syou could try compiling the snippets before putting them on your website, specially the winners snippets. A bit of a bore, but the code is useless otherwise, and the thought of trawling through nearly 100 pages of this post to find it is not appealing.

Boo!
Green Gandalf
VIP Member
19
Years of Service
User Offline
Joined: 3rd Jan 2005
Playing: Malevolence:Sword of Ahkranox, Skyrim, Civ6.
Posted: 5th Jun 2006 13:56
@Nicholas Thompson

Do you still need the archive from Daemon's challenge? I think I've got all the entries (it won't take long for me to check - but I'd have to do it later on today). Same format as before.

I thought Daemon's decision was the right one (for the various reasons given), even though McLaine's entry looked the most promising - and there were only two front-runners really. Judging is time-consuming - and nerve-wracking. It's very difficult to decide between "A" and "B" when entry "A" is good at "X", whereas entry "B" is good at "Y".

I hope McLaine develops his entry - the terrain moulding code was excellent. Shame I couldn't get the texturing part to work satisfactorily.
Nicholas Thompson
20
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 5th Jun 2006 15:09
@GG: Yeah, that'd be great! Thanks. I agree, judging is much harder than it sounds - especially if you want to be fair!

@Spooky - I'll take a look at that code, I doubt the highlighting is breaking it, but i'll check to be sure... (All the highlighting does is wrap <SPAN> tags around groups of characters... The browser should just parse them out so you get colourfull text! I'd like to add a download button, but I'm still learning that CMS).

[center]
Darth Vader
19
Years of Service
User Offline
Joined: 10th May 2005
Location: Adelaide SA, I am the only DB user here!
Posted: 5th Jun 2006 16:19
@spooky
I had the same trouble! So I went back throught the thread and found his original entty, and it worked!


When in Trouble with anything visit here your number one stop for help
McLaine
18
Years of Service
User Offline
Joined: 20th Feb 2006
Location:
Posted: 5th Jun 2006 16:31 Edited at: 5th Jun 2006 16:34
Check out the W.I.P forum, I posted the Terrain Editor up there and I'm gonna keep working on it. There are still some bugs, but the reason you probably couldn't get it working GG was due to my code being truncated when posting to the forum. W.I.P. thread has a compiled exe.

Got something on at the moment until after the weekend so don't expect any updates until then.

My editor didn't have the height map export, , and so the challenge result was fairly judged. Besides, it's the fun of the challenge for me, not the winning.



Roll on the next one....

It's not my fault!
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 5th Jun 2006 21:35
How about a math challenge involving logic, parsing, and slick algorithms? As in, an equation parser. User passes a string to a function, it finds the answer.

answer = solve("42/(6+1)+3")

I think that'll cover some good topics needed for programmers. Points could be awarded on how complex an equation your function can handle.

"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: 5th Jun 2006 22:33
now THAT sounds interesting!

[center]

Login to post a reply

Server time is: 2024-11-25 03:05:49
Your offset time is: 2024-11-25 03:05:49