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
Pricey
23
Years of Service
User Offline
Joined: 22nd Feb 2003
Location:
Posted: 7th Mar 2008 19:55 Edited at: 7th Mar 2008 19:57
Okay guys I got a bit carried away with this one.
I had a lot of free time.
Weighing in at 1423 lines.
"X adventure"
Programmed in one week.

It features 16 screens and a variety of monsters to kill.
And a small quest to complete.
I intended to add more to the quest but ran out of time.

It lacks a good flexible scripting system and saving system, so the quest is hard coded and it uses a basic password system but the graphics and screens and speech can easily be edited by changing the data.

I enjoyed making this and intend to work on it more, maybe improving the graphics from 4x4 sprites to something more respectable and putting in a proper editor and scripting system.
But until then it is what it is! (And may well be a little buggy =P)

The controls are the basic arrow keys to move, and control to shoot your magic spell.
A tip I'll give you, is DO NOT WASTE YOUR MAGIC!!
There's not much of it going around.
And pick every jewel up, you need them to progress.

Enjoy!




Garzu
21
Years of Service
User Offline
Joined: 31st Oct 2004
Location: London
Posted: 7th Mar 2008 22:59
nope, i'm not going to get time to enter..... sorry

Finished Projects : Spellmaker (Old Boardgame, Dodgy DB Pro Multiplayer commands included!)
Current Project : PBeM version of War of the Ring in 3D.
Virtual Nomad
Moderator
20
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 7th Mar 2008 23:23
@pricey - that was a great adventure! waiting for the sequel/expansion pack... Z must fall!

Virtual Nomad
AMD XP 1800+ (~1.6 Ghz) / 1.5 GB RAM
ATI Radeon 8700LE 128 MB / Windows XP
Rburke
19
Years of Service
User Offline
Joined: 28th Sep 2006
Location:
Posted: 8th Mar 2008 00:50
Very nice Pricey. I appreciate that you've added challenges in your game and are actually required to think things through to advance the next level. You've even added a form of currency through Jewels to buy health/magic potions : ) This reminded me of a game I used to play a lot on the NES called Adventures of Lolo.

Reminder to everyone else that wants to enter the challenge that you have today and tomorrow to finish up your entries and will have until the end of tomorrow March 8th at 22:00 Pacific. So far I have two really good entries and I hope to see more!
BMacZero
20
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 8th Mar 2008 02:21
Here you are Nicholas! (Whew, I'm glad that's over )

Good luck with that site.

Nicholas Thompson
21
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 8th Mar 2008 02:44
bmaczero - you frickin ROCK!!!

That is not only unbelievably quick - but unbelievably useful!

Thank you SO much.

[center]
Skyrift
18
Years of Service
User Offline
Joined: 8th Mar 2008
Location:
Posted: 9th Mar 2008 02:35
This entry definitely isn't finished, but I kind of ran out of time, so I'm just submitting what I've done regardless.



This has much more of an emphasis on actually making the map, and is fairly modular, so it's not hard to make more objects and tiles, although I didn't get round to making the tree a creatable/deleteable object, or making a tool to delete creatures(in this case, butterlies).

Arrows control the camera, as well as moving the mouse to the edge of the screen. Hold control to use the arrow keys to rotate the camera, and hold control and shift together to use the up and down arrows to zoom in and out.

There are wind direction and magnitude sliders in the bottom right, and a list of tools on the left. The tools work like the colours in MSPaint, where you click a tool with either mouse button and it assigns the tool to that mouse button. You can then click on the map to use the tool.
Rburke
19
Years of Service
User Offline
Joined: 28th Sep 2006
Location:
Posted: 9th Mar 2008 10:12
Okay guys, it's the end of this challenge and I've went through all of them and everyone did a great job.

@ flashing snall - What I liked most about your entry was that I could test out the map after I finished placing the tiles and allowed me to create kind of a maze puzzle rpg.

@ Pricey - Getting carried away is what thrives in these challenges and I was most impressed because you had a reasonable amount of screens and content to create a beginners quest that challenges the player as any great game should!

@ skyrift - Sorry to say that you run out of time, but nonetheless, I was impressed of the wind system you have implemented and also that your entry was the only one to be of a 3d scape. I too was working on a similar concept, but much like you, I had little time to go by and this was what I had managed anyways:





And the winner for the RPG Challenge....




