/-/S'pht-Translator-Active/-/ |
Re: PID for OS X | ||
Posted By: Ron Hunsinger | Date: 4/19/13 7:33 p.m. | |
In Response To: Re: PID for OS X (Mark Levin) : Thanks to both of you for all this information. I'll try to put in a more
If you do, I hope you'll fix the bug that makes the program ignore all but the last word of what you type. I know you want to maintain bug-for-bug compatibility, but when we know what they intended, and it's not doing that but only because of a silly programming mistake, I think their intention should prevail over what last shipped. (I'm still hoping you'll relent and scatter the spheres around Labyrinth better. That's what the code they wrote tried to do, and it's only failing because of a non-obvious interaction between their RNG and the way they're using it. I also worry that the program may even go into an infinite loop trying to populate Labyrinth. Not counting the edges, a level has 900 cells, about half of which are rock walls in Labyrinth. They tried to scatter across all 900 of those cells, but only actually consider 58 of them. If more than 38 of those 58 are unavailable, they'll loop forever trying to find places for 20 spheres.) The fix I'm hoping for is a small one. The existing code looks like (using my own names because I don't know the real ones: void PopulateLabyrinth() {
Just change the lines calling Random() to: t = Random() % 900;
The immediate effect is that x and y will never be set to 0 or 31, but such cells contain rock and would be rejected anyway. The important effect is that with the RNG they're using, the values returned by successive calls are strongly correlated. Getting x and y from different parts of a single random number decouples them from that correlation. I've run simulations using this code, and the results are quite good. (Don't worry. Because of the vagaries of randomness, you still get, shall I say interesting(?), clusters of spheres. It will still sometimes be exciting.) Their original code only looks at cells where y==x/2 or y==x/2+16. I once suggested generating each of x and y as Random() % 30 + 1, which turns out to be some better but not by much. (It considers only 270 cells out of 900 instead of 58 out of 900.) Simulations show it's actually pretty bad. I no longer recommend it. The important point is that the code they wrote shows clearly that they intended the spheres to scattered. Their intent should (IMHO) prevail over what they happened to ship last.
|
|
Replies: |
PID for OS X | Godot | 4/9/13 7:02 a.m. | |
Re: PID for OS X | treellama | 4/9/13 7:39 a.m. | |
Re: PID for OS X | Mark Levin | 4/9/13 8:28 a.m. | |
Re: PID for OS X | Destiny | 4/9/13 8:49 a.m. | |
Re: PID for OS X | Hopper | 4/9/13 10:03 a.m. | |
Re: PID for OS X | Mark Levin | 4/9/13 10:28 a.m. | |
Re: PID for OS X | lucas93 | 4/9/13 3:08 p.m. | |
Re: PID for OS X | Yossarian | 4/9/13 3:59 p.m. | |
Re: PID for OS X | selbstmord | 4/11/13 7:40 a.m. | |
Re: PID for OS X | President People | 4/11/13 3:00 p.m. | |
Re: PID for OS X | ukimalefu | 4/11/13 11:38 p.m. | |
Re: PID for OS X | PerseusSpartacus | 4/12/13 12:04 a.m. | |
Re: PID for OS X | PerseusSpartacus | 4/9/13 8:25 p.m. | |
Re: PID for OS X | ukimalefu | 4/10/13 12:17 a.m. | |
Re: PID for OS X | Godot | 4/10/13 12:34 a.m. | |
Re: PID for OS X | ukimalefu | 4/10/13 12:36 a.m. | |
Re: PID for OS X | Mark Levin | 4/10/13 6:08 a.m. | |
Re: PID for OS X | Godot | 4/10/13 6:29 a.m. | |
Re: PID for OS X | Godot | 4/10/13 6:32 a.m. | |
Re: PID for OS X | Hopper | 4/10/13 7:31 a.m. | |
Re: PID for OS X | Mark Levin | 4/10/13 8:20 a.m. | |
Re: PID for OS X | PerseusSpartacus | 4/10/13 9:22 a.m. | |
Re: PID for OS X | Hopper | 4/10/13 11:07 a.m. | |
Re: PID for OS X | PerseusSpartacus | 4/10/13 11:21 a.m. | |
Re: PID for OS X | MrM12LRV | 4/10/13 2:29 p.m. | |
SPOILER ALERT! You need to find this | ukimalefu | 4/11/13 2:08 a.m. | |
Re: PID for OS X | Ron Hunsinger | 4/15/13 7:53 p.m. | |
Re: PID for OS X | Mark Levin | 4/16/13 6:54 a.m. | |
Re: PID for OS X | Ron Hunsinger | 4/16/13 5:21 p.m. | |
Re: PID for OS X | Mark Levin | 4/16/13 6:00 p.m. | |
Re: PID for OS X | Ron Hunsinger | 4/16/13 7:50 p.m. | |
Re: PID for OS X | Mark Levin | 4/16/13 8:46 p.m. | |
Re: PID for OS X | Hopper | 4/17/13 6:11 a.m. | |
Re: PID for OS X | Mark Levin | 4/17/13 7:16 a.m. | |
Re: PID for OS X | Hopper | 4/17/13 8:14 a.m. | |
Re: PID for OS X | Ron Hunsinger | 4/18/13 1:01 a.m. | |
Re: PID for OS X | Ron Hunsinger | 4/18/13 1:09 a.m. | |
Re: PID for OS X | Hopper | 4/19/13 7:32 a.m. | |
Re: PID for OS X | Mark Levin | 4/19/13 8:28 a.m. | |
Re: PID for OS X | Ron Hunsinger | 4/19/13 7:33 p.m. | |
Re: PID for OS X | Ron Hunsinger | 4/18/13 3:11 a.m. | |
Re: PID for OS X | Hopper | 4/17/13 7:01 a.m. | |
Re: PID for OS X | Mark Levin | 4/17/13 7:12 a.m. | |
Re: PID for OS X | Hopper | 4/17/13 7:50 a.m. | |
Re: PID for OS X | PerseusSpartacus | 4/18/13 8:14 p.m. | |
Re: PID for OS X | ukimalefu | 4/19/13 2:41 a.m. | |
Re: PID for OS X | Ron Hunsinger | 4/19/13 4:10 a.m. | |
Re: PID for OS X | PerseusSpartacus | 4/19/13 6:31 p.m. | |
Re: PID for OS X | Ron Hunsinger | 4/19/13 7:55 p.m. | |
Re: PID for OS X | treellama | 4/20/13 5:11 a.m. | |
Re: PID for OS X | PerseusSpartacus | 4/20/13 9:38 a.m. | |
Re: PID for OS X | bakudd | 4/22/13 6:39 a.m. | |
PID 1.2 released | Mark Levin | 5/6/13 8:49 p.m. | |
Re: PID 1.2 released | Godot | 5/6/13 10:47 p.m. | |
Re: PID 1.2 released | Hopper | 5/7/13 10:31 a.m. | |
Re: PID 1.2 released | ukimalefu | 5/7/13 1:45 a.m. |
|
Problems? Suggestions? Comments? Email maintainer@bungie.org Marathon's Story Forum is maintained with WebBBS 5.12. |