Dev-Spot Developer Forums
September 05, 2010, 01:29:24 PM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Welcome to the LearnCpp.com forums!  Enjoy your stay.
 
   Home   Help Search Login Register  
Pages: [1] 2
  Print  
Author Topic: Roguelike Dungeon Creation Contest! [Finished]  (Read 12917 times)
Alex
Site Administrator
Administrator
Full Member
*****
Posts: 200


View Profile WWW
« on: July 04, 2007, 04:41:45 PM »

Hello everyone!  To inaugurate the opening of these forums, I'm hosting a roguelike programming contest.  The objective of this contest is very simple: Write a roguelike random ASCII dungeon generator.  If you've never played a roguelike game (and hence have no idea what a roguelike dungeon is), check out one of the following games: Nethack, Crawl, or ADOM.

Here are the rules:
1) You may use any programming language you like.
2) Your dungeon should be 80x48 in size.
3) Your dungeon should be randomly generated.
4) Your dungeon does not strictly have to be a dungeon -- you can do a town generator, city generator, countryside, or whatever you want to do.
5) Your dungeon should be output to an HTML file.  You can use the TT HTML element to do monospaced formatting.
6) You may create any style of dungeon you like.
7) Your source code should not use any 3rd party libraries (eg. Curses, SDL, etc...).  Since your output is an .HTML file, you shouldn't need them.
8) You may enter multiple submissions.
9) To submit a project, attach the following to a response to this post:
  • Up to three of your best dungeons as one attachment.
  • Your source code as another attachment (optional, but recommended).

Everyone who makes a submission will receive the custom forum title "Dungeoneer" and a .gif challenger trophy to post on their bios.  One winner will be chosen, and that person will receive a custom forum title of their choice.  Obviously, the stakes are not that high.

The primary point is to have fun with this, and see what kind of cool dungeons everyone can generate.  This is the perfect opportunity to stretch your brain, flex your programming skills, try out a new language you’ve always been wanting to learn, or try a new algorithm that’s been floating around in the back of your head.  Devise your own challenge: see if you can write your generator in under 100 lines of code, or in under 50. Or if you’re a new programmer, see if you can do it at all!

This contest ends: August 512th, 2007 at midnight.  I reserve the right to extend the contest for any reason.  (Note: The contest deadline has been extended from the 5th to the 12th).

Here is a sample Dungeon.html.

C++ coders, you can use the following DungeonGenerator framework to create your dungeons.  It includes projects for VC6, Visual Studio 2005 Express, and Code::Blocks for Windows and Linux.  All of the code you should need to modify is in BoardGenerator.cpp.  The spectacularly crappy "random ruins" dungeon generator is included as a sample.

Good luck to everyone.

List of participants:

konijn
Icey
sinoth
gerryq
microwerx
Seventh Holy Scripture (winner)

Final results here:
http://www.dev-spot.com/forums/index.php?topic=4.msg31#msg31
« Last Edit: September 14, 2007, 03:49:26 PM by Alex » Logged
Alex
Site Administrator
Administrator
Full Member
*****
Posts: 200


View Profile WWW
« Reply #1 on: July 06, 2007, 03:40:36 PM »

Here is a sample entry.  This one is called "Ruins of Life", because it uses an algorithm similar to Conway's Game of Life in order to generate the ruins.  Basically, it starts from the random ruins, then does a bunch of Game of Life passes to "clump" the ruins together.  Then it smooths it out a bit, and adds shrubs and grass.

Note: The rule that your generated Dungeon should be called "Dungeon.html" has been removed.  You can call it whatever you want, as long as it's HTML.
« Last Edit: July 06, 2007, 03:49:22 PM by Alex » Logged
konijn
Dungeoneer
Newbie
*****
Posts: 2


View Profile
« Reply #2 on: July 06, 2007, 05:16:25 PM »

Hi,

here goes the undead desert terrain generator.
One generated map :
http://www.demuyt.net/contest/prototype.html
Link to source is in the generated map.

Only works in Firefox and other advanced browsers because of
transparent images, sometimes you need to hit refresh even in silly
Firefox to remove some annoying little white lines.

Cheers,
T.
Logged
Icey
Dungeoneer
Newbie
*****
Posts: 1