Thank you all that entered, I thought this was a great challenge!
Pricey
23
Years of Service
User Offline
Joined: 22nd Feb 2003
Location:
Posted: 9th Mar 2008 14:39
Thanks Rburke!

And well done to skyrift and flashing snall, your entries were really cool.

The challenge I'd like to set is to make some kind of Windows style GUI inside DBPro.

So you could have commands like maketextbox(), makebutton(), messagebox()

I'm working on a library of these type of commands myself, they're really useful for creating level editors / script editors, and save a lot of time and make your application a lot easier to use for the standard user.

I reckon it'd be interesting to see what ideas you all come up with.

You've got two weeks, enjoy!

BMacZero
20
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 11th Mar 2008 05:46
Thanks Nicholas

This should be an interesting and useful challenge, I plan on entering.

acelepage
22
Years of Service
User Offline
Joined: 2nd Jun 2004
Location: Plattsville
Posted: 13th Mar 2008 19:40
Here are some popup windows like what you can call in Javascript. It has the alert(), confirm(), prompt() windows.
It is not written into a library type function, because I wanted to handle the popup window with drag and drop. But, it looks nice.


( 2b || !2b ), that is the question. The answer: true
Pricey
23
Years of Service
User Offline
Joined: 22nd Feb 2003
Location:
Posted: 14th Mar 2008 19:05
Thats cool, the windows are nicely presented.
A suggestion though, how about making the functions return the response?

So I could say

text$ = prompt(title$,message$)
alert("You typed",text$)

Get it?

acelepage
22
Years of Service
User Offline
Joined: 2nd Jun 2004
Location: Plattsville
Posted: 14th Mar 2008 19:22
Yes, I have been thinking about how to return a response. I would need the window function to take control of the program until the popup was closed, and then return a response.
There's still some time. I'll work something out.

( 2b || !2b ), that is the question. The answer: true
acelepage
22
Years of Service
User Offline
Joined: 2nd Jun 2004
Location: Plattsville
Posted: 14th Mar 2008 22:49
OK, I have improved the design. Now you can call the functions from the main loop, and they will pop-up the window and wait for a response. The 'prompt' window will return a string (you can press ENTER in the prompt window as well as click OK). The 'confirm' window will return a result. I am using the 'confirm' window to control the main loop.



( 2b || !2b ), that is the question. The answer: true
BMacZero
20
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 15th Mar 2008 03:16 Edited at: 15th Mar 2008 03:47
Those are pretty cool, acelepage! Very official looking

Here's what I've made so far:



My idea is to allow the user to make "items" such as buttons, checkboxes, entry fields, dropdown menus, sliders, and text, then make a window and attach the items to it in whatever positions they want. The items are supplemented with commands to read their values and states so the rest of your program can interface with them.

Most of the basic GUI updating such as making a button "click" when the user clicks on it and dragging windows around is packed (or will be) in one easy command: ZWindow_Update.

So far it can only make buttons, checkboxes, and text. It can also lock the buttons and checkboxes, read their states, and reposition them. I should probably work on the windows next before I get into the other fancy items like sliders and dropdown menus.

One last note: the items are based on a "handle" system like Box2D: when you create an item it returns an ID, which you have to store to manipulate or read the item later.

jason p sage
19
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 15th Mar 2008 03:59
Rburke
19
Years of Service
User Offline
Joined: 28th Sep 2006
Location:
Posted: 16th Mar 2008 00:55 Edited at: 17th Mar 2008 10:37
Cool entries so far. I haven't done all that much with mine yet. Here it is so far. All windows can be dragged..

I have a button() and window() function in place...

To Initiate a function for a button you need to go to the draw_button() function and where it says if mouseclick() = 1 you need to do the following:

if title$="<BUTTON NAME>" then <your function()>

of course make sure to use the button() before the main program loop and that the button name corresponds to that entered in the draw_button() function.

Another thing, outside the program loop you must always use the window() command before assigning any buttons to that window. To place a button in a window you must use the button() command after you have used the window() command. I'll add more Gui functionality later on like check boxes, radio buttons, scroll bars and sliders.

Example:

window(X SIZE, Y SIZE, X POSITION, Y POSITION, WINDOW TITLE)

so then...

window(200,600,1,0,"Control Panel")

and for the buttons

button(X SIZE, Y SIZE,X BUTTON OFFSET, Y BUTTON OFFSET, TEXT)

and so it becomes..

