Tuesday, August 3, 2010

kit-kat-toe: mochiads with haxe

I recently tried out Viktor Hesselbom Haxe Instructions for MochiAds and they work just fine.

Something like this...

% wget https://www.mochimedia.com/dl/MochiAPI_v3_8.zip
% unzip MochiAPI_v3_8.zip
% cd MochiAPI_v3_8
% mkdir -p foo/mochi
% cp -r mochi/as3 foo/mochi
% cd foo
% compc -source-path . -output mochi.swc -include-sources .
% unzip mochi.swc library.swf
% haxe --gen-hx-classes library.swf

Then just get the game id from the nice folks over at mochi and jam in the little bit of ad code.

One problem I had was that I found I needed to add a new MovieClip to the flash.Lib.current, use that for the ad and remove it in the ad_finished callback.

I had some mixed luck with swfmill... The old version I had (0.2.12) didn't complain about the mp3 I having the wrong bitrate... But when I linked against the -swf-lib from the new version it produced a blank swf!

So... I have no sound...

LOL... it is a very silly proof of concept... check it out

I call it kit-tac-toe

gory swfmill detail

To compile swfmill under Hardy Heron (I know... it's old)... I had to modify swfmill.c and add: extern char *xslt_simple;

And it still didn't work... I may try to use a newer box to see if my horked environment is why it didn't work right....

Here is the handy message I got from it...

Sampling rate: 32000
Error: Flash only supports sampling rates of 44100, 22050 and 11025 Hz
WARNING: MP3 file sounds/cats/meow.mp3 has a wrong sampling rate

Saturday, January 30, 2010

28-days as the Witch in Magic Realm

The witch is all about spells, here was my setup:
  • Absorb Esssence: grab a big monster to rack up fame/notoriety killing monsters and natives
  • Control Octopus/Spider: always nice to have company!
  • Broomstick: get me out of here!
Amazingly, the Pool and the Lost City were in the tile right next to the Dark Valley where I started!

Grabbed a Giant and the Pool Monster conveniently showed up! Time to kick some @$$!

The very next turn, the Pool Monster found the pool and pulled out: the Cloven hoof, the Black Book and Bejeweled Crown (50g, yo!)... Unfortunately this trapped the Witch as a Giant and on the second go 'round (ahem). the Pool Monster went down.

Next day I looted the "Sacred Idol" and decided to make a run for it.

The nearest dwelling was the Chapel which I barely arrived at in time abandoning the Cloven hoof so I could carry the Crown in Giant-mode so as to sell it the next day (day 27!)

My bro had told me short games force you to focus and I'd have to agree, but ... day 28, there was the Witch sitting there with the Black Book, one tile away from the Cloven Hoof... and... the game is over!