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
19
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 1st Jun 2011 23:36
Oops, fixed typo!


Here's a lunar lander game using google maps.
http://www.gearthblog.com/blog/archives/2009/07/amazing_lunar_landing_game_using_go.html

IBOL
Retired Moderator
18
Years of Service
User Offline
Joined: 30th Mar 2004
Location: @IBOL17
Posted: 2nd Jun 2011 17:23
wow, phaelax & jimmy, your math skills really shine here.
mine are crap. maybe i can learn something...

Rich Dersheimer
AGK Developer
13
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 2nd Jun 2011 21:16 Edited at: 2nd Jun 2011 22:06
Here's my entry...



Arrow keys control movement. The object of the game is to see how many landings you can successfully make without touching a moonslug. Good luck!

EDIT: NOW THIS IS SERIOUSLY PISSING ME OFF! I can't seem to copy and paste my code in the code box without it coming out all jammed together in the editor. WHAT IS THE PROBLEM? Tabs vs spaces? Did something change in the forum code boxes? WHAT?

I've attached a text file of the code. How do I make it into a little CODE button instead of a DOWNLOAD button?

MORE EDIT: HA! Chrome copies the code just fine, so it's probably got something to do with IE9.

Attachments

Login to view attachments
Rich Dersheimer
AGK Developer
13
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 2nd Jun 2011 21:35 Edited at: 2nd Jun 2011 22:20
Jimmy - very interesting!

But the lander seems to go right through the surface, and the game doesn't resolve. Crash or land?

Are we supposed to land it?

Nice work with the polygons and vector graphics!

EDIT: Oops, I didn't notice that you were still working on it. Can't wait to see the finished version!

Phaelax
DBPro Master
19
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 2nd Jun 2011 22:32
Hey that moon slug looks just like a bell curve!

Nice graphis Rich, I think this looks like our first real DB challenge in almost a year.

Rich Dersheimer
AGK Developer
13
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 3rd Jun 2011 00:47 Edited at: 3rd Jun 2011 00:48
Quote: "Nice graphis Rich"


Thanks!

I may have made it too easy though...



Attachments

Login to view attachments
Phaelax
DBPro Master
19
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 3rd Jun 2011 00:50
Current version. I have a slight bug in the platform collision which doesn't always appear. But on occasion you'll randomly explode without being near anything. I'll just claim its a feature and that your gas tank ruptured in space.



Rich Dersheimer
AGK Developer
13
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 3rd Jun 2011 03:32
Quote: "on occasion you'll randomly explode"


Heh, heh. A feature, of course!

Jimmy
19
Years of Service
User Offline
Joined: 20th Aug 2003
Location: Back in the USA
Posted: 3rd Jun 2011 15:08
@Rich:

Ur graphix put mine to shame Good job

Moonslugs certainly make a lander more interesting.

@IBOL:

Yours works fine for me. Love your pixel particles.

@Phaelax:

Your latest version takes about 30 sec to load then runs at about 11 FPS on my core i7 laptop. Like the updated graphics, though. And random explosions are always welcomed.


