RSS

Beware the ides of August

0 Comments | This entry was posted on Jul 12 2012

So as some of you may know I’ve been working on the tarot card-game fortunes. It’s been great fun and I’m pretty happy about how it looks now except for the need to replace our stock art with the art our artist comes with. It is getting very near the phase of opening it up and letting you loyal readers hammer away at a web version of it, get any kinks we missed polished up and getting it worked out for iOS and Android.

Since the fluid design is pretty settled at this point I’m going back and doing something I probably should have done in the beginning; unit tests. Honestly I didn’t because I didn’t know much about unit testing for C#/unity as most of my unit test experience is with java/JUnit. I found the documentation of NUnit very useful and the realization that monodevelop had support for NUnit if i just downloaded it to begin with to be promising.

So looking forward to letting you all play fortunes in the next few months!

Fortunes Update — Taking charge of destiny and file systems

0 Comments | This entry was posted on Jun 16 2012

A big challenge I’ve faced recently has to do with data.

“All i see is blonde, brunette, redhead…”

Getting data from non-technical people.

James created this fancy spreadsheet for Barbara to fill out for the divination part of fortunes and only have to deal with one card at a time. After handing me this huge spreadsheet I had to figure out how to get the game to use this data.

Proprietary data formats and multiple build targets

After a little bit of google research I got Unity3d and excel to play nicely and had a pseudo-database set up running pulling in data from multiple sheets in the excel file for various parts of the game. Now if any of the card values needed to change, not just the divinations but card names we could modify the spreadsheet and not worry about changing any of the code. Sounded brilliant but it only worked on a standalone windows player. A web player or android build got stuck repeatedly trying to pull in the data from a class it couldn’t properly access.

You must take your eyes away from the tree before you can see the forest

This image may or may not be a non-sequiter

I spent awhile butting my head over many days trying to get this excel file reading to work on various formats. I was almost ready to set up a PHP script on our site for the web player, but didn’t like having a separate solution for that and for android. Eventually looking at workflowy I realized i was trying to solve the wrong problem. I shouldn’t be trying to read the excel file on these separate platforms. I just need the relevant data from the excel file. Some poking from that angle revealed the Resources class in unity3d. Between a little bit of work condensing the data I need into one sheet, saving that off to a tab delimited text file, and writing some code to parse that file I’ve got the current version of fortunes working with the data on android, windows, and the web player. I don’t have a mac to test that but I’ll probably get my fiancée to test that sometime soon.

Outlook hazy, please try again.

0 Comments | This entry was posted on Jun 13 2012

I’ve been chugging along polishing fortunes. Had an interesting issue with text windows and scrolling because I somewhere down the line changed the input settings in Unity and got scrolling to go the entire text at once.

Once I’m in an OCD enough mood to get the new NGUI interface all aligned properly I’ll share some screenshots. In the mean time for the few of you who have expressed an intrest keeping up with the project: Fortunes

Thanks Sophie Houlden for informing me about workflowy!

Avatar Strength, Luck, and Player Strength

0 Comments | This entry was posted on May 31 2012

I came across an interesting post about different factors of success on reddit today which was pretty thought provoking. Avatar Strength doesn’t have much to do with any games we’ve made as of yet but there is a balance of luck and player skill to fortunes.

 

Earlier on in the project I was concerned about things potentially being too far on the luck side of things for fortunes but James reminded me that it makes sense thematically to be a bit more on the luck side of things for fortunes then I’d normally be comfortable with doing. So yes there is luck to fortunes, but that just makes your victory all the more exciting when you come from behind with poor luck to win anyway.

 

In other news I am almost done with the NGUI overhaul for fortunes, it is looking much better now and I’m getting excited about the progress. Would any of you readers be interested in trying it out before we release it into the wild for a public alpha?

#if Fortunes … #endif

0 Comments | This entry was posted on Apr 11 2012

No Just Deserts today, been trying to clean up Fortunes so our client can show off what we have so far at RavenCon and at her talk at the library of congress. She wrote up an impressive amount of copy in this ungodly dark magic excel spreadsheet James designed and I’ve had fun wrangling getting unity to read from that. Apparently even if you get it working in the editor that does not mean the excel file will be moved properly when you go to build so I have to copy it manually after building each time. Future task: automate that process.

I additionally have poked around in conditional compiling since our code for saving a divination doesn’t work in a web player which is something we want to be able to do. Just in case you’re trying to do the same thing this page http://unity3d.com/support/documentation/Manual/Platform%20Dependent%20Compilation.html is helpful but not the first thing to come up when I was searching myself.

Divination — Fortunes

0 Comments | This entry was posted on Mar 04 2012
Wheel of Fortune

