Profile

Member Since
January 21, 2012

Search Members

  

neurofuzzy

151
@

Badges

This user hasn't earned any badges yet.

Posts

Viewing 61 to 80 (151 Total)

Re: Android Framerate Drops on Touch

A little more info. I tried the user-created patch from this threadhttp://www.haxenme.org/community/forums/general-discussion/fps-drop...

Unfortunately it had no effect on my performance. Oddly, my B&N Nook does not exhibit this behavior.

Any suggestions would be greatly appreciated.

Posted on May 23, 2012 at 7:50 PM

Android Framerate Drops on Touch

I am now testing my game engine on my phone - an LG Optimus S. The performance is great for an older phone. I get about 30-40 fps.

The weird thing is, if I am touching the screen anywhere, the framerate drops to about 10fps. It doesn't matter where I touch the screen. Even if there's no button there, as long as my finger is touching the screen the framerate remains a slow 10fps. Once I remove my finger, the framerate resumes at the normal 30-40fps.

Has anyone else run into this? What could be causing it? Is there something I can do to eliminate this problem?

Posted on May 23, 2012 at 6:20 PM

More iOS Device Orientation Problems

I've been working in landscape mode, but recently switched my app to portrait mode. Here's what I did

1. In application.nmml changed window orientation="landscape" to window orientation="portrait"
2. Cleaned and rebuilt my iOS app at the command line.
3. Opened the Xcode project, checked the info.plist to make sure both portrait orientations were supported
4. Xcode->run on the device.

The problem is, it works fine when it starts up, but then if the device is tilted, it will snap to a landscape orientation. Once that happens, it will only rotate between the two landscape orientations and not the portrait orientations.

It's as if the initial orientation is being set to portrait, but then somewhere along the line, the supported interface orientations are being switched back to landscape-only.

Can someone please verify this bug and give me advise on how to work around it or fix it?

Thanks!

Posted on May 22, 2012 at 7:51 PM

Re: What is the Lib Class in nme package?

I also use nme.Lib.getTimer() quite a bit. smiling

Posted on May 22, 2012 at 12:36 PM

Alter existing tiles drawn with Tilesheet?

I was wondering if there was a way to alter the texture coordinates in a tile or to change the size/shape of existing tiles drawn with a tilesheet without clearing and redrawing tiles.

The reason I ask is that I've noticed it seems to be rather expensive to add sprites to my view and also to redraw their contents. I was thinking that if I kept a pool of sprites off-screen and reused them, I may get some performance increase. But, I may need to alter their appearance if they have different properties. Since they all share the same texture atlas, it would just be a matter of altering the vertex and uvt coordinates and I'd have my new sprite.

Thanks!

Posted on May 21, 2012 at 2:36 AM

Re: Dynamic Sound Generation

Wow! That's awesome. I can't wait to give it a try once I get to that point in my project.

Posted on May 21, 2012 at 2:30 AM

Re: Android Build Failed

I went in to haxelib and manually deleted the hxcpp folder. I then reinstalled fresh and it works now. Thanks!

Posted on May 18, 2012 at 1:36 AM

Re: Rune Raiders now available for Windows and Flash

Very nice game! Love the graphics, gameplay, sound and music. It's really well-produced.

Question - on Flash the text has slight alignment problems... is this a limitation of NME's text handling?

Posted on May 17, 2012 at 12:49 PM

Android Build Failed

I've tried building my project for Android with NME 3.3.2 and hxcpp 2.0.9 and I get this error:

I've updated haxelib and deleted my bin/android folder.

---

