Jun 1, 2012 - A New Project...

I’ve had a license for Impact for a while now ( see http://www.impactjs.com for what this is - essentially a rather nice HTML5 engine, ) and I’ve even fiddled with binding enough JavaScript and HTML5 niceties to C++ in order to gain access to more exotic hardware, which may not have a capable web browser. This code has been fed back into my GLESGAE engine if you’re interested in it, but it’s stalled for now while I decide just what to do with GLESGAE…

GLESGAE started out as an educational tool for myself, to enable me to fiddle with render pipelines and shaders, without breaking anything at work. It then started to grow, as things often do, as a bigger engine framework thing. Then I started wedging in JavaScript, and binding up bits of Canvas and HTML5 features - and this is when I hit a nice brick wall. GLESGAE is meant primarily for GLES rendering - the OpenGL version primarily available on mobile hardware. However, ES 1 and ES 2 are far apart from one another in terms of functionality and API.
One of Canvas’ neat tricks is off-screen rendering. This can be implemented as a simple Render to Texture on ES2, but it’s a fair bit more annoying on ES1, as there’s ES1 and ES1.1 as well as Lite versions… so I ran into the wall of what to support, looked into pBuffers for a while, and then got distracted with work for a while.

Going back into that isn’t what I really want to do at the moment so, in true homebrew hacker fashion, let’s start another project!

Actually, two projects.. but the second one isn’t going to start until the first one is complete.

Project One - as it shall henceforth be referenced as until I come up with a name - is going to be written using Impact, and be an HTML5 game.
Project Two is a re-imagining of my work on GLESGAE while binding JavaScript and HTML5 Canvas, and shall not be further discussed until Project One is complete - and I shall stab myself in the hands should I attempt to start Project Two before Project One is finished.
So, what is Project One?
I’m not entirely sure to be honest!
I have a few ideas - taking one of my LudumDare projects and redoing it in Impact. The likely subjects would be Little Quirks or Moons of Subterrane which both have a fair amount of work done on them already. There’s also Tiny Critters - but if I don’t do that justice, I may have questions to answer from my fiancé, so let’s leave that alone for now till I have more time!
There’s also raiding the archives for something - which can bring out T.I.T.A.N, and Wobots.
Finally, there’s starting something brand spanky new.. and there’s a few designs sitting about that haven’t been talked about, one of which is likeliest for being Project One.

So, gibberings aside, I’m going to start a devblog of sorts for Project One, and give myself a somewhat loose deadline of - end of the month - to get it done in.

Plenty of time!

*cough*

Jun 1, 2012 - 7 Days of ActionScript Closure

Hmm, it’s been a while since I finished the 7 Days of ActionScript challenge I did, and I forgot to upload my source!

It’s now available here.
You’ll find the source itself, scattered amongst various .as files, a compiled SWF and a test puzzle which you’ll need to download to feed it. You can create your own if you like, as it’s just a JSON array of numbers.

Actual ActionScript programmers will likely recoil in horror at the code in there, but remember it was a crash course in ActionScript in seven days! That, and I was doing it on Linux as well, with Flex and gEdit rather than any of the more comprehensive IDEs available for Windows. Still managed to make a somewhat workable Sudoku game though.

Either way, that’s the end of that :)
Now for something completely different…

Apr 13, 2012 - 7 Days of ActionScript - Day (and Night) Seven

I finished my little Sudoku thing the other day.

Day Seven was very productive, though due to starting late, it did drift into late night/early morning!
Although I didn’t get sound done ( or bitmap loading, either.. it was all drawn shapes, ) I did get a lot done, and my little Sudoku game actually worked out fairly well considering I did a crash course in ActionScript within a week.

I’ll put it up soon for a giggle.

One thing that tripped me up a huge amount was variable scoping.
Usually, variable scope is to the current code block.. so if you were to do:

void myFunction(const bool inputBool) {
    bool myBool(false);
    if (true == inputBool) {
        bool anotherBool(true);
        myBool = true;
    } else {
        bool anotherBool(false);
        myBool = false;
    }
}

You wouldn’t have a problem, as anotherBool loses scope in each block.

However, doing something like:

public function myFunction(inputBool:Boolean):void {
    var myBool:Boolean = false;
    if (true == inputBool) {
        var anotherBool:Boolean = true;
        myBool = true;
    } else {
        var anotherBool:Boolean = false;
        myBool = false;
    }
}

You’d get an error, as anotherBool was declared in the first block.
ActionScript’s variables are scoped to the function.
Which is really flippin’ annoying when you come from a background of coding the first way!

But yes, I’m proud of my little Sudoku game, done in 7 days, in ActionScript, on Linux.
It’s not very fancy or pretty, but it does the job. ActionScript has a rather large amount of support code that I didn’t get anywhere near ( like for Images, the preloader stuff, Audio, etc… ) so maybe I’ll have a look at them next time.

Still, it was fun :)