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
BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 23rd Sep 2009 04:32
That was with this updated code:



But since that lost so spectacularly, I switched it over to a bit more random method, so it doesn't do that anymore .





Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 24th Sep 2009 18:44
If you haven't posted your final entry yet, hurry up! The deadline is tomorrow (25th) 1 second before midnight, GMT.

Neuro Fuzzy
17
Years of Service
User Offline
Joined: 11th Jun 2007
Location:
Posted: 26th Sep 2009 01:45
I think i'll leave mine the way it is.

Also, diggsey, you might want to make a program that tests every rock paper scissors program against every other rock paper scissors program, for better scoring.
Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 26th Sep 2009 02:03
Time's up!

I will start scoring tomorrow, it's late now.

Aurum Knight
16
Years of Service
User Offline
Joined: 15th Jul 2008
Location: the suburbs of nowhere
Posted: 26th Sep 2009 04:01
Oh, I got all confused about the deadline

Oh well, maybe we should start thinking of what the next challenge could be
Valle
18
Years of Service
User Offline
Joined: 10th Mar 2006
Location: in your girlfriends bed
Posted: 26th Sep 2009 05:33
i guess my entry won't win because 100 rounds are just not enough to detect patterns. It becomes good after something like 300 rounds...


Neuro Fuzzy
17
Years of Service
User Offline
Joined: 11th Jun 2007
Location:
Posted: 26th Sep 2009 07:50
My program probably isn't going to win. Every point my program gets from a tie, another program gets one too
Kira Vakaan
15
Years of Service
User Offline
Joined: 1st Dec 2008
Location: MI, United States
Posted: 26th Sep 2009 08:02
Now that all of the final entries are in, I can show all of you that I'm not a raving lunatic.

To quote the competition guidelines:

Quote: "The scoring system ensures that programs which choose purely random choices will never win."


And to quote Diggsey:

Quote: "As long as there are at least two non-random entries, the random entries cannot win."


I do not believe this is true. Earlier, I said that any program designed to discern a pattern in its opponent's moves can ultimately be thwarted by a random generator, by virtue of the fact that basing your moves off of random moves makes your moves random themselves. In effect, a random generator turns any "non-random" program into a random generator. Thus in theory, should one person submit a random generator as their entry, every program it faces has an equal chance of winning or losing, taking all of the skill in programming out of the question.

If by following this logic, you are still not convinced, I've taken all of the final entries and paired them against a random generator. I've used Valle's competition setup with very slight modifications to run 1000 games of 100 rounds each. Then, I calculate the percentage of the games with an actual winner, won by the player, and won by the random generator. Here is the setup:



For each player's entry, I ran the setup three times and posted the percentage results below:

BMacZero - Random Generator:
50.9506% - 49.0494%
49.3724% - 50.6276%
46.8% - 53.2%

Aurum Knight - Random Generator:
49.7872% - 50.2128%
52.4444% - 47.5556%
46.4% - 53.6%

Valle - Random Generator:
52.0492% - 47.9508%
49.0272% - 50.9728%
49.1667% - 50.8333%

fearred - Random Generator:
46.7213% - 53.2787%
55.9242% - 44.0758%
48.6607% - 51.3393%

Neuro Fuzzy - Random Generator:
51.8987% - 48.1013%
50.6276% - 49.3724%
47.1545% - 52.8455%

As you can see, no "non-random" entry beats or loses to a random generator, because they become, in effect, random generators themselves. If one were to increase the number of games played, I'm sure the percentages would tend to 50.0%.

All of this proves my point, that I could enter this:



as my entry and have an exactly equal chance of winning the competition. This is why a competition of Rock, Paper, Scissors isn't the best idea. I do like the idea of competition, but not with a game that can be beaten randomly.
Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 26th Sep 2009 11:41
@Kira Vakaan
You clearly don't understand what I am saying.

Quote: "as my entry and have an exactly equal chance of winning the competition."


Your entry would have a near 0 chance of winning the competition.

You only get ONE point for drawing each game. That is not enough to win.

In this competition, the players aren't paired against random generators, so I have no idea why you just did that...

Quote: "Thus in theory, should one person submit a random generator as their entry, every program it faces has an equal chance of winning or losing, taking all of the skill in programming out of the question."


That's clearly not true, seeing as the non-random generators would also play each other, and the best would win most of the time, gaining 3 points for each game it won.