View Profile
« Reply #3 on: July 09, 2007, 11:44:40 AM »

Here's my submission. It's a very simple town generator written in PHP.

http://iceyboard.no-ip.org/dg/

Each time the page is loaded the script generates a new town, so feel free to mash the refresh button like you're playing a whack-a-mole game.

Source:

http://iceyboard.no-ip.org/dg/?source=1

The generator makes random size towns, which goes against rule 2. So you can force it to make them 48x80, although it isn't designed for rectangular towns, so will look a bit weird.

http://iceyboard.no-ip.org/dg/?forcesize=1
Logged
worthstream
Adventurer
Newbie
*****
Posts: 1


View Profile
« Reply #4 on: July 20, 2007, 03:23:29 AM »

Great idea for a contest!

It's a shame that i'm just arrived in this forum, and i don't know if i'll make it in time to participate...

I'll take it as a speed programming challenge, and give it my best shot... while secretly hoping that the deadline gets extended Wink
Logged
Alex
Site Administrator
Administrator
Full Member
*****
Posts: 200


View Profile WWW
« Reply #5 on: July 23, 2007, 08:14:41 PM »

Hi Worthstream,

Even if you aren't able to make the deadline, I highly encourage you to submit a late entry!  It's always fun to see what people are able to come up with.
Logged
sinoth
Dungeoneer
Newbie
*****
Posts: 4



View Profile
« Reply #6 on: July 30, 2007, 02:32:05 PM »

Great contest idea Smiley  My entry is an island generator, written in Perl.  I imagine the island being used in a survival game where you are marooned there for whatever reason.
Script: http://sinoth.net/dun/dungeon.cgi
Source: http://sinoth.net/dun/dungeon.txt
Example: http://sinoth.net/dun/dungeon.html

Worthstream, crank something out!  You still have a few days Grin  I found using Perl as CGI was really easy and quick to throw together.  Here is an example of a basic generator if you want to play with it:
Script: http://sinoth.net/dun/testold.cgi
Source:http://sinoth.net/dun/testold.txt

edit: Added a pixel view of the map.
« Last Edit: July 30, 2007, 03:58:38 PM by sinoth » Logged

[i do not regret]
Alex
Site Administrator
Administrator
Full Member
*****
Posts: 200


View Profile WWW
« Reply #7 on: July 30, 2007, 03:58:26 PM »

Worthstream, it's your lucky day.  I'm extending the contest deadline by a week -- my work is sending me out of the state on a business trip for the rest of this week, and I simply won't have time to properly terminate the contest this weekend.  Consequently, I'm pushing the hard deadline back one week.  Of course, you are still welcome to submit entries after the deadline, just for the heck of it!

Thanks for the entry, Sinoth.  I like it!
« Last Edit: July 30, 2007, 04:00:12 PM by Alex » Logged
microwerx
Dungeoneer
Newbie
*****
Posts: 4


View Profile
« Reply #8 on: August 04, 2007, 12:49:02 PM »

How's it going?

I've been working on my own roguelike dungeon generator for the contest.  I hope to be posting it soon to the website.  I'm going to license it under the GPL so that it's free for everyone to use if they'd like.

So far, I've got random maps being generated and they're not too bad.  I took a different approach with mine as I was figuring out how to generate a dungeon that is completely enclosed with every spot accessible.  The technique that I used was to draw a random box within the space.  Next, I make another random box and connect it with an L-beam from the last box.  I continue adding new rooms until a certain  number of rooms (determined by the size of the map) has been created.

Now, to ensure that the new rooms and passages don't block areas already "carved" out, I check where I am drawing at to see if there was already an open space there.  If there was, I don't draw the wall in that particular spot.

Finally, I add a number of items.  I randomly add downstairs and upstairs, a number of doors to block areas, and some gold for the adventurer to find.

The language that I used to write this generator in is C++.  I added CSS style HTML in there.

In the future, I hope to add different shaped rooms and possibly the ability to navigate up/down the dungeon via HTML links.

Jonathan

Logged
gerryq
Dungeoneer
Newbie
*****
Posts: 3


View Profile
« Reply #9 on: August 05, 2007, 10:51:34 AM »

Hi Alex,

