Tuesday, July 31, 2018

Gaming and Coding

We're playing Paizo's Kingmaker, and while the GM is MIA (taking a three week summer vacation), the rest of us will be focusing on kingdom building.  Some in person on the regular game night, but since kingdom building is mostly bookkeeping, also over email.

We can discuss our options and make choices over email, but eventually, we need dice rolls. 

We could just roll physical dice and email the results, but that lacks a certain elegance.  And since we're playing using technology, a technological solution should be used.

In the past, for similar circumstances, we've used the site http://dice.evildm.net/ where one could request certain dice rolls, and they would be emailed to the specified address(es) (i.e. the GM) along with an encoded signature that could be used to authenticate the roll(s).  Pretty nice.

But that was years ago, and that site has disappeared.  There is at least one other operational, which we used, but it led to thinking...

Professionally, I am a software developer.  So I can put together a site to do the same thing.  And I can do it right.  Not just going to throw up some inelegant blob of code, but use current methodologies and architecture.

  • Micro-service architecture
  • RESTful APIs
  • Server-less cloud hosting
I am using Visual Studio 2017 Community Edition (i.e. free), and am developing using C# in dotnetcore.

So, I've gotten a solid start.  I have developed a RESTful API for DiceRolls.  Using the API, one can request any of a variety of types of rolls, using a special syntax, which I use Regex to parse.  The results of the randomly generated dice rolls are returned in JSON format.  And I am hosting it on my free Azure account as an App Service (no need to emulate a server, runs as needed and can scale up and down based on demand.)

It can be found at https://dicerollerapi.azurewebsites.net/dicerolls/  (This is a temporary URL for development and is free.  Once it has been fully developed, it will be moved to a proper URL.)

If you add the right code to the end of that URL, you can generate dice rolls.  some examples:

/d20   roll a d20
/10Xd20  roll 10 d20's
/5d6  roll 5d6 (fireball or lightning bolt)
/3Xd4p1  roll d4+1 3 times, magic missile)
/6X3d6  roll 3d6 6 times, character generating old school
/6X4d6DL1   roll 4d6 drop the lowest die, 6 times, character generating, not so old school

As I said, the results are in JSON, so not really meant for humans, but one can probably figure it out. But this is just the first component.  I will be writing several more: a notification service to send the result (or multiple sets of results) to specified email addresses; a Website for human to interact with the services to request dice rolls and supply email addresses; and aorchestrator service (the Website will talk to this service to convey the user's request, and it will handle making multiple calls to the Dice Roll API and then to the notification service.)  Using an orchestrator, I could also allow other front-ends, such as other websites or phone apps to use the same services.

Also, instead of using the built-in pseudo-random number generator, I am considering using https://www.random.org/ to get true random values.

If you have any questions or comments, let me know.  If you want to participate, let me know!  (I'm currently keeping the code in a private Bitbucket repository, but can easily move it to a public GitHub repository.)

Saturday, May 21, 2016

Harry's Hots

look what I found...


My Dad grew up in Rochester and used to go there regularly.  Been there once myself, back in the '80s, when we were in town for a cousin's wedding.

My Dad used to make the hot sauce all the time.  Someone posted the recipe for the hot sauce in the post, so I'll have to make some and see if it's what I remember.

Saturday, June 6, 2015

Nobilis and Disney

Inspired by the Gameable Disney Podcast ( http://gameabledisneypodcast.tumblr.com ), I have determined that the most appropriate gaming system for the Disney Princess universe is Nobilis: the Game of Sovereign Powers (http://en.wikipedia.org/wiki/Nobilis  and  http://www.drivethrurpg.com/product/141424/Nobilis-the-Game-of-Sovereign-Powers-2002-Edition and http://nobilis.wikia.com/wiki/Main_Page )

So here are the Nobilis characters of Elsa from Frozen and Rapunzel from Tangled, along with explanations of why I assigned the attributes, etc. as I did.


Aspect                  0
Domain                5              Cold
Realm                  1              “The hidden tower”
Spirit                    1              2 Anchors

Anchors:              Anna, Hans

During the movie, we do not see Elsa performing physical feats beyond that of a normal human, except possibly getting to the top of the North Mountain in only a few hours, but we can presume she spent a few miracle points to do this.

Elsa’s Estate is clearly Cold (a.k.a. ice and snow.)  Throughout the movie, she is seen creating modest amounts of ice or snow easily (if not intentionally) and frequently, therefore I think the highest score of 5, giving her the title of Regal (but then she’s already the Snow Queen.)

For Realm (control over the chancel), which I have identified as “The hidden tower”, which in Frozen appears as her ice palace, she has some low level of control.  The creation was a greater creation miracle, which used her Domain.  Once created, however, she is able to manipulate it a bit.  The ice to trap and push the Wesselton goons is a lesser creation, and could be attributed to Domain use, but we also see the palace’s ice walls changing color according to her mood, which shows some connection to the chancel, but not a great one.

Spirit determines her skills with magic and other mystical aspects of Nobilis.  There is little evidence of this in the movie, so we’ll just assign a token 1 point.

Anchors are mortals who serve the Nobilis and must be either loved or hated.  Princess Anna is loved, Prince Hans hated.

Gifts: (specialized and specific uses of power)

Build a Snowman:
                Lesser Creation                             4
                Ease of Use, Simple Miracle        -1
                Range, one local “person”            -2
                Flexibility, one trick                     -3
                Total                                             -2, but minimum cost is 1

Attributes = 21 pts, Gifts = 1 pt
With 3 left over, we will increase Elsa’s starting Domain Miracle points from the default 5 to 8.


Aspect                  3
Domain                1              Life
Realm                   3              “The hidden tower”
Spirit                    1              2 Anchors

Anchors:              Flynn/Eugene, Mother Gothel

During the movie Tangled, we see several things that would indicate a reasonable high Aspect score.  First, her hair is always in perfect condition.  Second, she is seen performing ridiculously difficult acrobatics, usually associated with her hair, far beyond what a normal human could do.  And whacking people with a frying pan.

Rapunzel’s Estate is Life.  However, we see her use her Estate on a few times.  Early in the movie, she performs a Lesser Preservation of Life of Mother Gothel, and that’s it until the end, when she performs a either a Major Preservation or a Major Creation of Life, bringing Flynn/Eugene back to life (Hollyhock God’s judgement on that.)  Therefore, she does not need a high score in Domain.

For Realm (control over the chancel), “The hidden tower” in Tangled would be the actual hidden tower she has lived in for so many years.  With all the decorations and painting that Rapunzel has done, she appears to have great significant control over it.

Spirit determines her skills with magic and other mystical aspects of Nobilis.  Like in Frozen for Elsa, there is little evidence of this in the movie, so again we’ll just assign a token 1 point.

Anchors: Flynn/Eugene is loved, Mother Gothel is hated.

Attributes = 24 pts
With 1 left over, we will increase Rapunzel’s starting Aspect Miracle points from the default 5 to 6.

Saturday, December 20, 2014