Effectively, adding a random generator to the competition gives every entry in the competition one extra point, so it will not affect the order of the best entries.

Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 26th Sep 2009 11:59 Edited at: 26th Sep 2009 12:55
Here are the entries:
Aurum Knight
Valle
Neuro Fuzzy
BMacZero
fearred


Here is the competition line-up:

Played:
Aurum Knight (16) vs Valle (72)
Neuro Fuzzy (37) vs BMacZero (28)
fearred (4) vs Aurum Knight (95)
Valle (36) vs Neuro Fuzzy (36)
BMacZero (19) vs fearred (26)
Aurum Knight (33) vs Neuro Fuzzy (39)
Valle (28) vs BMacZero (40)
Neuro Fuzzy (32) vs fearred (33)
fearred (2) vs Valle (95)
BMacZero (23) vs Aurum Knight (44)

Not-played:

Scores:
Aurum Knight - 7 points
Valle - 7 points
Neuro Fuzzy - 4 points
BMacZero - 5 points
fearred - 2 points

SUDDEN DEATH
Aurum Knight and Valle both have 7 points, so sudden death will decide who is the winner!

ROUND 1: Valle (32) vs Aurum Knight (38) (DRAW)
ROUND 2: Valle (40) vs Aurum Knight (31) (DRAW)
ROUND 3: Valle (41) vs Aurum Knight (33) (DRAW)
ROUND 4: Valle (29) vs Aurum Knight (37) (DRAW)
ROUND 5: Valle (29) vs Aurum Knight (54)

RESULTS:

Aurum Knight is the winner!
Closely followed by Valle.


Kira Vakaan
15
Years of Service
User Offline
Joined: 1st Dec 2008
Location: MI, United States
Posted: 26th Sep 2009 12:55
Alright, I see where I was wrong. And I've effectively made an ass of myself, so I'd like to apologize and withdraw.
Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 26th Sep 2009 12:56 Edited at: 26th Sep 2009 12:57
Don't worry about it

I apologise for maybe sounding a bit harsh

Kira Vakaan
15
Years of Service
User Offline
Joined: 1st Dec 2008
Location: MI, United States
Posted: 26th Sep 2009 12:58
We'll call it even, then.
Diggsey
18
Years of Service
User Offline
Joined: 24th Apr 2006
Location: On this web page.
Posted: 26th Sep 2009 13:02 Edited at: 26th Sep 2009 13:03
OK then


BTW, the competition has ended!

See the post further back for the results.

Neuro Fuzzy
17
Years of Service
User Offline
Joined: 11th Jun 2007
Location:
Posted: 26th Sep 2009 20:03
heheh, i tied all my games.
Aurum Knight
16
Years of Service
User Offline
Joined: 15th Jul 2008
Location: the suburbs of nowhere
Posted: 26th Sep 2009 23:45
Wow, I thought Valle would win

I'll set the challenge as soon as I can think of something... Please make suggestions
fearred
15
Years of Service
User Offline
Joined: 18th Sep 2009
Location:
Posted: 27th Sep 2009 02:36 Edited at: 27th Sep 2009 02:38
Congrats to Aurum Knight
fearred
15
Years of Service
User Offline
Joined: 18th Sep 2009
Location:
Posted: 27th Sep 2009 02:37
SUGGESTION
A game made of only circles. Basically everyone would have to come up with a game that uses only circles. Of course you can still put text on the screen and use IF functions etc.

I reckon this would be challenging and you could judge on creativity and ingenuity....
Aurum Knight
16
Years of Service
User Offline
Joined: 15th Jul 2008
Location: the suburbs of nowhere
Posted: 27th Sep 2009 03:45 Edited at: 10th Oct 2009 00:43
Thanks for the suggestion, but I finally thought of one

Challenge:
You will make a tank game. I'm thinking along the lines of the tank game from 'Wii Play' You should be creative though, and you don't have to do it at all like the Wii Play game if you don't want to. Maybe you could add a shop in-between levels for upgrades or something. Or maybe you would forget the levels all together and make the game continuous. You decide

For those of you who haven't played the tank game on Wii Play, here are the basics:

You control a tank and start out with three lives. You're playing against other AI controlled tanks. Everything is one hit, one kill. All shots fired are slow enough to see, and can be dodged if they're fired from far enough away. Your shots bounce off walls once, then after that if they hit a wall they just explode. You can lay mines also. Mines explode after a certain amount of time, if someone gets too close, or if it gets shot.

You don't have to make your game anything like this, fyi

Judging:
The game will be judged mainly based on how addictive it is Level design is naturally part of that.

