Profile

Member Since
June 19, 2012

Search Members

  

rat4sale

9
@

Badges

This user hasn't earned any badges yet.

Posts

Viewing 1 to 9 (9 Total)

Extensions and Android

Hi,

So I've written a small Android application in native Java which works fine.
I'd like to be able to convert my Android application into an extension so that I can use it's functionality whilst running from within a Haxe project I've also been working on.

Does anybody know of a resource detailing how to organise and convert an android project into an extension, or if this is possible, considering there is generated code class, and XML files accompanying the Java code.

Any help would be greatly appreciated, I've been scouring for anything on this subject matter, and there's not a lot to go on.

Posted on January 29, 2013 at 8:42 AM

SoundChannel Issue

After much head scratching and debugging I realised soundChannel.position wasn't returning the correct value on the windows platform. I then downloaded and slightly modified the Sound tutorial example to check whether this was in fact an issue with my own code, or the mp3 i was using.


package;


import nme.display.Sprite;
import nme.events.MouseEvent;
import nme.media.Sound;
import nme.Assets;
import nme.Lib;

import nme.media.Sound;
import nme.media.SoundChannel;

import nme.events.Event;

/**
* @author Joshua Granick
*/
class PlayingSound extends Sprite
{

var soundChannel : SoundChannel;
var sound : Sound;

public function new ()
{
super ();

sound = Assets.getSound ("assets/music/VIC68231.mp3");
soundChannel = sound.play();

addEventListener( Event.ENTER_FRAME, test );
}

public static function main ()
{
var playingSound : PlayingSound = new PlayingSound ();
Lib.current.addChild( playingSound );
}

public function test( e : Event )
{
trace( soundChannel.position );
}
}

the test example is pretty straight forward however the trace always returns 1 when it's playing and 0 when it's not. This is of course not correct.
Is this is a known issue and does anyone know a work around for the time being?

I'm working on a pretty large port of a flash game which has a significant number of sound files for VO's etc. Some help would be greatly appreciated.

Posted on December 10, 2012 at 5:36 AM

Re: Maximum amount of external assets for compilation.

Hi Hugh,

Thanks for the reply.

-Debug does work. What does haXe do differently with the assets between debug and release?

If I am understanding you correctly, when haXe is compiling assets into the executable there is some finding/sorting going on which has not been Hashed, meaning that looping through these lists causing the creation of the .cpp / .hx files to take a long time?

Is there any plan to fix this? If not can you think of a workaround?

Thanks,

Graeme

Posted on November 12, 2012 at 6:34 AM

Re: Maximum amount of external assets for compilation.

Hi,

Thanks for your response.

I have 1686 PNGS of varying sizes 1024*768 to 58*58. I know this is a lot and I expected the compile time to increase. Unfortunately it justs hangs now though, making compilation impossible.

I am not sure if it is the amount of external images or the overall size of the external directory that could be doing it.

Anyone else know of any maximum external file boundaries in haxe?

Posted on November 09, 2012 at 11:02 AM

Maximum amount of external assets for compilation.

Hi,

I am working on a large haxe project and it would seem that the compilation for Windows Release is girinding to a halt. As I add more external assets (.PNGS) the compilation time increases, which is expected. I added some more files this morning (about 20 PNGS) and the compilation hangs completely. I have to kill flashdevelop to terminate the running process.

Is there a maximum amount of external files that haxe can handle?

Has anyone come across a similar issue? If so.. did you manage a workaround?


Thanks,

Graeme

Posted on November 09, 2012 at 8:54 AM

Re: drawTiles VS display tree list for scaling/smoothing

I am a moron.

Thankyou.

Posted on July 18, 2012 at 7:21 AM

drawTiles VS display tree list for scaling/smoothing

Hello.

Our current game is 1024*768. We need to support lower resolutions for Android devices. The assets in our game are all bitmaps and we use a balance of drawTiles and the standard display list for drawing assets.

If we scale down our main container MovieClip any assets drawn using drawTiles scales and smooths.
(Hardware is using Bilinear filtering)

Any bitmap that has been added to the display list scales down fine but does not apply any smoothing.
(Not sure how hardware is rendering these bitmaps)

My questions are.

1. Is it possible to apply smoothing to the display list bitmaps? or does the rendering procedure for display list bitmaps forbid this?

if not...
2. Would it be feasible to use drawTiles for all my bitmap rendering (bearing in mind we have a lot of large bitmaps 1024*768 that do not transform/rotate or scale?

if not...
3. Would it be best to create new versions of all the bitmaps, scaled down and transform there x and y points depending on the resolution your targeting?
(This would create multiple builds using different resolutions, so you'd have to target specific devices)

I hope this all makes sense!

Thanks,

Graeme

Posted on July 18, 2012 at 5:47 AM

Re: Reflect has no field setProperty

Hi,

I just checked my HaXe and I needed to upgrade to 2.09.

Thanks for your very swift and acurate reply!

Regards,

G

Posted on June 19, 2012 at 11:23 AM

Reflect has no field setProperty

Recently upgraded my Windows 7 64 bit OS to new nme libraries

actuate 1.41
hxcpp 2.09.3
nme 3.3.3

I try to run ACTUATE test project
nme test "Actuate Example.nmml" windows

I receive this issue and 3 other similar ones.
SimpleActuator.hx 277: Characters 6-25 : #Reflect has no field setProperty

I have tried commenting out setProperty/getProperty in SimpleActuator.hx but I then receive more errors.
An example of one of these errors would be..
./src/neash/events/EventPhase.cpp : error C2511: 'Dynamic neash::events::EventPhase_obj::__SetField etc....
overloaded member function not found in blah blah.

I have been previously using

actuate 1,38
hxcpp 2.09
nme 3,3,0

And it worked fine.

Is anyone else having this issue?

Posted on June 19, 2012 at 11:04 AM