button(90,20,10,10,"Zoom Out")
button(90,20,10,35,"Zoom In")
button(90,20,10,60,"New Window")
button(90,20,10,85,"White BG")
button(90,20,10,110,"Black BG")
button(90,20,10,135,"Transparent")
button(90,20,10,160,"Invisible")
button(90,20,10,185,"Solid")


Rburke
19
Years of Service
User Offline
Joined: 28th Sep 2006
Location:
Posted: 17th Mar 2008 21:23
Fixed some bugs and added a little more...

Pricey
23
Years of Service
User Offline
Joined: 22nd Feb 2003
Location:
Posted: 18th Mar 2008 00:47
Rburke! That is brilliant!
Add a few more gadgets e.g. check boxes, drop down menus etc. and that'll make a really fantastic tool.
You can already see in your example how useful this kind of thing is for level editors and the like.

One thing suggestion though.
Say I create two windows and place them on top of each other. If I click in one, it'd be nice if that window would come to the front of the screen, as it is now the active window. Just helps keep things uncluttered!

But otherwise, good job!

Rburke
19
Years of Service
User Offline
Joined: 28th Sep 2006
Location:
Posted: 18th Mar 2008 02:42 Edited at: 18th Mar 2008 20:08
@Pricey- Thank you for the suggestions! I do plan to add check boxes and drop down menus and so forth. And I plan to make windows come up to the front when clicked on. I already have a simple idea how to do this so it shouldn't take too long.

Once I have everything added in there, I may create a type of file explorer to open up pictures on the c: drive and have the picture be opened up in a separate window to show the flexibility of this GUI engine. I'll also post the gui engine alone without all the examples so those that want to play with it don't have to clean up all my widget examples.
Pricey
23
Years of Service
User Offline
Joined: 22nd Feb 2003
Location:
Posted: 18th Mar 2008 21:51
Sounds excellent!

acelepage
22
Years of Service
User Offline
Joined: 2nd Jun 2004
Location: Plattsville
Posted: 20th Mar 2008 16:30 Edited at: 20th Mar 2008 16:46
I have updated my entry to add a Browse popup window. This one is a bit more involved. It browses for a file name.


( 2b || !2b ), that is the question. The answer: true
Jimmy
22
Years of Service
User Offline
Joined: 20th Aug 2003
Location: Back in the USA
Posted: 22nd Mar 2008 03:16
Hello friends.

Here's what I have after a couple hours.

Not much at all, but it is THREE DEEZ. All you can do is move the window around. I know! YAY!

If your grafix are slaggin, change shadows to 0. Enjoy!



"Oh hey, nice website Jimmy, it's really nice and fancy." -- That C++ Nerd
Visit. Website. NOW!
Rburke
19
Years of Service
User Offline
Joined: 28th Sep 2006
Location:
Posted: 22nd Mar 2008 18:25
Unfortunately, I'm not going to be able any more before the deadline as I have been too busy during the last couple days. So the things I had planned aren't going to be done added until later on..
BMacZero
20
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 23rd Mar 2008 01:47
I'm not either, I was hoping to add some fancy stuff like sliders and drop-down menus, but I got tied up with fixing a bad glitch that means you cannot create more than one window. And I didn't even manage to fix that, because I got distracted by the release of Box2D Version 2 and the DBPro Community Project . Ah well, here's what I have so far, you can make a single window and add buttons, checkboxes, and texts to it to your heart's content without any glitches whatsoever, so at least it can work a little bit.



Cool windows, Jimmy!

Pricey
23
Years of Service
User Offline
Joined: 22nd Feb 2003
Location:
Posted: 23rd Mar 2008 14:16
Very nice everyone!

Jimmy, those windows look very impressive, but will you be able to specify the range of object numbers that the window system uses so if someone were to implement it into a 3D program, it would not conflict with their already existing 3D objects?

jason p sage
19
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 23rd Mar 2008 15:52
Guys - I'm not meaning to SPAM - but on this VERY topic you are working on - GUI - I posted a general question and hope you're experience tackling this can get me started in the right direction.

I'd really REALLY appreciate any advice from you guys tacking GUI's

http://forum.thegamecreators.com/?m=forum_view&t=126484&b=1

Jimmy
22
Years of Service
User Offline
Joined: 20th Aug 2003
Location: Back in the USA
Posted: 23rd Mar 2008 21:22
Updated version.

Featuring:
Pricey's suggestion
Window minimization
The UBARest of Buttoning

Next up is actual text entry. Pray for me...