What does the future hold?

There is a for fun Divination aspect to our game fortunes where at the end of the game you get a future generated by how the game went. Since the game play is mostly solid yesterday was working on making this a little bit more visual.

Visual Kei

No, not exactly what I meant...

A problem we ran into is the fact that the layouts are pretty large. We have to make the cards tiny to fit on screen or have you scroll forever. So what I’ve tentatively done is to just have a picture of the layout with boxes for the cards which you click to reveal the detail of the card for that position.

divination layout

This is a layout for a fortune...

clicking on one of the boxes gives you…

Close up

Ignore the silly text, its a place holder just like the art.

For reference the old, boring wall of text version looked like this:

good fortune

This is a good fortune we promise

So what do you all think? Is this change an improvement? I may add colors or something to distinguish the separate categories within the layout to make it pop a bit more but visual aspects are not my strongest point. As you can tell by looking at the website! Well if you read this far thanks for reading and please share your thoughts.

AI for fortunes

1 Comment | This entry was posted on Feb 11 2012
an exposed face robot

Let's open it up and do some tweaks.

Working out what to do for the AI has been a bit interesting. I’ve never done AI for a card game before. I was initially thinking of trying to do a min-max tree but quickly came to the decision that the branching factor and uncertainty would cause that method to be a bit unwieldy.

a robot in control

So After some rethinking and discussion with James we can upon our current idea. Basically we are going to have two weighted factors to decide which card to play. One being the likelihood of the card to win the current trick and the second the strength of the hand hand that was left afterwards.

building a hand

building a strong hand

These aren’t static weights, at least they won’t be once I’ve implemented them shifting over time. In the beginning the AI will favor building a stronger hand and near the end they will care more about winning the trick immediately. This two factor AI should deal with things like not wasting a strong card when a weaker one would just as easily win the trick.

Sometimes shortcuts can be found

Sometimes shortcuts can be found

Of course with the way the rules of fortunes work I couldn’t just use the rank of the cards for how valuable it was for a hand. Since tricks can be either High or Low we have to use the distance from the center instead.

foreach(Card c in newHand){
if(c.suit != Card.suits.stars){
if(c.rank > 7)
score += c.rank - 7;
else
score += Mathf.Abs(c.rank-8);
} else {
if(c.rank > 10)
score += c.rank - 10;
else
score += Mathf.Abs(c.rank-11);
}
}

Sorry wordpress didn’t preserve my indentation. Anyway The Major Arcana are slightly more valuable since they can switch a hand from low to high or vice versa, but this is hopefully captured in the slightly higher range of values for Major Arcana from 0 to 10 instead of 0 to 7 like the minor Arcana.

Thanks for listening to me ramble about AI here. If you think I’m way off base and have a suggestion, or just have a question about what I’m doing, share in the comments below.

Fortunes Screenshot redux

0 Comments | This entry was posted on Feb 11 2012

Most of the updates have been to AI for fortunes but there are some visible updates.

Fortunes gameplay

Stock art for now until our artist is done

So here we have a bit of how it will look like with card art, although this isn’t the art we will use in the end. Also there are toggles in the upper corner for toggling sound effects and music.

Fortunes Screenshots

0 Comments | This entry was posted on Jan 21 2012
Title menu

The title menu

Last weekend I holed myself away at James‘ place and spent the entire weekend working on the Fortunes prototype. Its gotten a little bit more work since then and this is what it looks like currently.

opening screen

Sadly I couldn’t get my video capture working and the stills don’t show off terribly much yet, as there is no art done yet. But the basic structure of the game is still there. We start the game, and east player lays down a card…

which card will I choose?

and our valid plays become un-dimmed and we choose a play. I’ve found a variety of free sound effects and from the unity asset store got a fantastic song called “Build me a future” by ADHMusic. Really appropriate I thought. It may get replaced later but it sets a good tone for what we currently have.

Yet Another decision

So if any of you know of good, free software for video capture, please let me know in the comments.

This window of filler text apparently drops the frame rate to 10! That'll need some fixing

Development #5 — Prototype!

0 Comments | This entry was posted on Jan 12 2012

This morning I got the fortunes prototype to a playable state and immediately began learning from it. Its an exciting time to go from looking at the flow of how code should theoretically interact and seeing it actually play out. It also reinforced my main lesson from work on Marco Polo. Mainly not to get bogged down in making something perfect, and get something testable done. 80% of the crippling problems with Marco Polo were ones I had no idea would be problems despite spending tons of time trying to make sure things were immaculate. Live and learn I guess.

Have any of you readers played the card game we designed that this project is based on? If you did leave us feedback in the comments or at lathomas@clichegames.com