HaxeFlixel startup screen does not center

425 views
Skip to first unread message

Jonatan Van Hove

unread,
Jan 16, 2014, 7:25:25 AM1/16/14
to
The HaxeFlixel startup screen that shows up centers perfectly on windows and flash builds, but not on Android (Ouya).

This is how it looks in Windows build (which is fine)

And this is more or less how it looks on Android


I would like to keep it in the game, as a small gesture of giving back, but it looks silly when it's in a corner...

Here's my project.xml

<?xml version="1.0" encoding="utf-8"?>



<project>

 
<app title="LAZAKNITEZ" file="LAZAKNITEZ" main="Main" version="0.0.1" company="GLITCHNAP"/>

 
<meta title="LAZAKNITEZ" package="com.lazaknitez" version="0.0.9" company="GLITCHNAP" />

 
<window width="1280" height="720" fps="1" orientation="landscape" fullscreen="true" hardware="true" vsync="true" background="#000000" />




 
<set name="SWF_VERSION" value="11.2" />

 

 
<set name="BUILD_DIR" value="export" />

 
<classpath name="source" />

 

 
<assets path="assets" />

 

 
<haxelib name="actuate" />

 
<haxelib name="openfl" />

 
<haxelib name="nape" />

 
<haxelib name="flixel"/>

 
<haxelib name="flixel-addons"/>

 

 
<icon path="assets/icon.png" />




 
<haxedef name="NAPE_RELEASE_BUILD" />

 
<haxedef name="FLX_THREADING" />

 
<haxedef name="FLX_NO_MOUSE" if="mobile" />

 
<haxedef name="FLX_NO_KEYBOARD" if="mobile" />

 
<haxedef name="FLX_NO_TOUCH" if="desktop" />

 
<haxedef name="FLX_NO_GAMEPAD" />

 
<haxedef name="FLX_NO_SOUND_TRAY" />

 
<haxedef name="FLX_NO_FOCUS_LOST_SCREEN" />

 
<haxedef name="FLX_NO_DEBUG" unless="debug" />

 
<haxedef name="fdb" if="target_flash"/>

</project>



Samuel Batista

unread,
Jan 16, 2014, 11:28:21 AM1/16/14
to haxef...@googlegroups.com
I saw this issue last night when playing the OUYA version of Bosses Forever: http://www.bossesforever.com/

It was really sad to see that the only major bug in that game is in the FlxSplash :/

Gama11

unread,
Jan 16, 2014, 11:31:18 AM1/16/14
to haxef...@googlegroups.com
Are you sure it's an issue with FlxSplash itself, Sam? I'm thinking this is more of a stage size issue - a width and height of 0 should be specified in the xml so the game picks up the device's resolution.

Samuel Batista

unread,
Jan 16, 2014, 11:40:22 AM1/16/14
to haxef...@googlegroups.com
I think you're right, it's probably an issue with stage size when FlxSplash is created. That seems pretty weird though.

Jonatan Van Hove

unread,
Jan 16, 2014, 12:13:05 PM1/16/14
to
just tested, this fixes it

//var stageWidth:Int = Lib.current.stage.stageWidth;
//var stageHeight:Int = Lib.current.stage.stageHeight;
var stageWidth:Int = cast(FlxG.stage.width);
var stageHeight:Int = cast(FlxG.stage.height);

:) :) I'll make a pull request... or a hotfix, or whatever it's called

Samuel Batista

unread,
Jan 16, 2014, 3:14:49 PM1/16/14
to haxef...@googlegroups.com
Pull request it!


On Thursday, January 16, 2014 12:12:16 PM UTC-5, Jonatan Van Hove wrote:
just tested, this fixes it

//var stageWidth:Int = Lib.current.stage.stageWidth;
//var stageHeight:Int = Lib.current.stage.stageHeight;
var stageWidth:Int = cast(FlxG.stage.width);
var stageHeight:Int = cast(FlxG.stage.height);

:) :) I'll make a pull request... or a hotfix, or whatever it's called

Beeblerox

unread,
Jan 19, 2014, 1:52:18 AM1/19/14
to haxef...@googlegroups.com
i think that you could solve this issue just by editing project.xml (just set window width and height to 0 on mobile targets):
<window width="0" height="0" fps="1" orientation="landscape" fullscreen="true" hardware="true" vsync="true" background="#000000" if="mobile" />
<window width="1280" height="720" fps="1" orientation="landscape" fullscreen="true" hardware="true" vsync="true" background="#000000" unless="mobile" />

Reply all
Reply to author
Forward
0 new messages