Profile

Member Since
December 05, 2011

Search Members

  

fritzu

5
@zutgames

Badges

This user hasn't earned any badges yet.

Posts

Viewing 1 to 5 (5 Total)

Re: IBitmapDrawable.draw inconsistency - Flash vs. Windows

Didn't spend much time on a workaround I'm afraid. In my case I just needed the colorTransform capabilities of draw() rather than geometry so I'm doing it in two steps with copyPixels() instead.

Pretty nasty bug though - took me a while to track down what was going on...

Posted on January 06, 2012 at 7:23 AM

IBitmapDrawable.draw inconsistency - Flash vs. Windows

I've found inconsistent behavior between Flash and Windows targets when using draw() with a matrix, when the target point is in the negative x axis.

Here's a comparison between the two targets:


And here's the code that produces it:

var source = new BitmapData(200, 50, false, 0x000000);
var target = new BitmapData(200, 200, false, 0x999999);

target.draw(source); // draw an instance at x=0

var m = new Matrix();
m.translate(50, 60);
target.draw(source, m); // draw an instance at x=50

m = new Matrix();
m.translate(-50, 120);
target.draw(source, m); // draw an instance at x=-50 - fails on Windows target

var b = new Bitmap(target);
b.x = 100;
b.y = 20;
Lib.current.addChild(b);

As you can see, Flash does the expected behavior - always drawing the visible area of the black box. Windows (and other cpp targets I expect) fail to draw the 3rd block, which is placed 'off-screen'.

I did a quick test and this problem doesn't seem to occur when the image is in the negative y axis.

This has consequences when for instance trying to use draw() with animated spritesheets with transparency, so I'm having to do some workarounds right now.

Posted on December 14, 2011 at 8:53 AM

Re: Uncaught exception - Overflow when compiling project

A ha, was just about to ask about this - getting the same error trying to embed some pixel fonts.

Cheers!

Posted on December 12, 2011 at 6:13 AM

Re: Targetting the desktop (win/mac/linux)

Hey - thanks for the reply.

A built-in obfuscation system would be really useful - I think this is essential for anyone in my position, wishing to produce commercial desktop titles.

Been playing around a bit more today and the full-screen stuff (Lib.current.stage.displayState) is working great for windows. I can grab stage.stageWidth etc after a resize event and update my canvas accordingly. Just got to do some testing on Mac and then I think I'm pretty sure I'll go with NME for this game. A really attractive feature is that I can make an online demo with the same codebase.

I'll post more questions as they come up.

Cheers!
f

Posted on December 06, 2011 at 8:26 AM

Targetting the desktop (win/mac/linux)

I'm really enjoying haxenme so far, very natural transition from AS3.

I'm looking into porting a Flash game in order to release it as a commercial download title, using haxenme rather than some swf2exe tool. I've been testing the Windows target but intend to target Mac and Linux too.

A few questions - apologies if they're covered somewhere, couldn't find anything via searching!

* Is there some way of embedding / obfuscating the assets folders in the final build? It doesn't need to be heavily protected, but I'd rather put up a barrier to people simply reaching in and getting access to all the assets
* Can I go full-screen, ie. with no OS toolbars etc? Do I have to worry about the user's screen resolution?

Probably a few more questions down the line!

Thanks in advance,
f

Posted on December 05, 2011 at 6:04 AM