Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length

 
Advanced search

1370253 Posts in 64449 Topics- by 56501 Members - Latest Member: liquidpigstudios

December 09, 2019, 03:35:51 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsCommunityTownhallForum IssuesArchived subforums (read only)TutorialsBraving Procedural Generation
Pages: 1 2 3 [4] 5 6 ... 23
Print
Author Topic: Braving Procedural Generation  (Read 193720 times)
William Laub
Level 10
*****


Gold Cray


View Profile WWW
« Reply #60 on: June 29, 2009, 05:39:59 AM »

Divide it at some point other than .5 in the first phase. That should bias it toward land or water and tend to generate larger clumps. You can also just enlarge what you have and continue adding detail if you want an even mix of land and water.
Logged
hagel
Level 0
**



View Profile
« Reply #61 on: June 29, 2009, 10:21:05 AM »

Worked some on my platformer dungeon generator. It's looking pretty good now with slopes and all that.
Here's two pictures, one with just 45 degree slopes and one with 45 and 23 degree slopes.
Note that the color blue does not represent water.


Logged
george
Level 7
**



View Profile
« Reply #62 on: June 29, 2009, 10:53:42 AM »

looks excellent hagel!
Logged
Ina Vegt
Level 1
*


Girl Game Developer


View Profile
« Reply #63 on: July 01, 2009, 03:49:32 AM »

I've been working on a little maze generator:

http://www.swampwitchgames.com/shocking/
Logged
Eclipse
Level 10
*****


0xDEADC0DE


View Profile WWW
« Reply #64 on: July 01, 2009, 03:33:21 PM »

I've been working on a little maze generator:

http://www.swampwitchgames.com/shocking/

omg it mess up all my monitor, it starts to flicker in a very weird manner o.o maybe it's Opera because even the browser windows flickers
Logged

<Powergloved_Andy> I once fapped to Dora the Explorer
Ina Vegt
Level 1
*


Girl Game Developer


View Profile
« Reply #65 on: July 01, 2009, 06:03:01 PM »

I've been working on a little maze generator:

http://www.swampwitchgames.com/shocking/

omg it mess up all my monitor, it starts to flicker in a very weird manner o.o maybe it's Opera because even the browser windows flickers

Opera and LWJGL don't mix very well, I'm afraid, it's, IIRC, due to Opera bugs.
Logged
pgil
Guest
« Reply #66 on: July 09, 2009, 03:58:32 PM »



Tried Chevy's dungeon algorithm in Game Maker. It was pretty fast until I added tiles, so I think I'll have to find another way of doing that.

Also, there are no collisions yet. I need to figure out how to create wall objects just on the perimiter of where the player can walk, but I'm not sure the best way to do that.

I've included the source, so if anyone thinks they can improve it, let me know. I'm not that great at coding, so I hope to learn a lot from this.

EXE
GMK

Ina Vegt: Your maze generator works for me, except the player character always starts outsize the maze, with no way to get in.
« Last Edit: July 09, 2009, 04:08:40 PM by pgil » Logged
roboprez
Level 1
*


Got to love them pixels


View Profile WWW
« Reply #67 on: July 14, 2009, 10:45:12 PM »

