I recently wanted to add a photo search capability to my Timeline program and discovered that you can open a windows explorer with a custom search. You can also type these searches directly into the address bar in a windows file explorer.
The key is the search-ms protocol. It allows programs (like windows explorer) to directly query the windows search index. The parameters to this command are somewhat obscure, but it is very flexible and it can be used to perform any search that you could perform with the graphical search function in the windows file explorer.
For my application, I wanted to search for all photos that were taken between two dates (the start and end date of an event on my timeline). The idea is to quickly find all the photos that I took on a trip or at an event.
The general syntax for the search-ms command is:
crumb=<location and display parameters>&
syntax=<NQS or AQS(default)>
The query string can be any valid SQL or AQS search. For my application I wanted to query on the date my photo was taken which windows stores as “datetaken” and I wanted to query over a range of dates. Dates have to be in the YYYY-MM-DD format, and a range is specified with “..”.
I used the crumb specifier to target a just the “My Pictures” special folder. To specify a location you put crumb=location:<URL encoded path>. For a special folder you do crumb=location:shell%3a<folder name>.
So my final query string is:
You can type or copy this into your search bar to see all the photos you took in 2015.
From C# you can start a process by giving the name of a file that has a default program association. So launching a file explorer with a custom search is as easy as:
Start().ToString("yyyy-MM-dd") + ".." + End().ToString("yyyy-MM-dd") +
I’ve completed a touch table conversion of the board game Terra Mystica. In this game, players lead a faction in a race to terraform and settle the map. Each faction is unique with different costs for building, abilities and desires for terrain type. These differences along with random bonus tiles makes every game different without any luck or hidden information.
Continue reading “Terra Mystica”
Late last year I finished a real-time game for the touch table that I called “Muck”. It is an economic game for two to six players that plays in a half hour. The game is modeled off the board game Brass. I’ve considered converting Brass directly, but it only plays four people, it has hidden information and we really aren’t playing it much anymore.
Continue reading “Muck”
I’ve been working on a new software project that I’m going to call “Timeline”. When I first learned C#, I wrote a simpler timeline program that I’ve used to keep track of “big” events like houses, vacations, jobs and projects. After getting the Jawbone fitness tracker, I wanted to add that data to my timeline program.
Instead of just adding that to my existing program, I decided to re-write the program to be more flexible. I wanted to be able to have events with child events and to “tag” people in events instead of having a copy of the event on each person.
The program is complete and I am currently submitting it to freeware sites. I didn’t release my first timeline program because it wasn’t able to handle incorrect inputs and it wasn’t very intuitive to use. I am going to release this version, so I’ve made the program more robust.
Continue reading “Timeline”
I’ve made a wrapper around the Windows-only Microsoft Speech API for use in Unity. The Microsoft Speech API is a Windows COM capability that first appeared in windows Vista. It is an easy way to get text to speech in a windows application.
This post will go through the steps of making the C++ DLL and the C# behavior for Unity. If you don’t care about the “how” and just want to use the plugin skip to the end for the download and usage instructions.
Continue reading “Microsoft Windows Text-to-Speech for Unity”
Mongoose is a C library for embedding a simple web server in another application. We used Mongoose for all of our web-enabled Torque games and I wanted to be able to continue using it for new games in Unity.
There is an existing extension called UniWeb which provides a web server in unity, but their code doesn’t support web sockets. I’ve just built Mongoose in windows, but it is Linux and Mac compatible as well. However, it wont support any of the mobile platforms.
This post will describe the steps for building Mongoose 5.6 as a windows native DLL, then wrapping it for use in C#, and finally including it in a Unity project.
Continue reading “Mongoose for Unity”
This blog post describes some of the design decisions I made, and programming challenges I encountered, while writing the food cost calculator application. This post is probably too detailed for anyone to read. Consider yourself warned.
Continue reading “Programming the Food Cost Calculator”
I have been working on a new game for the touch table. It is called Zilch (or Farkle, Greedy Dice or Dice 10000) and it is a “press your luck” style dice game that we often play at the end of a gaming session or while waiting between games. Players roll six dice and can score some or all of their dice. What scores depends on which rules you are playing by; but it at least includes 1s, 5s, and sets of 3+. The scored dice are removed and the player may continue and roll the remaining dice for more points or bank their existing score. If the new dice can’t score anything, the player loses their points and pass the dice. If all the dice score, the player may/must continue and roll all six again.
In my version of the game for the touch table, you can play more than one game at a time so that lots of people are rolling simultaneously. Here 10 players are playing 12 games:
Continue reading “Zilch for the touch table”
One of the lessons that we learned from PAX is that it is very nice to be able to switch between a human and AI player while playing the game. The only game that had this feature at PAX was Parcheesi. It made people more likely to start a game since they knew that they could be replaced by a computer player if they got bored or had to leave.
So one of our goals is to update the existing games so that you can switch back and forth between a human and computer player during the game instead of just at startup. Most of the games will be fairly easy to adapt to this system. We generally write the computer players in C++ while the rest of the game logic is in torquescript. This separation has meant that we generally pass everything the AI needs to make a decision each time the AI has to play.
Yacht didn’t have an AI at all, so to adapt it to the new system required me to write a computer player for it.
Continue reading “Yacht AI”
After completing the AI for Pickomino I wanted to play against it and watch it in action. So I decided to create a version of the game for our touch table. I wont be trying to sell this game since I don’t have the rights from the creator of the board game. So it will just be for our own use.
The game came together pretty quickly. I spent a day or so learning Photoshop and creating graphics. Another couple of days building the game logic and integrating the C++ AI. Another day adding “simultaneous” mode. And a final day to add animations and work out bugs. Here is a screenshot of the final product.
Continue reading “Simultaneous Pickomino”