Looks aren't the main focus here, but it would be nice to have some good looking tanks instead of just blocks Both 2d and 3d are fine.

Deadline:
The deadline in two weeks, on 10/17/2009 at 23:59:59 GMT. If people get into it, I'll consider changing it to three weeks.

Have fun!

Edit: I changed it to to three weeks fyi.
Kira Vakaan
15
Years of Service
User Offline
Joined: 1st Dec 2008
Location: MI, United States
Posted: 27th Sep 2009 04:05
Oh man, all without Sparky's Collision and external media?

I'll see what I can do.
Aurum Knight
16
Years of Service
User Offline
Joined: 15th Jul 2008
Location: the suburbs of nowhere
Posted: 27th Sep 2009 04:15 Edited at: 27th Sep 2009 15:49
I completely forgot about collision. What would you guys think if I said we could use Sparky's Collision Dll since it's free?

Technically we're not supposed to use external dll's in the challenges, but what does everyone else think?

EDIT:
Okay, it's decided. No Sparky's Collision Dll.
Kira Vakaan
15
Years of Service
User Offline
Joined: 1st Dec 2008
Location: MI, United States
Posted: 27th Sep 2009 04:45 Edited at: 27th Sep 2009 04:55
Well, writing your own collision would certainly be a worthy challenge...

I think I'm up for it, but if other people want to use Sparky's, I could go either way.

Edit: In fact, I think I'm leaning toward writing our own collision for the challenge of it.
Neuro Fuzzy
17
Years of Service
User Offline
Joined: 11th Jun 2007
Location:
Posted: 27th Sep 2009 05:32
I think I can come up with something amazingly spiffy for this challenge

I can use my 2d world setup I used (posted in code snippets) to view a 2d world, and I've worked a lot with rotation matrices, so 2d sliding collision should be easy peasy (err, I might regret those words). smash this together with a 2d limb/object system, and victory is mine!!!
Kira Vakaan
15
Years of Service
User Offline
Joined: 1st Dec 2008
Location: MI, United States
Posted: 27th Sep 2009 06:10
@Aurum Knight:
Actually, I was thinking about it, and you'd get better results if we were allowed Sparky's DLL. I'm sure using systems that actually work is more conducive to the creation of "addicting" games.
But the use of external DLLs is expressly forbidden... of course we'd need a group vote.
fearred
15
Years of Service
User Offline
Joined: 18th Sep 2009
Location:
Posted: 27th Sep 2009 06:16
ooh! I love that game! Play it on wii all the time!
Neuro Fuzzy
17
Years of Service
User Offline
Joined: 11th Jun 2007
Location:
Posted: 27th Sep 2009 06:21
Well... I don't see why rules can't be ignored if everyone is in agreement. It's not like the challenge is being moderated or like it's a serious thing.

Still, I'm not going to be using a plug in of any kind. I wanna make mah own!
fearred
15
Years of Service
User Offline
Joined: 18th Sep 2009
Location:
Posted: 27th Sep 2009 07:15
I've already started mine in 2d and I've got all the basics under control. By the way I'm jst gonna use an XY collision system for my entry.
acelepage
20
Years of Service
User Offline
Joined: 2nd Jun 2004
Location: Plattsville
Posted: 27th Sep 2009 08:40
Once upon a time this thread was moderated by Ric. Ric provided a link to detailed rules on challenges. Thus the playing field was rendered level. Everyone could be included with a base install of DBPro.
Time went by, and the challengers were left to themselves. Natural evolution began to become evident. DBPro evolved, programming evolved. The purpose of the challenge became unclear. The progeny questioned the official rules. Without guidance, the true path wavered.
Why re-invent the wheel, when a plug-in exists to do it for you? Who are these plug-in coders anyway? Are they DBPro coders? Do they dilute the pure coding ethic?
What was that link that described the rules for the challenge? I don't remember. Perhaps it doesn't matter. Purpose is defined by those who participate. Let the people speak.

( 2b || !2b ), that is the question. The answer: true
Kira Vakaan
15
Years of Service
User Offline
Joined: 1st Dec 2008
Location: MI, United States
Posted: 27th Sep 2009 08:54
Wise words.

Yes, please, let the people speak, so I can determine whether or not I'm coming up with a sliding collision system.
BillR
21
Years of Service
User Offline
Joined: 19th Mar 2003
Location: United States
Posted: 27th Sep 2009 09:35 Edited at: 27th Sep 2009 09:36
We have always followed the original rules, and I think we should continue to do so.
No external media
No external Dll's, etc.
Your code must copy and paste into DBPro and compile.

