Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411507 Posts in 69374 Topics- by 58429 Members - Latest Member: Alternalo

April 26, 2024, 04:06:18 AM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)Procedurally Generated Content
Pages: 1 2 [3]
Print
Author Topic: Procedurally Generated Content  (Read 30770 times)
Sar
Level 3
***


Likes Violins


View Profile WWW
« Reply #40 on: May 11, 2008, 12:38:01 AM »

I'm not sure I completely understand procedurally generated content, what's the difference between that and randomly generated content?

Sometimes, nothing. A good deal of procedural content uses random determination.

The main difference is that when people say "random" in a game context, most people will think of random-positioning/timing/etc. of pre-existing assets, where when people say "procedural" in a game context, most people will think of asset-generation.

The other thing, I guess, is that a lot of people will equate 'procedural' with 'deterministic', so with an entirely random generation you'll get a different thing every time, but with a procedural approach you'll get the same thing every time.

(Of course, since a computer's random number generator is itself procedural, it's not an entirely clean distinction, and as you can see in the PCG competition threads popping up a lot of people are going for "random generation with arbitrary RNG seed", which will end up being deterministic.)





Good example of procedurally-generated content: fractals. The process for generating the Mandelbrot image, for example, is to represent a given pixel as a complex number, real in one axis and imaginary in another; to repeatedly square that value and add the original number; if it goes outside of a certain threshold (there are no members of the set further than 1 from the 0+0i value, IIRC) then discard it, otherwise it's in the set. Most fractal visualisations will colour the pixel based on how many iterations it takes to discard, and colour an 'inside' colour if that particular number doesn't go outside the threshold before a certain number of iterations (the higher the count, the more detail the edges of the set will have). So it takes a handful of lines of code to generate a Mandelbrot fractal image, but that image might occupy megabytes of memory once generated.)
« Last Edit: May 11, 2008, 12:47:52 AM by Sar » Logged

Currently working on: Chronicle of Mars
Previous Projects: [Käfer|Tristan and Iseult(TIGS)]
moi
Level 10
*****


DILF SANTA


View Profile WWW
« Reply #41 on: May 11, 2008, 01:23:50 AM »

When you think about it all games have som degree of PCG don't they? Wink
Logged

subsystems   subsystems   subsystems
Sar
Level 3
***


Likes Violins


View Profile WWW
« Reply #42 on: May 11, 2008, 01:40:08 AM »

When you think about it all games have som degree of PCG don't they? Wink

Unless you're talking about mipmaps or AI behaviour, I'm not sure I understand. ;-)
Logged

Currently working on: Chronicle of Mars
Previous Projects: [Käfer|Tristan and Iseult(TIGS)]
moi
Level 10
*****


DILF SANTA


View Profile WWW
« Reply #43 on: May 11, 2008, 09:48:41 AM »

well "procedurally generated" is a very broad term.
Logged

subsystems   subsystems   subsystems
Crackerblocks
Level 1
*



View Profile WWW
« Reply #44 on: May 11, 2008, 10:21:00 AM »

seems like a lot of the games in the competition are just randomizing something that isn't normally randomized and calling it PG.

it would be a fun challenge to make a PG game that never used random.
Logged
Sar
Level 3
***


Likes Violins


View Profile WWW
« Reply #45 on: May 11, 2008, 10:51:21 AM »

it would be a fun challenge to make a PG game that never used random.

Well, my plan for the competition essentially does this, although possibly not in the way you mean - I intend to base the game content on a text file, and simply read in bytes from the file to determine everything. But I've been waylaid (had a friend to stay for a week) and haven't started yet.

The downside to the "hash entire input and use as a seed" approach is that small changes to the input will often result in a radically different hash (which is often quite desirable) and certainly small differences in a random number seed should hopefully result in a radically different set of numbers, so you get a radically different game for "Hello" to "Hello.". Using the input to determine your content without using random numbers or hashing should hopefully mean that a minor change to the input only produces a minor difference in the way the game plays out.



Of course, the other end of the spectrum is a game which is the same each time you run it, just doesn't have [m]any asset fles, preferring instead to use procedures with pre-set parameters to generate everything each time it's run, a la that demo which was mentioned earlier.
Logged

Currently working on: Chronicle of Mars
Previous Projects: [Käfer|Tristan and Iseult(TIGS)]
shrimp
Level 5
*****


View Profile WWW
« Reply #46 on: May 16, 2008, 08:50:36 AM »