"Oh hey, nice website Jimmy, it's really nice and fancy." -- That C++ Nerd
Visit. Website. NOW!
McLaine
20
Years of Service
User Offline
Joined: 20th Feb 2006
Location:
Posted: 24th Mar 2008 16:58
Is this challenge now finished?

It's not my fault!
Ric
21
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 24th Mar 2008 20:22
Yes - this ended yesterday. If you'd like to pick a winner Pricey, then we can move this onto the next challenge.



Visit www.andromedus.com today!
flashing snall
20
Years of Service
User Offline
Joined: 8th Oct 2005
Location: Boston
Posted: 24th Mar 2008 21:18
woo. i didnt enter that contest cause im lazzy
Chances are though, ill make a good attempt at the next one... That actually happens, i have good entries, but somthing dumb happens like my internet goes down (PONG) or i forget to put it up. or i loose it do a lack of saving on my part

But anyway, contests are ALWAYS fun. Cant wait for the next one.


This is my WIP, not even ready for a WIP thread yet though.http://smallgroupproductions.com/
Blobby 101
20
Years of Service
User Offline
Joined: 17th Jun 2006
Location: England, UK
Posted: 25th Mar 2008 10:43
ye, i'm finally going to enter the next one. I've ceased up altogether with challenges at the moment!


EotP! Click on it.
Pricey
23
Years of Service
User Offline
Joined: 22nd Feb 2003
Location:
Posted: 25th Mar 2008 20:58
Oops sorry I missed the end there!

My winner is RBurke, as his seemed to show the most functionality and looked pretty cool too!

The runner up will be Jimmy, those were some slick looking windows =)

Well done to bmaczero and acelepage, both were really cool entries!

When you get some time RBurke, you should definitely finish that one, it would make a brilliant release to the community, for those who need GUI functionality, but not so much that they feel the need to pay for it.

Thanks everyone!

Rburke
19
Years of Service
User Offline
Joined: 28th Sep 2006
Location:
Posted: 26th Mar 2008 03:38 Edited at: 26th Mar 2008 03:39
Thanks again Pricey. I'll make an effort to continually work on this GUI and see if I can get this done by the next couple of weeks hopefully.

New Challenge: Gravity

* Create a program that demonstrates the physics of gravity, and collision if you want to take it a step further. For example, you can create planets each with their own gravitational pull and show the moons orbiting around as well as the planets orbiting around a star. Be creative. You can also create an aim/launch program that fires cannons or rocks and have it thrust in a certain direction as well as having gravity effect the location of the projectile. Come up with something interesting!

Deadline is April 7th on a Monday
Nicholas Thompson
21
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 26th Mar 2008 14:52
Suggestions for previous entries to a similar challenge:

Space Racing Game (including planetary gravity)
Lunar Lander

[center]
acelepage
22
Years of Service
User Offline
Joined: 2nd Jun 2004
Location: Plattsville
Posted: 26th Mar 2008 15:29
Here is an entry from a previous challenge. It was a maths challenge (has angles/vectors). It also has gravity and collision.

http://forum.thegamecreators.com/?m=forum_view&b=1&t=48011&p=113#m1031402

( 2b || !2b ), that is the question. The answer: true
Ric
21
Years of Service
User Offline
Joined: 11th Jul 2004
Location: object position x
Posted: 27th Mar 2008 00:10
Congrats RBurke - and good challenge. I'll try and enter something for this one.
BMacZero
20
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 27th Mar 2008 03:41
Here's a start of something.

Left mouse button adds a comet into the simulation!

If you un-rem lines 52 to 62, they will form a cool pattern.

Feel free to add new planets into it using the MakePlanet command, the simulation is very stable and flexible, not to mention interesting to watch .



BillR
23
Years of Service
User Offline
Joined: 19th Mar 2003
Location: United States
Posted: 28th Mar 2008 11:16 Edited at: 28th Mar 2008 11:16
@bmaczero - very cool!

I changed line 112:



click the mouse for 1 second, and you get gravity snakes!
BMacZero
20
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 28th Mar 2008 15:26
Hehe, that's cool

Nicholas Thompson
21
Years of Service
User Offline
Joined: 6th Sep 2004
Location: Bognor Regis, UK
Posted: 30th Mar 2008 05:11 Edited at: 30th Mar 2008 05:12
I've added 11 challenges to the Challenge Database and have 15 more still to do (from BMacZero's archive he emailed over).

I've also put the "search by coder" feature back in.

Once I've got the next 15 in, I'm going to go through the challenges and tag them into categories.