May 10th / Jerico2day-OBese87 / VOTE NOW
IBOL
Retired Moderator
18
Years of Service
User Offline
Joined: 30th Mar 2004
Location: @IBOL17
Posted: 3rd Jun 2011 18:05 Edited at: 3rd Jun 2011 18:20
well, for the people who said my gravity is too strong,
i have halved the gravity & reduced the wind, but on my machine,
that makes it too easy to always get the x16 or x25 pads.
(you can adjust the grav# and wind# variables seperately.)
otherwise, mostly the same.
i've gotta try the space slugs.



Phaelax
DBPro Master
19
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 3rd Jun 2011 18:16
Quote: "Your latest version takes about 30 sec to load then runs at about 11 FPS on my core i7 laptop"


Can't imagine why, it runs at the locked 60fps just fine on my Core 2 Duo.

thenerd
13
Years of Service
User Offline
Joined: 9th Mar 2009
Location: Boston, USA
Posted: 4th Jun 2011 18:12
How long is this gonna go on until? I'm coding my entry right now!

Jimmy
19
Years of Service
User Offline
Joined: 20th Aug 2003
Location: Back in the USA
Posted: 4th Jun 2011 18:25
You have 2 more days!

Oh noes, me too.


May 10th / Jerico2day-OBese87 / VOTE NOW
Non Sequitur M
14
Years of Service
User Offline
Joined: 28th Oct 2008
Location: Where am I!? Where are YOU?
Posted: 4th Jun 2011 18:45
I've been purposely forgoing anything fancy and trying to emulate the original Atari version as closely as possible. My entry even uses vector graphics! Haha! But, everyone who's played it has said that it's spot on... So, here's to hoping!

Phaelax
DBPro Master
19
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 4th Jun 2011 20:34
I started mine out all vector based, then got sucked into fancy graphics.

The version I had on Amiga was rather interesting. Your ship would fly around your desktop (workbench) and you could land on top of other windows.

Penfold
19
Years of Service
User Offline
Joined: 3rd Dec 2003
Location: RED postbox houses of parliment
Posted: 5th Jun 2011 23:58
all these entrys are looking really good and some are very polished and shiny , I shall take a second look tomorrow and make final scores.

Looking Really good people.

'Ooh 'eck chief'...'crumbs'
thenerd
13
Years of Service
User Offline
Joined: 9th Mar 2009
Location: Boston, USA
Posted: 6th Jun 2011 02:18
Well, I utterly failed. This was going to be my entry, but...



Phaelax
DBPro Master
19
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 6th Jun 2011 04:10
Here's mine for now. What's the deadline? I still have a few things I wanna do before final submission.



Rich Dersheimer
AGK Developer
13
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 6th Jun 2011 07:23
@ Phaelax - AWESOME slug!

Jimmy
19
Years of Service
User Offline
Joined: 20th Aug 2003
Location: Back in the USA
Posted: 6th Jun 2011 12:05 Edited at: 6th Jun 2011 12:36
That IS an awesome slug!

Too bad it runs at 4 FPS on my lappy

Phaelax
DBPro Master
19
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 6th Jun 2011 18:24
Does anything actually run on your laptop Jimmy?

Non Sequitur M
14
Years of Service
User Offline
Joined: 28th Oct 2008
Location: Where am I!? Where are YOU?
Posted: 7th Jun 2011 01:47 Edited at: 7th Jun 2011 17:36
Okay. Before I post my code, yes, I am using data statements. But, according to the original rules link on the first post of this thread, I quote:
Quote: "You may use data statements in your code to assist in the creation of media, so long as it is data you have produced yourself, rather than copied/converted from existing media files."

Those pieces of data are Vector nodes, not pixel data. So, it's totally legal. Just didn't want any complaints about that.

So, without further ado, here is my polished turd. Haha.

Hope you guys enjoy!

[EDIT] Oh, yeah. Forgot a few things:

First, my game is a hardcore Atari version clone, because I'm old(actually 25) and nostalgic.

Mission Divinity controls:

A - rotate left
D - rotate right

To use your thruster, click and drag to the right.

The mouse emulates the Atari controller's twist function, which in the original Lunar Lander, controlled variable thrust.

A thruster % of 25 with a landing orientation nullifies the gravity. Meaning, if you want to land, get your vertical speed to a safe approach speed, and put your thrusters at 25% and you'll retain that speed.

Landing with a vertical speed <25fps(feet not frames) will be a safe landing. 16-24fps is a hard landing, while anything lower is perfect. Also, you can't have a horizontal speed >10fps, or you'll crash as well.

Anyway, it's dinner time! Cya!

[EDIT 2]OK. Last update, gave my game a endgame score readout!

Jimmy
19
Years of Service
User Offline
Joined: 20th Aug 2003
Location: Back in the USA
Posted: 7th Jun 2011 03:08
Quote: "Does anything actually run on your laptop Jimmy?"


Ya, only liek everyone else's loony entries and Crysis 2

Non Sequitur M
14
Years of Service
User Offline
Joined: 28th Oct 2008
Location: Where am I!? Where are YOU?
Posted: 7th Jun 2011 03:32 Edited at: 7th Jun 2011 03:52
Haha. That's weird. It runs perfectly on my laptop!

Also, Phaelax, that "random crashing" you mentioned? It happens almost every time! I think the glitch has to do with the starting platform's collision detection. I noticed you only explode at the same height as it.

[Edit] Wait, you are going to grade mine right, Penfold? You said turn them in by Sunday or Monday, and you'd grade them Tuesday!

Phaelax
DBPro Master
19
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 7th Jun 2011 03:57
The random crashing should be fixed in the last edition I posted.

Non Sequitur M
14
Years of Service
User Offline
Joined: 28th Oct 2008
Location: Where am I!? Where are YOU?
Posted: 7th Jun 2011 04:17
Sweet. I didn't even catch that update. Um. Also, does anyone know why he checked the entries a day earlier than he said he would?

IBOL
Retired Moderator
18
Years of Service
User Offline
Joined: 30th Mar 2004
Location: @IBOL17
Posted: 7th Jun 2011 04:53
@Amo Deus Man ,
don't worry, i think your entry will be judged. (opinion)
i also think its pretty great, and pretty hard. very nice going!
(but it's the kind of hard that makes me want to try again)

for everyone who's tried this , does the INK command now not require 2 values (foreground, backgroud color) ?
i have to add a ,0 to the end of all the INK's to get it to run.

(also, Amo Deus Man , i found that disabling the "mouse auto-reposition" made the game a lot more playable for me,
as well as " set window position 0,0 ")

Non Sequitur M
14
Years of Service
User Offline
Joined: 28th Oct 2008
Location: Where am I!? Where are YOU?
Posted: 7th Jun 2011 05:26
Thank you. My dad seems to love it. Although, he pilots like Evel Knievel! Haha. Almost crashing into mountains and stuff, and then gets a perfect landing! Haha!

Anyway, there are actually 23 safe landing places in mine!

Also, I actually enjoyed the challenge of your earlier entry! Haha! But, to each his own. I like the wind, but weighed against it in the end. And, yeah, I tussled with the mouse position thing. It's mainly left in from testing, I wanted to see everything happening. And, getting it to zoom in like that was a b***h! It's only aesthetically zooming in, while still calculating for the zoomed out view. I thought it would be easier that way, rather than out and out-right changing the physics when you zoom in!

So, anyone can remove the 'position mouse' command. If you don't like it that way.

Rich Dersheimer
AGK Developer
13
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 7th Jun 2011 08:33
Quote: "for everyone who's tried this , does the INK command now not require 2 values (foreground, backgroud color) ?
i have to add a ,0 to the end of all the INK's to get it to run."


IanM's Matrix Utils include an INK command that only requires one value. It's easy to miss when restricting code to "stock" DBPro.

Phaelax
DBPro Master
19
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 7th Jun 2011 09:05
I've attached a picture of my asteroid texture I planned on using, its randomly generated. I just didn't have time to make use of it yet.

Attachments

Login to view attachments
Jimmy
19
Years of Service
User Offline
Joined: 20th Aug 2003
Location: Back in the USA
Posted: 7th Jun 2011 10:46
That picture runs at 1 FPS on my lappy.

Phaelax
DBPro Master
19
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 7th Jun 2011 13:11
Cause your laptop looks like this:



baxslash
Valued Member
Bronze Codemaster
16
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 7th Jun 2011 13:26
Ha! My son has one of those!!

It has a really basic space invaders game and I think snake too but it won't run DBP...

Non Sequitur M
14
Years of Service
User Offline
Joined: 28th Oct 2008
Location: Where am I!? Where are YOU?
Posted: 7th Jun 2011 17:31 Edited at: 7th Jun 2011 17:38
Well, I didn't know that about Matrix1. My bad. I probably am using that ink command then. Everyone just needs to drop a ,0 to the end of all my inks(I think there are like 7 or so).

Also, baxslash, why would ever buy your son an eMachine!?

[EDIT] Nevermind everybody, I took care of the ink problem. It should run fine on any DBP now.

baxslash
Valued Member
Bronze Codemaster
16
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 7th Jun 2011 17:39
Quote: "Also, baxslash, why would ever by your son an eMachine!?"

I didn't... ;P

Non Sequitur M
14
Years of Service
User Offline
Joined: 28th Oct 2008
Location: Where am I!? Where are YOU?
Posted: 7th Jun 2011 18:01
Oh... I thought that was a picture of an eMachine! XD jk.

Penfold
19
Years of Service
User Offline
Joined: 3rd Dec 2003
Location: RED postbox houses of parliment
Posted: 7th Jun 2011 23:52
ok Guys gonna score you up now, should be finished in about an hour (or less depending on distractions). Dont worry you'll all get scored.

'Ooh 'eck chief'...'crumbs'
Penfold
19
Years of Service
User Offline
Joined: 3rd Dec 2003
Location: RED postbox houses of parliment
Posted: 8th Jun 2011 01:03 Edited at: 8th Jun 2011 01:07
Ok I've scored up and so I reveal the scoring for each coder. (think that made sense )

In order that they posted there first entry and also the order I wrote them down....

Points are given for,

Concept - What it looks like its trying to do.
Graphics - How pleasing to the eye it is.
Completeness - How polished it seems to have been made.

Kezzla, Concept 6 Graphics 6 Completeness 4 Total 16/30
Loved the Idea of it being 3d unlike the others just needed a little bit more work on the landing detection I thought as it was quite hard to touch down.

Phaelax V2, Concept 5 Graphics 7 Completeness 5 Total 17/30
Loved the transition between v1 and 2 couldnt however get v3 or v4 to work just kept getting a grey ball in the corner and a crash

IBOL V2, Concept 5 Graphics 6 Completeness 4 Total 15/30
Nice Terrain Generator although I found the wind and gravity quite harsh on both versions.

Jimmy, Concept 7 Graphics 5 Completeness 4 Total 16/30
Remarkably Random and very quirky no obvious goal though

Rich Dersheimer, Concept 5 Graphics 7 Completeness 6 Total 18/30
almost completely like a mini game, I did have a few landing issues but that might have been because I suck.

TheNerd, Concept 6 Graphics 5 Completeness 3 Total 15/30
Nice examples of collision boundary effects unforts not much else

Amo Deus Man, Concept 5 Graphics 6 Completeness 5 Total 16/30
very retro funky and I love the way it zooms in as you get closer

So I guess that makes the winner - Rich , Time to think of the next coding challenge.

<edited> obviously these are my opinions and are in no way intended to offend. All entrys were very good and should all be awarded but someone has to be the winner.

'Ooh 'eck chief'...'crumbs'
Phaelax
DBPro Master
19
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 8th Jun 2011 04:03
I've attached the executable of the last code I posted. Lemme know if that runs for ya. Don't know why you and jimmy have such a problem with my code.

Attachments

Login to view attachments
Rich Dersheimer
AGK Developer
13
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 8th Jun 2011 04:38
Quote: "So I guess that makes the winner - Rich , Time to think of the next coding challenge.
"


Woot! I'll give it some thought...

Jimmy
19
Years of Service
User Offline
Joined: 20th Aug 2003
Location: Back in the USA
Posted: 8th Jun 2011 09:40
Quote: "I've attached the executable of the last code I posted. Lemme know if that runs for ya. Don't know why you and jimmy have such a problem with my code."


It loads a lot faster, and starts off at about 20 FPS, but then it slowly drops to 11 and stays there :/

Phaelax
DBPro Master
19
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 8th Jun 2011 11:18
The hamster in your laptop must've got tired running around the wheel.

Non Sequitur M
14
Years of Service
User Offline
Joined: 28th Oct 2008
Location: Where am I!? Where are YOU?
Posted: 9th Jun 2011 01:56
Dang. Oh, well! Great job, Rich. Glad you liked my zooming, Penfold. Good luck on the next challenge everyone.

Aurum Knight
14
Years of Service
User Offline
Joined: 15th Jul 2008
Location: the suburbs of nowhere
Posted: 16th Jun 2011 05:24
Um, is the next challenge going to be set? I may actually have time to enter some of these during the summer.
Non Sequitur M
14
Years of Service
User Offline
Joined: 28th Oct 2008
Location: Where am I!? Where are YOU?
Posted: 17th Jun 2011 05:47
Well, the rules say if the challenge setter doesn't act promptly the runner up should step up... That would be Phaelax. So, I guess I'll give it another couple of days, and if he doesn't respond by Monday, I'll think something up. K?

If the universe isn't a program, then why do planets orbit in loops, death sparks life, and human interaction is buggy and glitched?
Rich Dersheimer
AGK Developer
13
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 17th Jun 2011 16:18
Sorry all, I should have posted something sooner!

So... the fourth of July is coming up - fireworks comes to mind, but that's really cliche, so how about this...

A waving flag!

It doesn't have to be a US flag, but it does have to wave.

This one shouldn't take long, so how about a week from Sunday? That gives two weekends to come up with a waving flag.

Jimmy
19
Years of Service
User Offline
Joined: 20th Aug 2003
Location: Back in the USA
Posted: 17th Jun 2011 16:20 Edited at: 17th Jun 2011 16:21
Love it.

TO TEH CODEZMOBILE

Jimmy
19
Years of Service
User Offline
Joined: 20th Aug 2003
Location: Back in the USA
Posted: 17th Jun 2011 18:01 Edited at: 17th Jun 2011 18:41
Here's mine so far. Just using a simple sine wave at the moment. Improvements to come...



Edit:
Slowed it down to make it less lolsy

Rich Dersheimer
AGK Developer
13
Years of Service
User Offline
Joined: 1st Jul 2009
Location: Inside the box
Posted: 17th Jun 2011 18:09
Jimmy that's AWESOME!

Couple of things to think about...

A flag waving in the wind is pretty random.

A flag is usually attached to something along one side.

Wind would blow away from whatever side the flag is attached to.

acelepage
18
Years of Service
User Offline
Joined: 2nd Jun 2004
Location: Plattsville
Posted: 17th Jun 2011 18:58
I happened to be working on some cloth physics so I thought I would throw this in.



( 2b || !2b ), that is the question. The answer: true

Login to post a reply

Server time is: 2023-02-06 18:26:43
Your offset time is: 2023-02-06 18:26:43