Profile

Member Since
January 21, 2012

Search Members

  

neurofuzzy

151
@

Badges

This user hasn't earned any badges yet.

Posts

Viewing 1 to 20 (151 Total)

nme.graphics.drawTriangles and shading

Hi! I'm making a very simple 3d engine in NME and I am trying to locate the part of the drawTriangles API that allows for vertex color shading. I thought that was possible in NME.

Right now I am simply drawing over top of the triangles with pure black with varying alpha values to get the impression of shading. Obviously this is slower because I have to add twice as many triangles.

I plan to eventually move to Stage3d but I am waiting until that API is available in NME.

I've attached an example to show what I'm doing.

Attachments: 3dmaze.swf
Posted on May 17, 2013 at 12:40 PM

Re: NMEPreloader does not appear until 50% of SWF loaded

Oh really? didn't know i could do that. Is there info in the FD wiki on how to do this? I've embedded a library SWF before but never used it like that. Do I embed it in a class and then use the -frame compiler flag to import the class on the second frame?

Posted on February 03, 2013 at 5:06 PM

Re: Sploder Arcade Game Creator

thanks for the compliments!

Just wondering, do you have some kind of mechanism planned to play other people's worlds and such. I'll buy it when it comes out on ios, exciting stuff.


Yes... currently games are made and shared on the Sploder web site. I'll just make those games accessible on the iOS version. I'll also add the ability to publish the iOS games on the web site so they can be played online.

I did see one potential bug, I had an underground tunnel and could swim at the end of the tunnel...I expected to not be able to walk anymore, instead I started swimming in the brown dirt area. See screenshot for details.


Thanks for reporting the bug, and thanks for going the extra mile by posting a screenshot. Looks like I'll need to make it so the end of the tunnel is blocked off. smiling

Posted on February 02, 2013 at 5:52 PM

Sploder Arcade Game Creator

I've been working on this for the past year using NME. I decided to release the Flash version first on my web site to get feedback before I submitted the iOS app.

http://www.sploder.com/free-arcade-game-maker.php...

I'm really pleased with the performance, and it's been great working with NME. Thanks to all the developers behind this great framework.

Posted on February 02, 2013 at 10:39 AM

Re: NMEPreloader does not appear until 50% of SWF loaded

Looks like all the code loads before anything can appear, because ApplicationMain has a reference to my Main which also links to all the other code. I tried using Type.createInstance to instantiate my own App from within main but of course none of the classes are loaded unless I import them. And, there appears to be no way in the NMML include a class and force it to be imported.

Looks like we really need something like this:

http://haxe.org/doc/flash/preloader...

But unfortunately that is Haxe 3, so I guess we'll need to wait.

I also found this software that, while crappy-looking, can inject a first frame preloader. Unfortunately it also adds 700kb to the size of the SWF.http://www.verticalmoon.com/products/swflockload/swflockload.htm...

If anyone has any ideas I'm all ears.

Posted on January 28, 2013 at 6:21 PM

NMEPreloader does not appear until 50% of SWF loaded

I have a 1.4MB SWF file and am testing over a simulated slow connection. The NMEpreloader doesn't appear until 500k of the file has loaded. The progress bar first appears halfway filled. Any pointers on how to remove dependencies or how to use the -frame compiler flag to get this to load by itself in the first frame before the rest of the SWF loads?

Posted on January 28, 2013 at 5:41 PM

Re: Leak in Music type Asset (iOS)

I'm nearing release of my project so I dare not muck with my setup now. Once I get over the hump I'll give what you said a try. I also submitted the bug into Atlassian in case you get to it first.

