FlxTileBlock did not work on mac target or ios
A sprite sheet that works fine on flash will not load properly on mac, ios. On game, it shows pixels from the next frame, and cuts off pixels from the current frame.
I'm use last version of Fixel, NME and Haxe.
can you provide simple example (with code) of your problem?
@Talii I uploaded possible fix for your problem to repo. Can you download updated FlxTileblock class and place it instead of old version of file? And please let me know if it helped you or not
@Beeblerox Same problem :-(
Code example :
var groundTop:FlxTileblock = new FlxTileblock(positionStartGround, y, width, height);
groundTop.loadTiles("assets/images/groundTop.png");
groundTop.solid = groundTop.immovable = true;
add(groundTop);
var groundT:FlxTileblock = new FlxTileblock(positionStartGround, Std.random(Lib.current.stage.stageHeight) - 200, width, height);
groundT.loadTiles("assets/images/groundTop.png");
add(groundT);
var groundMiddle:FlxTileblock = new FlxTileblock(positionStartGround, y, width, 200);
groundMiddle.loadTiles("assets/images/groundCenter.png");
groundMiddle.x = positionStartGround;
groundMiddle.y = y + groundTop.height;
add(groundMiddle);
groupCollision.add(groundT);
groupCollision.add(groundTop);
If it helped you, two screen flash and mac version : http://fbe.am/91U
ok. will work further. hope I'll find the source of problem today
@Talii two more questions: what is the size in pixels of images you loading to FlxTileblocks? and what is the size of these FlxTileBlocks? Maybe it will help me to find problem
@Talii and last question: and what are 'width' and 'height' parameters (in pixels) passed to the loadTiles() method
"@Talii and last question: and what are 'width' and 'height' parameters (in pixels) passed to the loadTiles() method" : same problem ;-)
"@Talii two more questions: what is the size in pixels of images you loading to FlxTileblocks? and what is the size of these FlxTileBlocks? Maybe it will help me to find problem" 8, 16, 64, all of these settings doesn't work
@Talii Maybe you didn't understand my questions, but I just want to know the size of images "groundTop.png" and "groundCenter.png" in pixels (for example, 128 by 64 pixels) and what are 'width' and 'height' parameters in your code example
I did test resize images "groundTop" on 32, 64, 128 pixels size and also parameters on loadGraphic.
Envoyé de mon iPhone
Le 30 juin 2012 à 14:36, [email protected] a écrit :
@Talii Maybe you didn't understand my questions, but I just want to know the size of images "groundTop.png" and "groundCenter.png" in pixels (for example, 128 by 64 pixels) and what are 'width' and 'height' parameters in your code example
Reply to this email directly or view it on GitHub: https://github.com/Beeblerox/HaxeFlixel/issues/83#issuecomment-6684957
@Talii It is still not clear to me. Can you send me these graphic files for tileblocks or dummy files with the same size and visible borders of tile's frames.
Sorry for my dullness
@Beeblerox You find all source of my project here : http://fbe.am/92x. Good luck, thx u
@Talii I think I found problem but uncertain since I work on windows. I changed color depth of images in asset folder to 32-bit (I think that your was 8-bit) and they became visible correctly on cpp target. I think that it is a NME 's restriction to image files. I changed your code a bit (OnTheRun.nmml and World.hx files only) so it works little nicer. I've added some comments to these changes. You can download changed project archive here: http://fbe.am/92G Please remove all files in "Export" folder before new compilation. Hope it will solve your problem
@Beeblerox, Great work ! Exactly, working fine now. I didn't know NME's restriction on image files, sorry... Thanks for another code change ;-)
@Talii Anytime :)