haxelib run hxcpp Build.xml haxe -Dandroid -Dcpp -Dhaxe_209 -Dmobile -Dnme -Dnme_install_tool -Dsys -Dtrue
mkdir obj
mkdir obj/android
mkdir obj/android/src
mkdir obj/android/src/sys
mkdir obj/android/src/sys/io
mkdir obj/android/src/sys/io/_Process
mkdir obj/android/src/sys/_FileSystem
mkdir obj/android/src/nme
mkdir obj/android/src/nme/installer
mkdir obj/android/src/neash
mkdir obj/android/src/neash/utils
mkdir obj/android/src/neash/ui
mkdir obj/android/src/neash/text
mkdir obj/android/src/neash/system
mkdir obj/android/src/neash/net
mkdir obj/android/src/neash/media
mkdir obj/android/src/neash/geom
mkdir obj/android/src/neash/filters
mkdir obj/android/src/neash/events
mkdir obj/android/src/neash/errors
mkdir obj/android/src/neash/display
mkdir obj/android/src/haxe
mkdir obj/android/src/haxe/io
mkdir obj/android/src/cpp
mkdir obj/android/src/cpp/zip
mkdir obj/android/src/cpp/rtti
mkdir obj/android/src/com
mkdir obj/android/src/com/sploder
mkdir obj/android/src/com/sploder/util
mkdir obj/android/src/com/sploder/common
mkdir obj/android/src/com/sploder/arcade
mkdir obj/android/src/com/sploder/arcade/game
mkdir obj/android/src/com/sploder/arcade/game/view
mkdir obj/android/src/com/sploder/arcade/game/model
mkdir obj/android/src/com/sploder/arcade/game/controller
mkdir obj/android/src/com/sploder/arcade/app
Creating hxcpp.h.gch...
arm-linux-androideabi-g++ -Iinclude --sysroot=D:\Development\AndroidNDK/platforms/android-5/arch-arm -ID:\Development\AndroidNDK/sources/cxx-stl/gnu-l
ibstdc++/include -ID:\Development\AndroidNDK/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include -ID:\Development\hxcpp_dev//include -Iinclude -fpic -f
visibility=hidden -ffunction-sections -funwind-tables -fstack-protector -fno-short-enums -D__ARM_ARCH_5__ -D__ARM_ARCH_5T__ -D__ARM_ARCH_5E__ -D__ARM_
ARCH_5TE__ -D_LINUX_STDDEF_H -Wno-psabi -march=armv5te -mtune=xscale -msoft-float -fomit-frame-pointer -fexceptions -fno-strict-aliasing -finline-lim
it=10000 -DANDROID -Wa,--noexecstack -O2 -DNDEBUG -c -frtti -o hxcpp.h.gch D:\Development\hxcpp_dev//include/hxcpp.h
arm-linux-androideabi-g++ -I. -Iinclude --sysroot=D:\Development\AndroidNDK/platforms/android-5/arch-arm -ID:\Development\AndroidNDK/sources/cxx-stl/g
nu-libstdc++/include -ID:\Development\AndroidNDK/sources/cxx-stl/gnu-libstdc++/libs/armeabi/include -ID:\Development\hxcpp_dev//include -Iinclude -fpi
c -fvisibility=hidden -ffunction-sections -funwind-tables -fstack-protector -fno-short-enums -D__ARM_ARCH_5__ -D__ARM_ARCH_5T__ -D__ARM_ARCH_5E__ -D__
ARM_ARCH_5TE__ -D_LINUX_STDDEF_H -Wno-psabi -march=armv5te -mtune=xscale -msoft-float -fomit-frame-pointer -fexceptions -fno-strict-aliasing -finline
-limit=10000 -DANDROID -Wa,--noexecstack -O2 -DNDEBUG -c -x c++ -frtti ./src/sys/io/Process.cpp -oobj/android/src/sys/io/Process.obj
./src/sys/io/Process.cpp:138: error: prototype for 'Dynamic sys::io:tongue outrocess_obj::__Field(const String&, bool)' does not match any in class 'sys::io::
Process_obj'
include/sys/io/Process.h:28: error: candidate is: virtual Dynamic sys::io:tongue outrocess_obj::__Field(const String&)
./src/sys/io/Process.cpp:166: error: prototype for 'Dynamic sys::io:tongue outrocess_obj::__SetField(const String&, const Dynamic&, bool)' does not match any
in class 'sys::io:tongue outrocess_obj'
include/sys/io/Process.h:28: error: candidate is: virtual Dynamic sys::io:tongue outrocess_obj::__SetField(const String&, const Dynamic&)
Called from ? line 1
Called from BuildTool.hx line 1135
Called from BuildTool.hx line 501
Called from BuildTool.hx line 538
Called from BuildTool.hx line 657
Called from BuildTool.hx line 690
Called from BuildTool.hx line 200
Uncaught exception - Error : 1 - build cancelled
Error : Build failed

Posted on May 17, 2012 at 1:32 AM

Dynamic Sound Generation

According to the NME blog, the latest version of NME supports dynamic sound generation on SDL targets.

Is iOS an SDL target?
Are there plans to add that support to all targets?

Posted on May 16, 2012 at 2:11 PM

Re: Lambda.has on cpp targets

Thank you! I'll give it a try.