Do I need git to do what you say? Never really used it (I'm on Subversion myself)

Posted on January 23, 2013 at 9:35 PM

Re: Leak in Music type Asset (iOS)

I tried fixing the memory leak in project/iPhone/Sound.mm by adding an autorelease pool to AVAudioPlayer like you did in OpenAL. Unfortunately, no matter what I do I cannot get the changes to appear in my project. Obviously I am misunderstanding the build process. Do I need to rebuild NME itself?

I'd like to submit this as a bug and if I get it working on my end then I can submit the changes but I do not know where you are tracking bugs now.

Any help is much appreciated!

Posted on January 23, 2013 at 10:49 AM

Leak in Music type Asset (iOS)

I have in my application.nmml a directory of music assets. I set them as type "music".





I get this error each time a new music track starts playing:


Object XXXXXX of class NSURL autoreleased with no pool in place - just leaking - break on objc_autoreleaseNoPool() to debug


If I switch the type to "sound", I no longer get the leak, but then the music never stops playing and starts looping over itself in odd ways.

I am running NME 3.4.2 on iOS 5.1

Posted on January 21, 2013 at 11:43 PM

Re: Slowdown after Resume from Background

I have found the source of this issue, and it's not NME. In Xcode, I was compiling in debug mode. If I compile for release this doesn't happen. Yay!

Posted on December 07, 2012 at 10:33 AM

Re: ios 6 blank screen

I was able to fix this problem by editing my ApplicationMain.hx file and replacing two occurrences of nme.events.Event.RESIZE with nme.events.Event.ENTER_FRAME.

ADDED_TO_STAGE did not work.

This is a concern of mine because now NME will not work correctly out of the box. Is this considered a bug that needs to be fixed? The reason I ask is that there was a mention of "NME project template" and I wasn't aware of a choice.

Thanks!

Posted on December 06, 2012 at 10:16 PM

Re: Build Fails with Latest Xcode

Just saw the huge Xcode 4.5 thread in Installing NME. I guess this falls under that issue.

Posted on October 30, 2012 at 11:00 PM

Re: Build Fails with Latest Xcode

build seems to work with 3.4.4 but SQLite fails. I'm looking into it, but I'm now going back to 3.4.3, which seems to be building successfully.

Posted on October 30, 2012 at 9:37 PM

Build Fails with Latest Xcode

I updated XCode to the latest version and tried a clean build of my project, and got these errors:


sh: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/clang++: No such file or directory
Called from ? line 1
Called from BuildTool.hx line 1265
Called from BuildTool.hx line 554
Called from a C function
Called from BuildTool.hx line 591
Called from BuildTool.hx line 710
Called from BuildTool.hx line 739
Called from BuildTool.hx line 153
Uncaught exception - Error creating pch: 32512 - build cancelled
cp build/Release-iphoneos/ApplicationMain.iphoneos.a ../lib/armv6/libApplicationMain.a
cp: build/Release-iphoneos/ApplicationMain.iphoneos.a: No such file or directory
make: *** [build-haxe-armv6] Error 1


** BUILD FAILED **


The following build commands failed:
ExternalBuildToolExecution "Build Haxe"


I am currently running 3.4.2 and am having trouble upgrading:


Checking actuate
std@host_resolve
Checking gm2d
std@host_resolve
Checking hxcpp
std@host_resolve
Checking jeash
std@host_resolve
Checking nme
std@host_resolve
Checking sqlite
std@host_resolve
Checking swf
std@host_resolve


Is lib.haxe.org gone?

Posted on October 30, 2012 at 8:57 PM

Re: GradientType.Radial is linear on mac target

I am seeing this problem on the iOS target as well.

Posted on October 17, 2012 at 2:17 PM

Re: pre-load sounds?

I am running into the same issue. Does anyone have any insight into this?

Posted on October 12, 2012 at 5:23 PM

Re: Threading and Sound Playback.

I figured out why my thread wasn't receiving messages. The first readMessage must have a block.

soundName = Thread.readMessage(false);

... should be ...

soundName = Thread.readMessage(true);

But... unfortunately there's still an annoying pause right before the sound plays for the first time. I would think that since this is in a separate thread that the game playback would not pause at all. Anyone have any clues as to how to get sound to play without any pause?

One other thing to note is that when I switched from mp3 to wav, the pause is less noticeable, but still a problem.

Posted on October 10, 2012 at 7:26 PM

Threading and Sound Playback.

There was a noticeable pause in my game each time a sound played for the first time, so I decided to add a Sound Manager to handle threaded playback on systems that support it. I am getting some weird issues though.

The first is this error every time a sound plays back:

Object XXXXXX of class NSURL autoreleased with no pool in place - just leaking - break on objc_autoreleaseNoPool() to debug

Here is the code for my Sound Manager:


package com.sploder.common;

import nme.Assets;
import nme.media.Sound;

#if !flash
import cpp.vm.Thread;
#end


/**
* ...
* @author
*/

class SoundManager
{
private static var mainInstance:SoundManager;

public static var default_format:String = "mp3";

#if !flash
private var _thread:Thread;
#end

public function new ()
{
}

public static function playSound (soundName:String):Void
{
if (mainInstance == null) mainInstance = new SoundManager();

mainInstance.queueSound(soundName);
}

public function queueSound (soundName:String):Void
{
#if !flash
if (_thread == null) {
trace("creating new thread...");
_thread = Thread.create(onThreadMessage);
}
_thread.sendMessage(soundName);
trace("sending sound thread this message: " + soundName);
#else
doPlayback(soundName);
#end
}

public function onThreadMessage ():Void
{
trace("Thread message!");

var soundName:String = null;

#if !flash
soundName = Thread.readMessage(false);

while (soundName != null)
{
trace("checking for sound request...");
trace("SOUND PLAYBACK REQUEST: " + soundName);
doPlayback(soundName);
soundName = Thread.readMessage(false);
}

_thread = null;
#end
}

private function doPlayback (soundName:String):Void
{
var sound:Sound = Assets.getSound("assets/sounds/" + soundName + "." + default_format);
sound.play();
}

}


The second issue is that if I remove or comment out the trace statements, the thread never calls the callback function. At least it doesn't call it before the message is sent.

Posted on October 10, 2012 at 6:19 PM

Re: Horrible 3.4.4 Error

Did you try a clean build? If that doesn't work, try deleting the entire bin/ios folder and rebuild the Xcode project.

Posted on October 03, 2012 at 7:12 PM

Re: Fail to BitmapData.draw graphics generated with DrawTiles

I am running into a similar problem. It seems that on mobile targets, using Bitmapdata.draw on sprites with drawTiles and RGB flags render without RGB flags.

Posted on September 27, 2012 at 6:57 PM
« Previous123456...8Next »