3 ms·
The first program I wrote from front to back was a D&D character generator. But there was something I was taking away by substituting 3d6 with Random(). Somehow
by DanielBMarkham 18y ago
The first program I wrote from front to back was a D&D character generator. But there was something I was taking away by substituting 3d6 with Random(). Somehow computerizing it made part of the tactile experience go away.
There's nothing like announcing "Okay, we're going to enter the room" and then hearing those dice rattling around behind the DM screen. Everybody looks at each other in anticipation.
They said he taught courses on how to make games more playable. I imagine some of those lessons have direct uses in making web sites more "sticky" and programs more immersive.
He'll be missed.
- thomaspaine 18y agoWow, the first program I wrote was a D&D character generator too. My friend always has a giant excel spreadsheet open when he's DMing. The tactile response of the dice is fun, but calculating stuff like weight modifiers can be tedious. Btw, For the 3d6 problem, you could do: sum([random.randint(1,6) for i in xrange(3)]) That's the python version. I have no idea what I did when I first implemented this in C++ 10 years ago.
- DanielBMarkham 18y agoI believe I started on the program hanging out at Radio Shack in the evenings programming the display TRS-80 (There were no other computers around). I continued it on the school's Commodore Pet a year later. It went through several revisions. It got so I could write the first few hundred lines in BASIC just from memory! C++ would be an awesome language for a generator. Sounds like you came along about 10 or 15 years after me. I wonder how many times this same problem has been solved by new programmers eager to "do something"? Yep dice are fun. Looking up everything in one of those tables is not.
- lacker 18y agoJust FYI, you can clean this up a teeny bit by removing the square brackets to make it a generator expression. Not a big deal but someone might be enlightened. sum(random.randint(1, 6) for _ in range(3))
- thomaspaine 18y agoDoh! You're right. And I just read an article yesterday comparing the speed of generators with list comprehensions http://ikanobori.jp/weblog/2009/04/08/python-sum-of-file-generators-vs-list-comprehensions/ http://ikanobori.jp/weblog/2009/04/08/python-sum-of-file-gen...