Posted on May 14, 2012 at 12:24 AM

Re: Lambda.has on cpp targets

Hmm... so I wrote my own comparison function and it works. Evidently, testing equality with the default == isn't kosher for objects on cpp targets.

Posted on May 11, 2012 at 7:12 PM

Lambda.has on cpp targets

I have an Array and I am checking to see if it contains an object before I remove it. It works fine in Flash, but on iOS Lambda.has always returns false, and Lambda.indexOf always returns -1. But, the object is contained in the array.

if (Lambda.has(items, item))
{
items.remove(item);
return true;
}
return false;

So, the item is removed in Flash, but not on iOS. Is there anyone who knows why Lambda.has does not work?

Posted on May 11, 2012 at 7:00 PM

SWF background color - application.nmml

Has the application.nmml spec changed with 3.3.2 with regards to background color?

I've recently upgraded to 3.3.2 and noticed that my SWF background color is white no matter what I set in application.nmml. I'm publishing from FlashDevelop.

<?xml version="1.0" encoding="utf-8"?>
<project>
<!-- metadata, make sure 'package' is at least 2 segments (ie. com.myproject) -->
<app file="Arcade" title="Arcade" main="com.sploder.arcade.Main" package="com.sploder.arcade"
version="1.0.0" company="Geoff" ></app>

<!-- output -->
<window width="640" height="480" fps="60" background="0x000000" orientation="landscape" resizable="true" ></window>
<set name="BUILD_DIR" value="bin" ></set>
<set name="SWF_VERSION" value="10.1" ></set>


<!-- classpath, haxe libs -->
<classpath name="src" ></classpath>
<haxelib name="nme" ></haxelib>
<haxedef name="fdb" if="target_flash" ></haxedef>

<!-- assets -->
<icon name="assets/nme.svg" ></icon>
<assets path="assets" include="*" exclude="nme.svg" ></assets>

<!-- DLLs -->
<ndll name="std" ></ndll>
<ndll name="regexp" ></ndll>
<ndll name="zlib" ></ndll>
<ndll name="nme" haxelib="nme" ></ndll>

<!-- Windows app: hide console -->
<!--<setenv name="no_console" value="1" ></setenv>-->
</project>

Posted on May 10, 2012 at 11:38 AM

Re: Application Did Enter Background?

To what object to I addEventListener? The Lib.current.stage?

Posted on April 17, 2012 at 4:18 PM

Application Did Enter Background?

Hi! I have run into a problem on iOS whereby my game movement, based on Lib.getTimer(), will lurch forward when the application is restored from the background. My question is this: Is there a way to receive events when an application enters the background and is restored from the background? I'd like to be able to pause the game, marking the time at pause and then subtract the interval that the game was in the background.

Actually, an ideal situation would be that getTimer not advance while in the background, but I'm not sure of the ramifications of that.

Posted on April 17, 2012 at 2:20 PM

Re: Using actuate to color tint bitmaps only works on flash target

You could use Tilesheet instead, which supports color. But, color does not work in Flash... so, perhaps you could use Tilesheet for all other targets.

Posted on April 11, 2012 at 6:42 PM

Question about haxelib update

I was previously testing the 3.3.0 beta, but switched back to 3.2.0 for production. Today I installed 3.3.0 via "haxelib upgrade."

I was running into all kinds of issues, so then I decided to reinstall from the installer from the blog post. Now everything seems right as rain.

So, when I did "haxelib upgrade" and it asked me if I wanted to change nme to 3.3.0, I'm thinking it just switched back to the beta instead of pulling down the latest version from haxelib. Am I correct?

Posted on April 10, 2012 at 7:44 PM

App Uninstalled Itself

I think I must be losing my mind. I've just upgraded haxelib to NME 3.3.0 and hxcpp 2.0.9, and well, it's rather unstable. My app just uninstalled itself after freezing up. I didn't even think this was possible. Anyone else run into this?

Posted on April 10, 2012 at 6:13 PM

Access to DisplayObject color as in TileSheet?

I have objects that move around the screen on top of a TileSheet background. The TileSheet simulates shading using the color attribute for each tile. I would like to match the moving object with the current tile so that it appears to be within the space. Is there a way to access a displayobject's color (like a ColorTransform) so I can simply set that? Would ColorTransform work the same way? I would assume that it would be more expensive to use ColorTransform.

Posted on April 10, 2012 at 3:13 PM