Here is the link:
http://www.andromedus.com/dbp/html/rules.html
Kira Vakaan
15
Years of Service
User Offline
Joined: 1st Dec 2008
Location: MI, United States
Posted: 27th Sep 2009 09:40
Well I've got a lot of work to do then.
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 27th Sep 2009 10:14
as a longtime spectator of this thread, i'd hate to see it stray from tradition that i believe, in large, has kept it popular and useful for so long. participants and spectators, old and new, have benefited from what goes on here, along with the simple rules that apply. deviate from the norm and the thread will change. allow it once and it will be allowed again. and then, perhaps, it becomes commonplace and i, by then, will have forsaken this thread; a thread that i've become accustomed to perusing many times a week for the past few years (there's a reason this thread has nearly 200,000 views). for now, back to my armchair, front row & center


Aurum Knight
16
Years of Service
User Offline
Joined: 15th Jul 2008
Location: the suburbs of nowhere
Posted: 27th Sep 2009 15:47
I see what you guys are saying, and I agree. I'll edit that post to avoid any confusion.

The reason I thought it might be a good idea is because collision might take a while to code. There's nothing wrong with coding a bunch, but I figured we might get better results if people spend less time coding collision and more time coding the game play and levels. Also, Sparky's is used by most people, and supposedly it almost became part of the DBP core.

But I don't wanna ruin this for anyone, so we'll stick with all DBP commands.
BillR
21
Years of Service
User Offline
Joined: 19th Mar 2003
Location: United States
Posted: 27th Sep 2009 16:17
Can we enter a 2D or 3D tank game?
Valle
18
Years of Service
User Offline
Joined: 10th Mar 2006
Location: in your girlfriends bed
Posted: 27th Sep 2009 17:22
Congrats, Aurum Knight

I think I'm not going to enter this one. Imo it's better to have a competition based on a simple idea (e.g. circles) than to ask for finished game, which brings a lot of problems with it, like collision and graphics (without extern media). I prefer compos which are easy to pick up but have potential for big programs.


BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 27th Sep 2009 17:27
I agree with BillR. By the way, I love that game too . Got to level 50-something once, man that took forever . Totally in .



MickeyIII
18
Years of Service
User Offline
Joined: 12th Aug 2006
Location: Louisiana
Posted: 28th Sep 2009 02:08
This challenge reminds me of my favorite FPS-Tank/RTS game in the entire gaming universe...Battlezone! It ran on Glide AND DirectX 5 cards, or was it Dx6? I beat the stars and stripes side, AND Red Odyssey, which seemed extremely short, and I now have Battlezone II Combat Commander, and it's Multiplayer is awesome, but the instant action and single player just wasn't the same feel with the mission based single player in the first one...not to mention that the second one's AI was nearly IMPOSSIBLE to out gun, or I just suck because of all the years in between playing the first one with joystick and throttle, and then the second with my keyboard and mouse, because I couldn't get the joystick to map correctly for the second...

But basically, for those of you who don't know, or, hopefully, would like to make a SMALL remake of it, which I might actually do sometime in the future for fun, I'll tell y'all what it was...

Battlezone / Battlezone: Rise of the Black Dogs (N64 system only).

Battlezone was, if I can remember the story correctly, sort of a second cold war at first between the Americans (Stars and Stripes) and the Soviet Union (Red Odyssey), until the fight for resources for exploration got out of hand...

When playing as the Americans, you start out on the moon, in training, and go through various missions, on other planets as well, such as Mars, Venus, about 1 or 2 of Jupiter's Moons, Pluto, and Planet X once you make First Contact with Aliens after fighting for several key Relics.

What you had to do, first you had a set of objectives, fleets, a Recycler and maybe a Scavenger or 2. Look for a geyser, and Deploy your Recycler on it to build more Scavengers, they look for scrap from enemy, and friendly, structures and units that have been destroyed, maybe some Scouts to follow you, a couple of Turrets, a Constructor to build Gun Towers, Silos, Barracks for more Pilots, and then deploy a Factory from the Recycler for your floating Tanks, Bombers, and Walkers! You might want to order you Constructor to build an Armory as well for weapon upgrades. After you finish your objectives and survive all hostile units, the mission was over.

By the way, all this BUILDING and ORDERING is done from First Person View either from the Tank, or on foot.

That was the basic game play of Battlezone, and I intend, one day, some how, make a third one in DX9, Maybe Add dx10 support, or dx11, with permission from whoever bought out the Battlezone franchise, Activision still exists, and make a third one.

Any way, sorry for the rant, but y'all inspired me!

MickeyIII
fearred
15
Years of Service
User Offline
Joined: 18th Sep 2009
Location:
Posted: 28th Sep 2009 06:14
lol this challenge should be fun........ *laughs evilly*
Kira Vakaan
15
Years of Service
User Offline
Joined: 1st Dec 2008
Location: MI, United States
Posted: 28th Sep 2009 10:28
Quote: "lol this challenge should be fun........ *laughs evilly*"


Much agreed.

Here's my little collision system WIP. I've attached only the executable, in case code is a sensitive issue.

So far, I've gotten down sphere casting. In the demo, the sphere is being cast from the top cube to the bottom cube and will collide with the triangle. The floating cube is there to mark the world's origin. Use WASD to move the casting line around.

Sliding collision with 100% DBPro code isn't looking so impossible after all!

Attachments

Login to view attachments
BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 28th Sep 2009 17:33
Got tank movement, shooting, and mines done. Kira, your collision looks like it's working quite well. Very cool .



Aurum Knight
16
Years of Service
User Offline
Joined: 15th Jul 2008
Location: the suburbs of nowhere
Posted: 28th Sep 2009 18:08 Edited at: 28th Sep 2009 18:17
@BillR
2d and 3D are fine. Remember, I'm looking a lot at addictiveness, so you can be very creative in your game. You don't have to follow any of those suggestions I made.

@Kira Vakaan
Not showing the code right now is fine as long it isn't an entry. Keep in mind I don't have the latest DirectX version, so it won't run on my computer.

I'm hoping this challenge works out good. It is a bit much to ask for a game, as Valle pointed out. You guys seem to be up to it though
fearred
15
Years of Service
User Offline
Joined: 18th Sep 2009
Location:
Posted: 28th Sep 2009 18:16
Lol I'm trying to code an interesting ai right now
Kira Vakaan
15
Years of Service
User Offline
Joined: 1st Dec 2008
Location: MI, United States
Posted: 28th Sep 2009 22:32
@BMacZero: Thanks! Next thing to do is setting up the system to work with maybe a few more polygons than one. It's been quite the crazy vector math refresher though.

@Aurum Knight: I understand. Come the deadline, you'll get nothing but code.
HavokDelta6
15
Years of Service
User Offline
Joined: 22nd Aug 2009
Location: United Kingdom
Posted: 29th Sep 2009 02:03
Sounds cool i'll look into it

fearred
15
Years of Service
User Offline
Joined: 18th Sep 2009
Location:
Posted: 29th Sep 2009 02:57
guys if you want something to base your game on here is a demo of the game, well actually it's the last level of the game but anyways.....
http://www.youtube.com/watch?v=QkL6w5LKpKk
BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 29th Sep 2009 03:08 Edited at: 29th Sep 2009 03:09
And I thought level 50 was hard



Neuro Fuzzy
17
Years of Service
User Offline
Joined: 11th Jun 2007
Location:
Posted: 29th Sep 2009 04:37
I would really love to work on this challenge right now but AP chem is eating up all of my time

I Stoichiometry

Alright... it's kinda cool but...
Kira Vakaan
15
Years of Service
User Offline
Joined: 1st Dec 2008
Location: MI, United States
Posted: 29th Sep 2009 09:20
If anyone has the time and wouldn't mind helping me out a bit, would you kindly run the attachment? I'm trying to determine the average number of polygons that can be tested for collision at a decent frame rate on everyone's computer. This'll help me decide whether or not I need to implement octree culling or something similar.

If anyone could enter an arbitrary value for both the sphere's rows and columns and report the frame rate they're getting, that would be very much appreciated.

WASD to move the casting ray's starting point.

Attachments

Login to view attachments
BillR
21
Years of Service
User Offline
Joined: 19th Mar 2003
Location: United States
Posted: 29th Sep 2009 13:26
8x8 204fps
20x20 159
30x30 79
40x40 48
50x50 32fps

old slower system
AMD 1800+ cpu
fearred
15
Years of Service
User Offline
Joined: 18th Sep 2009
Location:
Posted: 29th Sep 2009 13:47
My system is kinda high end:
I think I've got a quad core 2.4ghz with 4gb ram. Here are my results:
30x30 157 fps
50x50 61 fps
70x70 32 fps

Hope this helps!!!!!

Login to post a reply

Server time is: 2024-11-24 08:52:01
Your offset time is: 2024-11-24 08:52:01