Patrick Meade
Patrick Meade
> I am, however, not sure how to properly implement the seeding with a string. The current RNG implementation (Alea) is based on the work at https://github.com/nquinlan/better-random-numbers-for-javascript-mirror. I'd put (pre-salt...
> > I'd put (pre-salt + the string + post-salt) through SHA-256 and then pull the least significant bytes to turn into a seed value. > > The RNG uses...
> > https://developer.mozilla.org/en-US/docs/Web/API/SubtleCrypto/digest > Also, I would prefer the seeding process to be synchronous :-) Hmmm, in Node.js I'd use: https://nodejs.org/api/crypto.html#crypto_crypto_createhash_algorithm_options And the browser I'd borrow Browserify's browser implementation of...
> Sounds a bit like an overkill to me. We just need a way to convert a string to three 64bit values, without any particular crypto/security properties... how about the...
>I haven't read over the tests extensively yet so I don't totally understand the overlap between the tests in `node/test/` and the tests in `test/`. Intuitively the former would check...
> I am almost done with the refactor. Some remarks before the work is completely finished: > > * there is no separate _node_ version of rot.js; the library simply...
I think you're looking for `ROT.Text.measure`: `measure: function(str, maxWidth)` This returns an object with fields `width` and `height`. ```Node > ROT.Text.measure("This is a very long and wrapped text.", 13) {...
`ROT.Map.Rogue` extends `ROT.Map` and not `ROT.Map.Dungeon`: ``` javascript ROT.Map.Rogue.extend(ROT.Map); ``` In a way, it makes sense. My first quick glance over the code, it doesn't seem to populate `this._rooms` or...
The Interactive Manual doesn't document the options for the `Rogue` generator.
I think there is a bug in the options processing in the `Rogue` constructor: ``` javascript if (!this._options.hasOwnProperty("roomWidth")) { this._options["roomWidth"] = this._calculateRoomSize(this._width, this._options["cellWidth"]); } if (!this._options.hasOwnProperty["roomHeight"]) { this._options["roomHeight"] = this._calculateRoomSize(this._height,...