Wednesday, May 25, 2011

[Stratos Burst] Hacking the Camera #2

The Mega Intervalometer script is now installed. It has taken me an hour or so to figure out how to properly set up, initiate, and launch the function, but I believe I now have it sorted. Instead of buying a plug in Intervalometer device for thirty or forty dollars, this script allows me send commands to the camera through the CHDK firmware update. I can set it to automatically initiate the interval sequence on boot-up, the delay before taking the first shot, the time between shots, how many to take, and if the sequence is infinite or not.
What this means is that I can set the camera to shoot every [x] seconds or minutes, and for how long, while also keeping my equipment payload to a minimum by excluding any unnecessary hardware. My next step is to test the endurance; how long will it last with a fresh set of batteries.

Monday, May 23, 2011

The Eye: Fanzine development blog #1

After NeonCon 2010, I was taking a greater interest in finding some projects to work on as a way to get my hands dirty with some layout and project management in the gaming industry. I had met Adam Jury of Posthuman Studios, publisher of the acclaimed Eclipse Phase role-playing game, at that convention. I attended a workshop he was presenting, and we had some great discussion over lunch. So a few months later when Adam posted on Twitter that he would love to see a fanzine for Eclipse Phase, my ears perked. I poked around the official forum and found that some enterprising individuals were already rounding up volunteers for the project, spurned on by the same message.