So I did the first example in flash (referenced from Kneecaps' version) where you click to go through the stages. http://spamtheweb.com/ul/upload/150709/57993_rand_land_chevy.php Click to go to next step, Space bar to go back to 8x8.
It's fairly slow because it's written in AS2 rather than AS3 which I should probably switch to. Oh yes at some point it will get so slow flash will come up with a message asking if you want to abort the script but it hasn't crashed. If you click yes you be able to still see what you've already done.
Logged

Hayden Scott-Baron
Level 10
*****


also known as 'Dock'


View Profile WWW
« Reply #68 on: July 18, 2009, 04:13:24 PM »









I've been taking a stab at procedurally generating some maps. I'm still new to this, but I am excited about the potential of the techniques Smiley
Logged

roboprez
Level 1
*


Got to love them pixels


View Profile WWW
« Reply #69 on: July 18, 2009, 04:53:16 PM »

I've been taking a stab at procedurally generating some maps. I'm still new to this, but I am excited about the potential of the techniques Smiley

What are you making this with? It's pretty cool how you've put in in pixel border
Logged

Hayden Scott-Baron
Level 10
*****


also known as 'Dock'


View Profile WWW
« Reply #70 on: July 18, 2009, 04:57:19 PM »

What are you making this with? It's pretty cool how you've put in in pixel border
I'm using Unity for these, but I'm sure it doesn't really make much difference Smiley Cheers.

[edit]
I would like to take a peek at Chevy's source code for cave generation, but I don't think Game Maker files are plain-text readable. Has anyone ported it into a language I can read?  I initially started with the method in the tutorial but drifted off when I ran into some difficulties.
« Last Edit: July 18, 2009, 05:06:26 PM by Hayden Scott-Baron » Logged

ChevyRay
Guest
« Reply #71 on: July 19, 2009, 02:31:21 AM »

I can write an Actionscript version for you, if you like. It shouldn't take me too long to re-write the code for you.

I love your maps so far though, dock! Yeah, I'm just off to bed now, but tomorrow or something I can whip you up what you need.
Logged
ChevyRay
Guest
« Reply #72 on: July 19, 2009, 02:47:13 AM »

God I love a good procedurally generated map Addicted

Also, slightly off topic but check this shiz out: Google "procedural generation" (5th item down). Wizard [/lameboast]
Logged
Hayden Scott-Baron
Level 10
*****


also known as 'Dock'


View Profile WWW
« Reply #73 on: July 19, 2009, 04:16:18 AM »

I can write an Actionscript version for you, if you like. It shouldn't take me too long to re-write the code for you.

I love your maps so far though, dock! Yeah, I'm just off to bed now, but tomorrow or something I can whip you up what you need.

Great, thank-you! An action script version would be useful for a lot of people I'm sure, and I ought to be able to poke through the code to get a better understanding of what is going on.

I might rewrite my code for this so that it's easier for me to work with - it's rather a messy process at the moment, and not in a position where I can reliably use it for a game environment. Smiley
Logged

ChevyRay
Guest
« Reply #74 on: July 19, 2009, 07:28:49 PM »



Re-written in actionscript. Here's an example SWF (press ENTER to reset).

Cave Generator
« Last Edit: July 19, 2009, 07:40:02 PM by ChevyRay » Logged
ChevyRay
Guest
« Reply #75 on: July 19, 2009, 10:55:27 PM »

Alright, I've finished cleaning up and properly commenting the source files for the ActionScript version of my Cave Generator algorithm.

Here's another shot of a cave created with the same algorithm, just different settings:



And here's the source files!

http://properundead.com/flash/caveas3.zip

It has the SWF, and two actionscript files, Main.as and Map.as. These can be opened with notepad or Notepad++, or whatever you want if you don't have Flash, Flex or FlashDevelop. The algorithm and the rest of the cave-gen functions are in the Map class. I commented it pretty thorougly, but if you don't understand it, I might be able to answer some questions Smiley


EDIT:

I've also written a new article on the site.

Latest Procedural Generation Article

It sums up everything that's been shown off here so far Smiley.
« Last Edit: July 20, 2009, 12:28:00 AM by ChevyRay » Logged
Hideous
That's cool.
Level 10
*****


3D models are the best


View Profile WWW
« Reply #76 on: July 20, 2009, 01:09:50 AM »

I tried generating a maze this weekend - I messed it up, and in the end I just made really crappy caves.

Pseudocode!
Code:
maxlenght = 200

for i = 0 to maxlength:
  choose_random_direction();
  clear_tile();

It was simple, but it worked alright.
Logged

ChevyRay
Guest
« Reply #77 on: July 20, 2009, 08:06:36 AM »

I don't think Game Maker files are plain-text readable.

I just checked this out, actually. You can export your Game Maker scripts as .gml files, which are plain-text readable. You can even export them in bundles, and each new function just has # define function_name before it (in Game Maker, you don't create Class functions, just global functions).

So yeah... just clearing that up for now.
Logged
kavs
Level 2
**


Brad Kavanagh


View Profile WWW
« Reply #78 on: July 20, 2009, 06:44:23 PM »

I love this thread. <3

And to those who supplied their source code; thanks!  Beer!
Logged

Core Xii
Level 10
*****


the resident dissident


View Profile WWW
« Reply #79 on: July 25, 2009, 10:39:46 PM »

Hmm. Refresh to regenerate. (you can use ?seed=00000000 to regen a specific map)



I used the cellular automata method with 40% initial walls and the 4-5 rule (if 5 or more walls within a 3x3 block are walls, the center one is a wall) over 5 iterations. Also removed single-tile pillars and holes, and the other elements are generated entirely differently. The houses don't check connectivity so their doorways may point to a dead end Tongue
Logged
Pages: 1 2 3 [4] 5 6 ... 23
Print
Jump to:  

Theme orange-lt created by panic