Okay, I started one, left it for a while, and finished it in a rush today.  It
generates dungeons of rooms and corridors a little bit like classic Rogue,
but in a probably somewhat unusual fashion.

I dont know about attachments on this site, but anyway...

Three random dungeons:
 http://indigo.ie/~gerryq/maze/Dungeon1.html
 http://indigo.ie/~gerryq/maze/Dungeon2.html
 http://indigo.ie/~gerryq/maze/Dungeon3.html

Windows executable will make endless versions of Dungeon.html:
 http://indigo.ie/~gerryq/maze/DungeonGenerator.exe

And the source code, written in MSVC6 but I think independent of
anything in it.  It comes with instructions for sticking it into Alex's
MSVC6 project, but it ought to work in any environment.  Feel free
to use it in your own roguelikes!

 http://indigo.ie/~gerryq/maze/Maze-source.zip

- Gerry Quinn

« Last Edit: August 05, 2007, 11:01:16 AM by gerryq » Logged
microwerx
Dungeoneer
Newbie
*****
Posts: 4


View Profile
« Reply #10 on: August 05, 2007, 08:36:35 PM »

All finished!  I did finish allowing the ability to navigate up and down the dungeon by using HTML links.  I posted a sample dungeon on my website.  The URL is http://www.mfactorgames.com/dungeon.

Here's some links to three of the best dungeons that were generated:


Here's a link to the source code/executable:
http://www.mfactorgames.com/dungeon/rdungeon.zip

It is release under the GPL, version 3.  It should be able to compile under windows/linux.  I used the MinGW to compile it, but it should work under Visual C++.  I use some of the Standard C++ template library and templates of my own so make sure that you your compiler supports templates and the standard C++ library.

For run instructions, please run the EXE file.  It has the command line options.

Enjoy!

Jonathan
Logged
Seventh Holy Scripture
Pythonista
Newbie
*****
Posts: 1


View Profile
« Reply #11 on: August 08, 2007, 09:13:07 AM »

I'm not entirely satisfied with this, but I'm replacing my computer and probably won't have any more time to work on it before the deadline. It's a forest on the south-southeastern slope of a mountain (wasn't able to correct that persistent left bias!) Mainly interesting because it's generated using one-dimensional cellular automata, instead of the more common two-dimensional ones.

CGI: http://bad-end.org/stuff/forest.py
Source: http://bad-end.org/stuff/forest.txt
Logged
sinoth
Dungeoneer
Newbie
*****
Posts: 4



View Profile
« Reply #12 on: August 10, 2007, 01:53:17 PM »

That forest gen is hot Cheesy
I think I have a fetish for any sort of terrain generation.  Stuff like this makes me weep with joy.
Logged

[i do not regret]
microwerx
Dungeoneer
Newbie
*****
Posts: 4


View Profile
« Reply #13 on: August 11, 2007, 08:10:32 AM »

I totally agree... The forest looks pretty good.  I think it beats the way that Dwarf Fortress forest looks at times.  I like the colors that you picked...it's very lush.

So where'd you learn about that particular cellular automata?
Logged
gerryq
Dungeoneer
Newbie
*****
Posts: 3


View Profile
« Reply #14 on: August 11, 2007, 11:12:01 AM »

I made an improved version of my dungeon generator - it now has a bunch
of parameters you can set.
 
Three random dungeons from original version (same as current version with default parameters):
 <http://indigo.ie/~gerryq/maze/Dungeon1.html>
 <http://indigo.ie/~gerryq/maze/Dungeon2.html>
 <http://indigo.ie/~gerryq/maze/Dungeon3.html>
 
Windows executable will make endless default versions of Dungeon.html:
 <http://indigo.ie/~gerryq/maze/DungeonGenerator.exe>

Windows executable allows you to set parameters, generated dungeons are displayed in a window.
 <http://indigo.ie/~gerryq/maze/MazeGen.exe>

And the source code for the new version, written in MSVC6 but I think independent of anything in it.  It comes with instructions for sticking it into Alex's MSVC6 project, but it ought to work in any environment.  Feel free to use it in your own roguelikes!
 
 <http://indigo.ie/~gerryq/maze/Maze-source.zip>
 
- Gerry Quinn
Logged
Pages: [1] 2
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!