JavaScript Card Game: The Great Dalmuti (or look Ma, I used JavaScript to make a card game my friends won’t play with me!)

Hi, my name is Stephanie, and I’m a recovering board and card game addict.  My addiction has manifested itself in some very concerning ways over the years including a stint of playing DnD with nerds online over IRC chat in college, but the most recent iteration is by writing myself a small JavaScript app version of The Great Dalmuti/Daihinmin/President.

When I am able to coerce my friends to play this game, we all wear different hats to indicate our position in society, because unlike public schools you are allowed to wear hats in my home, and at times it is required like a construction site.  Only, instead of building apartment complexes, we’re building camaraderie?  Clearly, my preference is to give the dudes in our group the pinkest, prettiest hats I can knowing that society typically doesn’t approve of them embracing their love of lightish red and wanting to give them an opportunity where they can excuse their pink-embrace as the whims of a game addict while their hearts palpitate in an elation they had never previously knew possible from headwear.

Consequently, when I threw together cards based on a stick person I was able to create using arial font, they all had different hats to help simulate this very important part of the Dalmuti experience.  My only regret is that the 12 and 11 needed far more different hats than I provided due to a lack of inspiration in the last 5 minutes of my 30 minute hat making adventure.  Which is why those will not be cards I show you intentionally.  Instead, have an apple merchant:

Or, you know, a red blob saleswoman.
Here we have an apple merchant. 

She has large feathers in her luxurious purple cap and has done well in an apple-deprived market. Apple pies, apple crisps, and apple cider are the mainstays in the realm, and she is rolling in apple dough so much her feathers are bigger than her arms. Life is good for the apple merchant.

Totally did not make her an apple merchant because apples are easily distinguishable at small sizes.  It was definitely a lore thing.  Definitely.  Same with this carrot guy.  Lore.

Or, the amazing orange stick salesman.
The carrot merchant. 

A man with small feathers to signify his small wealth in comparison to the other merchants, especially that darn apple merchant. There was a time in his life where he spent day in and day out trying to convince the members of the realm that orange is the new red, but after being threatened with incarceration by the Great Dalmuti himself, he resigned to his fewer boxes of unwanted carrots and accepted his lot in life. After all, he could be a peon.

Look at that well-developed story line.  It makes you want to play a card game with robots because your friends won’t play with you, doesn’t it?

On a more technical note, this was fun to practice for some of the different things I’ve learned and a nice break from my behavior tracker app I’m working on.  I added some changes from my original based on suggestions from friends and spouse (ex. delayed listing of what the script in the browser has played rather than it showing as it loads which is instantaneously from a person’s perspective).  There are still some aspects of the game I need to implement (wild cards, revolution, greater revolution, taxes after the 1st play through), I want to make a much better UI, and I need to refractor my code a bit more since in some places I’m pretty sure it’s a bit awkwardly put together.  I’m also likely going to put together a multiplayer version using me some node and socketIO, but that’s for later because if I could get friends to play with me in the first place I wouldn’t have needed to make a computer version.

In the mean time – hats.  Hats are the answer.

Advertisements
JavaScript Card Game: The Great Dalmuti (or look Ma, I used JavaScript to make a card game my friends won’t play with me!)

The Influence of the Super Mario Brothers

I remember waking up when I was 3 in the middle of the night to see, much to my sleepy surprise, my then 27-year-old mother and 25-year-old father laughing manically while they played Super Mario Brothers 3.  Why were they laughing?  Turns out my mom enjoyed messing with my dad by jumping on a green shell and “accidentally” flinging it in his direction.  My mom may be a troll.

This, and being absolutely certain that a tiger entered my room in the middle of the night when I woke up and then went into my parents’ room where I was equally certain it was out for my dad’s blood are my only memories from that year of my life.  Both memories had quite an impact.  Given the nature of this blog, I’ll try to limit my details as far as the impact of the tiger incident, but suffice it to say my sister likes to occasionally joke that I married my very handsome Chinese American husband because he is a tiger.  Rawr.

3-year-old me was convinced, and so it must have been true.
My mother, as I’m sure you can sympathize, was not convinced.

Right, Super Mario Brothers 3, laughter, parents.  You’re probably curious why this had such an impact in my development, and honestly, even if you don’t care, I’m going to tell you anyway.  My mom was always very nurturing and loving growing up, but she wasn’t really one to cut loose.  So crazy laughter with a device I had thought was purchased to keep my older sisters and I out of their hair for an hour each day?  Mind blown.

Needless to say, I was hooked.  Even more hooked than the first time my dad gave me coffee, but that’s another story.

The next day, I spent hours playing with my middle sister trying to convince her that even my uncoordinated adorable self was a very good player 2, even if I unintentionally kept flinging green shells at her.  Thank goodness for marriage in adulthood, because convincing people I was adorable enough to be a very good player 2 was significantly more challenging the older I got and the fact I’m an uncoordinated mess became far more pronounced.

Video games is only a particularly important topic to me today because after I attempted to play more than 15 minutes (why that is a bad idea currently), I’m currently paying the consequences.  My present consequences?  Physical pain.  The second worst kind of pain, second only to emotional pain inflicted by a loved one.  Thank goodness my loved ones aren’t jerks.

So!  Back to coding with me.  I’ll be starting on functions shortly, which should be fun.  I think the largest struggle I’ve experienced with self-taught programming so far is that I feel like I want to learn everything all at once like some sort of mad sponge that absorbs information but very unlike actual sponges doesn’t release the excess liquid when I’ve been overzealous in my sponging.  Much like an actual sponge, however, the result tends to be I leak information all over the counter and need to be left out to dry up overnight.

Upon reflection, I’ve realized the title of my previous entry was severely misleading.  I’ve been a technophile since the age of 3, and I doubt anything will ever change that.  Except maybe constant EMP bursts across the world inhibiting technology from functioning sort of like how the elf-like race from Pandora’s Star blocked out technology on their planets.  That’d be awful.

With that awkward, foreboding ending, I bid you all a good night!

The Influence of the Super Mario Brothers