A sometimes reflection on Eve, Coding and Life-in-General online...

Sunday, July 27, 2008

Journeys through Flash AS3 - The Carousel

Neato - my first carousel is now live and what have I learned? Well there's a ton of great examples of carousels around - that's the first thing. The second? Always check if something is in AS2 before you try to compile it in AS3. Duh. Now for my own meager contribution: intervals. I had my fancy carousel flying around and I wanted to slow down each item as it arrived at the front. Sounds easy? Sure, but I'm no maths wiz so it took me a while to pen, paper and scratch forehead on this one. Here's the final idea I came up with:

  1. A function which ascertains how big the remainder of a division is
  2. An arbitrary increment based on circumference divided by the number of objects
  3. Testing the function on the position around the circumference divided by _2_ above
  4. Slowing the shifted increment of the carousel as a result of a true return from the function
Here's the code:




// if ((shift / intIncrement) == round number) { shift = an interval }
// and shift by a smaller increment as a result

function isCloseToRound(num:Number):Boolean {
if (( num%1 ) < 0.1 ) {
return true;
}
else {
return false;
}
}


var intIncrement = (( Math.PI*2 ) / numObj );
if (isCloseToRound(shift / intIncrement)) {
shift += shiftIncrement / 2;
}
else
{
shift += shiftIncrement; // 0.02 at start
}


Goodbye Bullet Riddled Road

Well, the militia thing just didn't pan out. Ultimately the sight of all those people having a fun time and x'ing up - while I didn't have time for more than a mission a week - got to me and I resigned my commission before the tin gong for cowardice got implanted in my brain. Back to the Roses and hopefully some fives. Still dreaming of a Revelation dread but hmmm well, not really sure how that's ever gunna pan out on limited time either - they are a cool 1.5 bil ... yikes.

Thursday, July 10, 2008

Militia Madness


fig.1: The Zealot

Well, I finally caved in and did two things I said I'd never do:
  1. Joined factional warfare under the Tribal Liberation militia
  2. Started a blog
I'm not sure which will prove the shortest in duration, but what the hey :)

I was getting pretty bored with running Caldari 2's, even in the Zealot and even with most of the missions being courier. I have my freighter, I have my big Amarr battleship (which is pretty useless fighting angels) - and with the small time I get to play Eve these days there didn't seem to be much point hanging around in corp. Ended up in a big discussion with the CEO about the merits or lack thereof in Game Time Card trading for iskies and decided I had better ( i.e. more interesting ) things to do.

I'm also downloading the Mabinogi client as they apparently support Australia. We'll see how that goes...

About Me

My photo
Web Designer, Gamer & Photographer in no particular order.