I joined the crew at firewall-darkcast.com, and immediately volunteered to help with the fanzine. They had some contributors to the design discussion, but were lacking any committed layout artists, so I seized that mantle and took control. Through a series of discussions guided by the more detailed sentiment that Jury posted on his blog, we settled on a pdf format that was optimized for quality printing at home or with a print service (the conversation threads that were involved in this process are publicly viewable on the darkcast forum, so I won't hash over their details here). This decision was made because they carry a sense of permanence. Blogs and site-only fanzines are subject to the tragedies of web hosting; site crashes, data loss, and disappearing through lack of use or because the author is no longer interested and takes it down. A single distributable file can be copied, downloaded, shared, and exist somewhere other than the site that hosts it.

My first step was to gather the required metrics including page size, page arrangement, cover type, etc. and then kick out a mock up page of a cover page and a few content pages that covered most of the expected layout options including sidebars, text, frames, images, headers, footers, and other furniture. I also built the beginning of a complete style guide that could later be distributed to any layout artists that took part so we could all maintain similar standards.

Once that was hammered out and posted, I started building master pages in InDesign, solidifying typefaces and paragraph styles for the copy and set up text grids. I set up several layers for each different type of element including text, art, background, sidebars, and headers that would all be used to create a layered pdf. I also started revising a final style guide that detailed page elements, all pieces of the style guides, color profiles, and all of the various optional page elements such as the frames for side bars and hooks.

While all this was in development, fans and contributors were submitting articles and art to the firewall-darkcast, and editors were commenting and cleaning up the content in preparation for layout. I also started a competition to design the masthead image. I provided the group with sizes and specs, and they had a few weeks to turn out a graphic submission that would announce our fanzine. Once all of the submissions were voted on, the final design came from Trentin C. Bergeron (@trechriron). Once the master pages were done, I began to pull the content and flow it onto the pages, formatting as I went, and pulling the different pieces to their respective layer. Images went in where I had them available, or were requested from the team. As the process continued I made tweaks to the style where I saw things that didn't quite work.

This was initially planned as a quarterly magazine, so there was no rush to a deadline; there was plenty of time to get things on the page and tease it all until it fit and looked fairly good. After all was said and done, I packed off the layered pdf to the dropbox and we posted it. We still had a challenge with generating buzz and site traffic, but we realized that this is a fairly focused demographic that we are shooting at, so we can't expect miracles.

The first issue can be downloaded here.

An open question...

Simply put...
"If you were playing a card/board game about being a diabolical cultist bent on raising one of the Great Old Ones from the depths of the cosmos before another cult does, what would make the experience fun?"

 It's a wide open question, as it is intended to be. I look forward to your responses!

Sunday, May 22, 2011

Game Development Journal #2

I recently had a great discussion with friends that have a heavy interest in games and design. One of the topics that came up was the mechanical issue I outlined in a previous post. They gave me some alternate views on the subject, and pointed out areas that I was thinking too aggressviely. I think I now have direction on a workable solution that keeps everyone involved but still puts that tension in the hands of the players, and gives them not one, but two countdown clocks driven by the cards. Just to make them feel warm and all.

The first thing I have done is abandoned the idea of turning any of the players into a collective force against any others. I still like the idea, but it does not seem workable in this case. I may try to build something around that later; a tide that rises as those you fought with join the ranks against you. A zombie apocalypse theme sounds right for that, because we just don't have enough proper zombie games, right?

So what I'm left with is that, although each player is pursuing an independent goal, there is a mechanically driven endgame countdown, as well as a rising threat built into the main draw deck similar to what is used in Pandemic.

With some of those key elements thought out, I am turning to building the various mechanics starting with common and shared resources before getting into the various pieces that will support varied ways to win.

A big thanks to Ben the Game Designer and Dan for hanging around until after 2am and sharing their thoughts.

Thursday, May 19, 2011

Adding horizontal/vertical borders to an Excel range selection

I'm cracking my head against another piece of Excel's AppleScript enabled functions.

What I seek to do is turn this












into this













This is part of a larger script and I need to add borders to every cell in the used range. I am really pulling my hair out trying to track down exactly where Excel assigns this property and how to address it's parent object. So far all I have managed to do is add a border around an entire range using...get this...the border around call, but I cannot seem to hit all the horizontal and vertical borders in-between cells.

Does anyone out there have a snippet of code that can handle this succinctly?

Wednesday, May 18, 2011

[Stratos Burst] Hacking the camera #1

First off, there is a LOT of technical information available on the CHDK wiki, the firmware hack that unlocks many more functions for your camera than might normally be available. I invite you to read as much of it as you can stand, but to shortcut right to the easiest and most direct method for my A480:

I have made a simple text file that is renamed "ver.req",  and copied it to an SD card that I put into the camera. This allows me to access more detailed version information and retrieve the cameras actual firmware version information. With that nugget, I can download the proper firmware hack version from the Autobuild Download site. This information will be useful later.

The site suggests using Card Tricks, downloaded from this forum thread, and it looks like it should be the most reliable way to set up the SD card. Card Tricks didn't like the SD card that I had on hand, though, so I  downloaded the firmware zip file, unpacked it straight into the SD, and loaded it into the camera. By starting the camera in playback mode, and navigating the menu to the Firmware Update command, I can load the CHDK firmware, which will access the intervalometer script later. This seemed to work, and I could have saved myself a lot of time by just trying that first.

Tuesday, May 17, 2011

Game Development journal #1

So I have an new challenge. I am developing concepts for a card game, and one of the more interesting ideas that I have recorded is, if and when a player fails in their own goal during the game, they are not removed from play, but instead turn into a collective threat working against the remaining players. The more players that fail, the bigger the threat grows while the goal of the new enemies gets proportionately harder to keep them from succeeding based solely on numbers.

I also have a side deck that each player can elect to turn a card from on their turn, the effect of which every player might be able to benefit from. But with each turn the players risk aiding another player, failing their own objective or ending the chance of success for another. The benefits would be effective enough to be an incentive to risk it, but as each one is turned, the risk of not only failure, but increasing the collective threat, rises.

The problem I have come to is how to keep the collective goal from becoming just another way to win. If a player fails, they should fail. But it sucks to lose a hand in the middle of a round and have to sit around watching the rest of the players having all the fun. After all, the best games keep the play interesting to the end, right? So the collective goal against the remaining individual players gives the failed players a continued hand in the game, and adds a dynamic layer of tension for the rest. But I do not feel there is enough incentive to do your best in the first part, rather than go for the second goal. More importantly, there is no overall sense of risk.

For now I have pulled that element from the lineup until I can develop a proper way to make it viable in play. I have also turned the side deck into a table-wide countdown clock, after a fashion. A card is turned at the beginning of each round; it still contains the beneficial cards, as well as some drawbacks, but it also has a number of key cards that fill a losing end-game condition for everyone.

AppleScript for Excel development #2

In this post I mentioned that I was working on an AppleScript to handle an Excel process. I decided to abandon the nested line-by-line evaluation of the two necessary columns as this took entirely too long. In this particular process, I have not yet discovered a way to handle a way around this step, but I have taken a different approach to help minimize the cycles spent.

I managed to get the autofill function to script properly. It was a bit fiddly at first, but once you figure out all the syntax, it becomes more agreeable. This allows me to insert a formula in one cell and populate the rest of the column with the same function. By referencing ranges instead of specific cell address', I can assure that my functions always work, regardless of location. The first instance concatenates the values of the two mentioned columns into one cell, making a combined page & reference number.

5_29460
5_29460
5_30012

The next pass sorts the sheet by this column and then inserts another formula that compares each cell to the one above it, looking for a match. Again, autofill populates the column in seconds. When the compare returns true, the cell takes on a specified value. Afterwards, both columns are copied and pasted back in with the values only (Copy & Paste Special: Values).

The compare column is sorted by value and we begin a loop that handles the inevitable line-by-line evaluation. To control this, I included a single Boolean variable as an exit value. The script will cycle through each row and evaluate the cell. If the cell indicates a previously matched row (duplicate), it deletes the row. Once it reaches a unique row, either indicated by an empty string or a second pre-defined value, it switches the Boolean value, triggering the loop escape. This keeps the script from having to evaluate the rows that are already known to be either unique or the first instance of a row.

Monday, May 2, 2011

AppleScript for Excel development #1

I'm currently working on an AppleScript for another department to handle a piece of heavy lifting in Excel. As I might have stated previously, Excel can be a bit obtuse on how to talk to it until you get to know each other. It really helps, wherever possible, to name each column you expect to use as a range and call them by that name in the script using something like
 tell row x of range myRangeName
 end tell
The current project is intended to perform some formatting, column additions and deletions, as well as comparing the values of two different columns and deleting any rows that have duplicate entries. That last part is one of the most time consuming operations so far. The opening approach was to duplicate what was currently being done manually -- concatenate the two compared cells into one value
 =concatenate(A2&"-"&E2)
 result "20-3154"
The entire sheet is then sorted by the column holding that formula and then a loop compares each cell to the cell above it, and if the values match, deletes the duplicate row. This is unfortunately a time consuming process as each cell in the column must be assigned the formula, and then each cell evaluated. In a sheet that can have thousands of records, this process can take 20 to 30 minutes to crunch.

I re-evaluated the needs and decided I could skip the concatenation and just sort the sheet by both columns, and evaluate them in a nested loop of if/then/else blocks. This cuts out a step, but still is not quite as fast as I'd like; perhaps because a good number of the records are evaluated twice, once for the first column, and then by the second if the first proves true.

I am currently evaluating the autofill command to see if the first method might be faster this way, but I'm having a hard time extracting the proper index references from the ranges I have defined. Partly because Excel speaks to the user in one reference style, and to itself in another. (A1 vs R1C1)

Sunday, May 1, 2011

[Stratos Burst] Camera and software

In order to continuously capture images during the ascent and the free-fall afterwards, the camera on board will need to use an intervalometer that is programmed to trigger shots automatically. Instead of adding additional equipment that will increase the payload weight, we have elected to use an inexpensive point-and-shoot camera that can be hacked with an open-source script add an intervalometer to the camera features.

The Hack
CHDK is an open source program that can be added to your Canon camera, and introduces a range of features. What we're interested in here is the ability to add custom scripts to the lineup. (CHDK Wiki)


The wiki also provides a list of Canon model numbers that have proven compatible with the update as written. We're using this to narrow the search for an affordable camera.


The Ultra Intervalometer script allows you set the interval to your first shot, the span in between each following shot, and the number of total shots, or just make it endless. This means that so long as the camera has power and memory, it will take shots as often as you tell it to. There will be some calculations done later regarding the expected flight time, memory, approximate size of each image, and interval so we can plan on getting as many shots as possible throughout the flight without running out of memory.

Cost: Free

The Camera
The camera will likely be the largest purchase we could make for this project. The first one that we considered for this was a Canon Ixus 70. We already have one that we have used for several years. The wife has been hinting at wanting a new digital camera anyway, so if something fatal happend to it during the flight (or more likely -- the landing) we wouldn't feel put out by the loss. Unfortunately it uses a NB-4L Lithium-ion rechargeable battery. In this situation that is a deal breaker. We really want to use standard Lithium batteries in all electronics where possible. It gets really cold up at the altitudes we expect to reach, and those temperatures can cause NiCad and Li-ion batteries to shut down. It's unfortunate, but Li-ion batteries are just too weak. We do plan to include a couple of pocket hand warmers in the payload to keep the internal temperature of the insulated container up, but as a redundancy Lithium batteries can tolerate lower operating temperatures.


Next we found a used Canon Powershot A470 on Craigslist for $90. This was local and was on the list of cameras compatible with the necessary firmware hack. Unfortunately it is not listed on the list of tested models that work with the intervalometer script. Now that is not to say that it won't work, but if it did not, I'd be out that cash for this project.


Instead, I have opted for a Powershot A480 which is on both the firmware hack and the script list of verified models. I found a used one on Amazon for approximately the same cost, and it sports 10 megapixel resolution instead of the A470's 7.1 megapixels. This should hopefully lead to sharper images throughout the flight. It is also powered by two AA batteries, which allows the use of off-the-shelf lithium batteries.


Cost: $55.00


Batteries
I picked up a 4-pack of AA lithium batteries. Two will go into the camera on flight day. I expect that the other two will be used as a backup power-source for the prepaid phone that will be used to help us retrieve the payload when it returns to terra firma.


Cost: $11.99 + tax


Edit: Ok, bugger this. The vendor I bought the camera from cannot find it now, so I'll have to look someplace else. Hello, ebay.

Edit: Ok, after a series of lost auctions on ebay, we've managed to secure a "like new" model A480. Now, onward!


Edit: 17 May 2011. For once the USPS managed not to lose something bigger than a letter, and the A480 showed up today. I'll be posting on my progress of hacking it and loading the intervalometer script soon.