Re: Getting a seeded value from a list

2012-11-26 Thread Hans Mulder
On 26/11/12 21:17:40, Prasad, Ramit wrote: > Chris Angelico wrote: >> >> On Sat, Nov 24, 2012 at 3:27 AM, Prasad, Ramit >> wrote: >>> Steven D'Aprano wrote: On Wed, 21 Nov 2012 14:41:24 +1100, Chris Angelico wrote: > However, this still means that the player will see the exact s

Re: Getting a seeded value from a list

2012-11-26 Thread Chris Angelico
On Tue, Nov 27, 2012 at 7:17 AM, Prasad, Ramit wrote: > Hmm. I guess most of the games where I remember "regenerating" > enemies are a bit older. Chrono Trigger had enemies that > would regenerate if you left a map screen and came back, but > then again it seems more likely that the enemies were h

RE: Getting a seeded value from a list

2012-11-26 Thread Prasad, Ramit
Chris Angelico wrote: > > On Sat, Nov 24, 2012 at 3:27 AM, Prasad, Ramit > wrote: > > Steven D'Aprano wrote: > >> > >> On Wed, 21 Nov 2012 14:41:24 +1100, Chris Angelico wrote: > >> > >> > However, this still means that the player will see the exact same level > >> > regenerated every time, absol

RE: Getting a seeded value from a list

2012-11-24 Thread Graham Fielding
Now, the major task is to reconfigure the distribution system to let items and monsters stay in place between levels. > Date: Sat, 24 Nov 2012 09:32:46 +1100 > Subject: Re: Getting a seeded value from a list > From: ros...@gmail.com > To: python-list@python.org > > On Sat,

Re: Getting a seeded value from a list

2012-11-23 Thread Chris Angelico
On Sat, Nov 24, 2012 at 3:27 AM, Prasad, Ramit wrote: > Steven D'Aprano wrote: >> >> On Wed, 21 Nov 2012 14:41:24 +1100, Chris Angelico wrote: >> >> > However, this still means that the player will see the exact same level >> > regenerated every time, absolutely fresh. As previously stated in this

RE: Getting a seeded value from a list

2012-11-23 Thread Prasad, Ramit
Steven D'Aprano wrote: > > On Wed, 21 Nov 2012 14:41:24 +1100, Chris Angelico wrote: > > > However, this still means that the player will see the exact same level > > regenerated every time, absolutely fresh. As previously stated in this > > thread, that's not usually a good thing for encounters,

Re: Getting a seeded value from a list

2012-11-20 Thread Chris Angelico
On Wed, Nov 21, 2012 at 2:47 PM, Steven D'Aprano wrote: > On Wed, 21 Nov 2012 14:41:24 +1100, Chris Angelico wrote: > >> However, this still means that the player will see the exact same level >> regenerated every time, absolutely fresh. As previously stated in this >> thread, that's not usually a

Re: Getting a seeded value from a list

2012-11-20 Thread Chris Angelico
On Wed, Nov 21, 2012 at 1:18 PM, wrote: > Each time the player goes from 'Foo' to 'Bar' (or vice versa), make_map > randomly generates a new layout for either level. > > What I'd like to do is select values from 'levelSeed' and assign them to the > levels that make_map generates so that the pla

Re: Getting a seeded value from a list

2012-11-20 Thread Steven D'Aprano
On Tue, 20 Nov 2012 18:18:17 -0800, frednotbob wrote: > The problem, in a nutshell, is this: > > When the player starts a new game, make_map() randomly generates level > 'Foo' as the player's starting floor. Floor 'Bar' is similarly > generated as the player descends from 'Foo' to 'Bar. > > Ea

Re: Getting a seeded value from a list

2012-11-20 Thread frednotbob
> >The former can be generated from the seed each >time you enter the level; the latter must be generated the first time then >stored. > Random.random() is already populating the levelSeed list; I've set it as part of new_game() so that any time the player begins a new game, the levelSeed list

Re: Getting a seeded value from a list

2012-11-20 Thread Nobody
On Mon, 19 Nov 2012 21:45:55 -0800, frednotbob wrote: > What I'm trying to do is set a persistent state for the levels generated > by make_map(), so the player can move between floors without generating a > totally new randomized floor each time. You need to distinguish between immutable data (e.

Re: Getting a seeded value from a list

2012-11-19 Thread frednotbob
> > Are you generating the entire level on entry, or as each room is > > "opened" (if, "as opened", you have the complication that going down a > > level and back up will result in different random numbers vs going > > straight to the room). > > > > Generating on entry only needs