I'd REALLY like to get a consistent categorization across the 4 sites:
Challenges
Codebase
API
Webring

My initial instinct is to try to fit everything into the same categories used in the API for the command grouping...

The advantage of that is it would allow cross-site referencing (eg, if you're looking at the Vector API command, it could say "you might also find these challenges, codebase snippets and 3rd party websites useful too).

[center]
Pricey
23
Years of Service
User Offline
Joined: 22nd Feb 2003
Location:
Posted: 30th Mar 2008 19:36


I got bored, thought I'd try this one.
Physics has never been my strong point, but it works!
Quite a simple and fun little game.

Darth Vader
21
Years of Service
User Offline
Joined: 10th May 2005
Location: Adelaide SA, I am the only DB user here!
Posted: 31st Mar 2008 14:46
Sorry but what's the current challenge? And when does it end? It's been a while since I entered one so I was hoping to have a good bash at it!
lol
Thanks!


Jimmy
22
Years of Service
User Offline
Joined: 20th Aug 2003
Location: Back in the USA
Posted: 31st Mar 2008 15:21
It's about 8 posts up there guy



"Oh hey, nice website Jimmy, it's really nice and fancy." -- That C++ Nerd
Visit. Website. NOW!
acelepage
22
Years of Service
User Offline
Joined: 2nd Jun 2004
Location: Plattsville
Posted: 31st Mar 2008 21:19
Here's something that uses the inverse square law to plot planetary orbits. It took a bit of tweaking to get the starting values right so that the orbits lasted for a few minutes before decaying.



( 2b || !2b ), that is the question. The answer: true
BMacZero
20
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 1st Apr 2008 01:53
I like the juggler, Pricey! Fun game, though it gets quite impossible after about a minute. The planets are cool too, acelepage, though it would be cooler to see them do something other than move around in circles.

Here's an update to my demo, including some new stuff:

Blur trails behind the comets
More controls for the user, including "gravity snake" creation, the ability to "launch" the comets at starting velocities, and a few other things.

What's next:

Make this into a game. I'm thinking of a puzzle kind of game where you have to shoot the comets through a field of planets and get them into a goal of some sort.



Rburke
19
Years of Service
User Offline
Joined: 28th Sep 2006
Location:
Posted: 8th Apr 2008 09:24 Edited at: 8th Apr 2008 09:26
Alright, the deadline for our current challenge of gravity and physics has arrived! I've ran all of the entries and appreciated the cool gravitational effects everyone was able to simulate.

@ Pricey - JUGGLER showed excellent use of integrating gravity and the effects of the objects collisions thereof. Another fully functional game : ) This one kept me entertained for a while!

@ acelpage - The program started out moving the planetary units fast (I was able to view your simulation perfectly when I set the sync rate to 70 : ) .. anyways, I got a real kick out of the implementation of the inverse square law in your program and played around with the masses of the objects to see the different reactions I would get. Sometimes though I would have problems with the planets disappearing when the values were changed dramatically and it had done the same thing when I added a randomizer for most of the values.

@bmaczero - Awesome gravitational demo in 2d. The trails were very cool looking and I also liked having the ability to control the location of planets and comets. Having added an insane number of comets and planets included with trails was quite hypnotizing hehe.

This challenge's winner:


My thanks to everyone that had entered this challenge. I look forward to the next challenge!
Pricey
23
Years of Service
User Offline
Joined: 22nd Feb 2003
Location:
Posted: 8th Apr 2008 20:56
Thanks Rburke!

Not feeling very imaginative.
How about a racing game?

Points for creativity and how polished the end product feels.

2 weeks.
Have fun!

RedFlames
18
Years of Service
User Offline
Joined: 25th Aug 2007
Location: Germania
Posted: 22nd Apr 2008 21:34
Quote: "7. If nobody enters within the time limit, the challenge setter must set a new challenge."


Looks like you gotta set a new one, Pricey... and this time i'll definitly enter

Omega gamer 89
18
Years of Service
User Offline
Joined: 10th Sep 2007
Location: Pittsburgh, PA
Posted: 22nd Apr 2008 22:32
Yes, Pricey. Please post a new challenge. I've finally decided to try this.

...but I am the ferret king!!!! BWAHAHAHAHAHAHA!!!! tremble before my ferret minions!

Login to post a reply

Server time is: 2026-07-08 00:35:01
Your offset time is: 2026-07-08 00:35:01