Someone mentioned Processing and PureData earlier - I was wondering if anyone knows of an audio library (ideally C#, but failing that, C/C++) that isn't purely sample based- i.e. more geared towards synthesizing.

My dream would be something that emulated an 8-bit era soundchip, with a modern API. There are lots of chiptune players around but no nice DLL/API things that I can find.

Second choice would be a SFXR (http://www.cyd.liu.se/~tompe573/hp/project_sfxr.html) API. I guess I could take the source and APIify it, since its free, but I don't think I'll have time for that this month....
Logged

Sar
Level 3
***


Likes Violins


View Profile WWW
« Reply #47 on: May 16, 2008, 09:31:05 AM »

Someone mentioned Processing and PureData earlier - I was wondering if anyone knows of an audio library (ideally C#, but failing that, C/C++) that isn't purely sample based- i.e. more geared towards synthesizing.

For that matter, does anyone know of one which is sample-based? I'd quite like a C# library for MOD-style song creation...
Logged

Currently working on: Chronicle of Mars
Previous Projects: [Käfer|Tristan and Iseult(TIGS)]
shrimp
Level 5
*****


View Profile WWW
« Reply #48 on: May 16, 2008, 10:20:35 AM »

Someone mentioned Processing and PureData earlier - I was wondering if anyone knows of an audio library (ideally C#, but failing that, C/C++) that isn't purely sample based- i.e. more geared towards synthesizing.

For that matter, does anyone know of one which is sample-based? I'd quite like a C# library for MOD-style song creation...

The Tao Framework (http://www.taoframework.com/) has a C# binding for OpenAL, which seems pretty reasonable, although I've not written anything using it yet. SDL has sound (and is usable in C# in the form of SdlDotNet). It seems quite limited though - I'm not sure you play sounds at different pitches, for example.
Logged

Sar
Level 3
***


Likes Violins


View Profile WWW
« Reply #49 on: May 16, 2008, 11:41:37 AM »

The Tao Framework (http://www.taoframework.com/) has a C# binding for OpenAL

I get the distinct impression that OpenAL is far more low-level than I'm really looking for, while SDL's sound stuff (which I'm using already for playing SFX) is too high-level, or at least two SFX-oriented. What I'm really looking for is something with which I can do something like this:

Code:

Music music = new Music();
music.Tempo = 80;
Sample sample = new Sample("piano.wav");

MusicTrack track = music.AddTrack(sample);
track.Add(4, Note.C, NoteType.Crotchet);
track.Add(4, Note.C, NoteType.Crotchet);
track.Add(4, Note.D, NoteType.Crotchet);
track.Add(4, Note.E, NoteType.Crotchet);
track.Add(4, Note.C, NoteType.Crotchet);
track.Add(4, Note.E, NoteType.Crotchet);
track.Add(4, Note.D, NoteType.Crotchet);
track.Add(4, Note.C, NoteType.Crotchet);

music.Play();


...I mean, probably not so verbose, I just put that stuff in to make it clear what I meant. But something along those lines. I mean - I know there are several libraries which will happily take an existing MOD or MIDI file (which is essentially this kind of data) and play them in a single command... I just don't know of any to construct the MOD-style data in the first place.

Logged

Currently working on: Chronicle of Mars
Previous Projects: [Käfer|Tristan and Iseult(TIGS)]
Hideous
That's cool.
Level 10
*****


3D models are the best


View Profile WWW
« Reply #50 on: May 16, 2008, 12:31:01 PM »

Trackers, my dear friend. Trackers.
Logged

Sar
Level 3
***


Likes Violins


View Profile WWW
« Reply #51 on: May 16, 2008, 12:41:59 PM »

Trackers, my dear friend. Trackers.

Yeah, sure. Except I want to do it in software, not by hand. You know, procedurally. ;-)
Logged

Currently working on: Chronicle of Mars
Previous Projects: [Käfer|Tristan and Iseult(TIGS)]
shrimp
Level 5
*****


View Profile WWW
« Reply #52 on: May 16, 2008, 01:14:06 PM »

Ex-hactly. Let me know if you find anything, and I'll do likewise Wink

I think it wouldn't be *too* hard to build something around OpenAL to support your example code, but whether it's possible before this particular deadline.... hmmm Smiley
Logged

Hideous
That's cool.
Level 10
*****


3D models are the best


View Profile WWW
« Reply #53 on: May 16, 2008, 01:42:31 PM »

You could probably do something like that by using trackers to make the notes, and make some relations etcetera. I dunno.
Logged

Sar
Level 3
***


Likes Violins


View Profile WWW
« Reply #54 on: May 16, 2008, 03:15:38 PM »

Mm, but that just sounds only a step away from rendering out a bunch of MP3s for different chunks of a song and playing them in a random order. :/
Logged

Currently working on: Chronicle of Mars
Previous Projects: [Käfer|Tristan and Iseult(TIGS)]
Alex May
...is probably drunk right now.
Level 10
*


hen hao wan


View Profile WWW
« Reply #55 on: May 16, 2008, 03:23:58 PM »

with the additional caveat that you have to have a library to play the tracker files.
Logged

Annabelle Kennedy
Awesomesauce
Level 8
*


♥Android Love♥


View Profile
« Reply #56 on: May 20, 2008, 06:42:57 PM »

wouldnt you need one to play MP3s also?

disclaimer: i might be wrong.
Logged
Alex May
...is probably drunk right now.
Level 10
*


hen hao wan


View Profile WWW
« Reply #57 on: May 20, 2008, 11:31:25 PM »

Good point, well made.
Logged

Klaim
Level 10
*****



View Profile WWW
« Reply #58 on: May 21, 2008, 02:04:44 AM »

I think i'll start procedurally generated content in my current game (not for competition because it will never get playable in time) but i'll start with little things.

I want to add a big octogonal button in my game that is nearly always available. Now, i want it to produce a sound when i click on it. What would be cool is if this sound was procedurally generated each time we click on the button. (i guess i would generete sounds before and simply play them on demand)
That's a simple start but i guess it's not simple to have something correct.
What i'd like would be a short synthetic sound that would look like some "conection" sound in the anime "Serial Experiment Lain" if you know it.

I'll put some example here when i'm back home and try to do it and maybe this experiment will be interesting to learn more about procedurally generated sound.
« Last Edit: May 21, 2008, 02:07:44 AM by Klaim » Logged

Klaim
Level 10
*****



View Profile WWW
« Reply #59 on: May 22, 2008, 01:33:11 AM »

Ok, so here you can hear the kind of sound i'll try to generate. It's really "synthetic" and i want random variants of something like that.

Now i'll search for high level libs about sound generation, if any exists. If i don't find something i think would suit my needs, i'll look what i can do with FMod and OpenAL. If i cannot do sound generation with that, i'll look for algorithms to generate it myself.
As my time of research is limited, helping suggestions are welcome Smiley
Logged

Pages: 1 2 [3]
Print
Jump to:  

Theme orange-lt created by panic