[ 23 posts ] 
Author Message
 Post subject: Easy-to-use project template for building haXe for webOS
PostPosted: Tue Feb 01, 2011 8:54 pm 
User avatar

Joined: Mon Dec 28, 2009 6:46 pm
Posts: 502
Hi everyone!

I have just posted a new (and improved!) version of my webOS project templates for FlashDevelop.

What's included?

  • Palm webOS JS Project
  • Palm webOS HaXe C++ Project

It's really simple! Here's how it works:

  • Open FlashDevelop
  • Create a new project
  • Press F5 or Ctrl+Enter
  • Your new application is running in Flash!

  • Connect your phone
  • Double-click the CPP project
  • Press F5 or Ctrl+Enter
  • Your new application is running on the phone!

The template includes two different projects. The first project compiles to Flash, and the second compiles as a C++ PDK application, and installs and runs it on your phone.

The project automatically reads values from your appinfo.json file. If you update the version number of your application, or you change the application ID, it will still and install and run just fine. It will also copy (almost) all of the files out of your Export folder, so if you have supporting images, fonts, sounds or other assets, drop them in and they will automatically be bundled with your application.

Installation of the template is easy.


If you don't have haXe or the hxcpp-webos libraries installed, there's a few more things you'll need to install. Further instructions can be found in the previous "How to get started with haXe 2.06 and the webOS PDK" thread.

I've updated haXe project template and hxcpp-webos libraries for haXe 2.07, using improvements made in the original HXCPP and Neko NME libraries which make this all possible. So far things are stable, but let me know if you run into any problems.

I'll be posting a series of code share threads soon, detailing how to do some common tasks like showing images, playing sounds, using fonts, accessing accelerometer data or keyboard input.

You can also read a more about the JS project template by jumping over to the Javascript forums, here.


UPDATE:

I've just posted a "HaXe Hello World" project which you can download, here.


UPDATE (2):

I've also just posted several threads that may be helpful:

Code share: Using Actuate for great animation (haXe)
Code share: Loading bitmaps (haXe)
Code share: Adding sound to your project (haXe)
Code share: Using SQLite databases (haXe)
Code share: Working with ZIP files (haXe)
Code share: Using multiple application threads (haXe)

_________________
Joshua Granick
Developer Relations


Last edited by singmajesty on Wed Feb 09, 2011 12:53 am, edited 4 times in total.

Top
 Profile  
 
 Post subject: Re: Easy-to-use project template for building haXe for webOS
PostPosted: Tue Feb 01, 2011 10:32 pm 

Joined: Fri Oct 01, 2010 7:07 pm
Posts: 1210
This is looking really nice. It's that easy to get it set up? I'll have to try it.

_________________
Grav - Canvas-based Gravity Simulation
TouchFeeds - Google Reader client in Enyo
chuq wrote:
because until something is actually announced, it doesn't exist


Top
 Profile  
 
 Post subject: Re: Easy-to-use project template for building haXe for webOS
PostPosted: Wed Feb 02, 2011 5:16 pm 

Joined: Fri Aug 21, 2009 9:24 pm
Posts: 141
Great to see you around sing!

haXe is easy to use and I really enjoy coding for it and sing has done an amazing job of getting it pretty seamless for webOS, so anyone "looking into it" should just jump in!

sing - what are the main differences between this new template and the older one?


Top
 Profile  
 
 Post subject: Re: Easy-to-use project template for building haXe for webOS
PostPosted: Wed Feb 02, 2011 5:32 pm 
User avatar

Joined: Mon Dec 28, 2009 6:46 pm
Posts: 502
JS Project

  • The scripts have been improved to automatically read appinfo.json, similar to the HaXe C++ Project
  • The "generate.bat" script has been renamed "RUN_ME.bat", and will delete itself after it is run
  • Added "Assets" folder for consistency

HaXe C++ Project

  • Binaries have been updated for haXe 2.07
  • Font render quality has been improved dramatically
  • zlib is now supported (required for compression)
  • Added "fonts" folder to make it easier to use custom fonts

_________________
Joshua Granick
Developer Relations


Top
 Profile  
 
 Post subject: Re: Easy-to-use project template for building haXe for webOS
PostPosted: Mon Feb 07, 2011 11:45 pm 
User avatar

Joined: Mon Dec 28, 2009 6:46 pm
Posts: 502
I've posted a new version of the hxcpp-webos repository, and accordingly, an updated version of the project templates.

New Features

  • Added support for SQLite databases

Improvements

  • Fixed a bug in alpha blending
  • Reduced CPU consumption when in card view
  • Simplified the default stage settings

_________________
Joshua Granick
Developer Relations


Top
 Profile  
 
 Post subject: Re: Easy-to-use project template for building haXe for webOS
PostPosted: Tue Feb 08, 2011 7:55 pm 
User avatar

Joined: Mon Dec 28, 2009 6:46 pm
Posts: 502
I just posted another version to the repository and made a small change to the project template.

New Features

  • Added support for ZIP archives

Improvements

  • TextField.wordWrap no longer sends commas, periods, quotation marks, exclamation marks, colons and semi-colons to the next line when they are adjacent to a word
  • The SQLite and ZIP classes have been moved to the "hxcpp" library for consistency. Pre-existing projects will need "hxcpp" to be added to Project > Project Properties > Libraries or "-lib hxcpp" from the command line. It has been added to the project template


How to Install Updates

  • Update hxcpp-webos from SVN
  • Install the latest project template (Optional)
  • Update nme.so, regexp.so, sqlite.so, std.so and zlib.so

You can find the latest versions the *.so library files by either creating a new project with the newest project template, and copying from the Export directory, or from ../nekonme/ndll/webOS and ../hxcpp/bin/webOS inside your copy of the hxcpp-webos repository.

_________________
Joshua Granick
Developer Relations


Top
 Profile  
 
 Post subject: Re: Easy-to-use project template for building haXe for webOS
PostPosted: Thu Feb 10, 2011 1:44 am 

Joined: Fri Aug 21, 2009 9:24 pm
Posts: 141
Sing -
I noticed that the nme.so file is now 5 megs compared to the previous 1.5 megs. Is this intentional? Or do I have incorrect versions of the so files?

I got them by downloading the new templates and then creating a new project and pulling them from the export folder.


Top
 Profile  
 
 Post subject: Re: Easy-to-use project template for building haXe for webOS
PostPosted: Thu Feb 10, 2011 2:04 am 
User avatar

Joined: Mon Dec 28, 2009 6:46 pm
Posts: 502
I was distributing the NME shared library without debugging symbols before, but now I'm leaving them in. When you build your project these are stripped from the binary, so the file size drops back down to 1.5 MB.

Your application is the same size at the end of the day, but if you're ever trying to debug underlying C code (like I am nowadays), those symbols are still present so you can get better feedback when you're trying to troubleshoot something.

_________________
Joshua Granick
Developer Relations


Top
 Profile  
 
 Post subject: Re: Easy-to-use project template for building haXe for webOS
PostPosted: Thu Feb 10, 2011 2:05 am 

Joined: Fri Aug 21, 2009 9:24 pm
Posts: 141
Awesome, great! I noticed you fixed the alpha issue as well. Nice!


Top
 Profile  
 
 Post subject: Re: Easy-to-use project template for building haXe for webOS
PostPosted: Thu Feb 17, 2011 9:27 pm 

Joined: Fri Aug 21, 2009 9:24 pm
Posts: 141
Sing,
Just curious if you had put any thought into how we could run adMob or something similar in a haXe app?
Thanks!


Top
 Profile  
 
 Post subject: Re: Easy-to-use project template for building haXe for webOS
PostPosted: Thu Feb 17, 2011 9:33 pm 
User avatar

Joined: Mon Dec 28, 2009 6:46 pm
Posts: 502
I just visited AdMob ... under "Emerging Platforms" they say that they have a beta SDK for Flash Lite. It might be possible to get that working under haXe, particularly if they provide source code and not just a SWF.

_________________
Joshua Granick
Developer Relations


Top
 Profile  
 
 Post subject: Re: Easy-to-use project template for building haXe for webOS
PostPosted: Thu Feb 17, 2011 10:29 pm 

Joined: Fri Aug 21, 2009 9:24 pm
Posts: 141
Hm..... mochi ads are made for flash... interesting....


Top
 Profile  
 
 Post subject: minimize card view
PostPosted: Mon May 09, 2011 10:28 pm 

Joined: Mon Aug 24, 2009 5:16 am
Posts: 11
been working on a webos game, great api, interface etc, got through many hurdles, thank you for lots of hard work

i have a timer event for updating game pacing etc, and when the app is minimized the app does not redraw, but it seems the timer is still running.

when the app is maximized again the timer is off and the app seems to jump alot.

is there an interface to listen for card changes and pause the timer accordingly?

Mike
http://www.NachoFries.com

_________________
Michael R. Bernstein
http://www.nachofries.com
PhotoPoint, FKO alpha + more on the way....


Top
 Profile  
 
 Post subject: Re: Easy-to-use project template for building haXe for webOS
PostPosted: Tue May 10, 2011 2:55 am 
User avatar

Joined: Mon Dec 28, 2009 6:46 pm
Posts: 502
Hi mrb1778,

That sounds great! I would love to see your application when you are ready to share it.

There should be an event for when the application goes to sleep, but I haven't wired one up. I am planning on getting back into hxcpp-webos again soon to take care of some of these loose ends to polish it off.

In my applications I detected when the game was minimized by listening for Event.ENTER_FRAME, then comparing time between frames to determine the frame rate of the application. When the application sleeps, it slows down to approximately 1 frame-per-second. If you find that the application has slowed down this far for a frame or two, then you can basically assume that it is sleeping, so you can pause the timer and stop your rendering. Once the frame rate picks up, you can resume the game, possibly adding a little bit of extra time to make up for the time the user lost during the process.

_________________
Joshua Granick
Developer Relations


Top
 Profile  
 
 Post subject: sounds great, thank you
PostPosted: Tue May 10, 2011 10:36 pm 

Joined: Mon Aug 24, 2009 5:16 am
Posts: 11
this sounds great will try it and let you know.

the physaxe library is a great help in building immersive environments, once you get around the lack of documentation.

thanks for all the great help,
mike

_________________
Michael R. Bernstein
http://www.nachofries.com
PhotoPoint, FKO alpha + more on the way....


Top
 Profile  
 
 Post subject: Re: Easy-to-use project template for building haXe for webOS
PostPosted: Thu May 19, 2011 9:32 pm 

Joined: Mon Aug 24, 2009 5:16 am
Posts: 11
that worked pefectly thank you, now i use the ENTER_FRAME for minimization timeout check and the timer for game synchronization, works perfectly thank you.

if you wold like to try my game send me a private message and i will shoot you a link to the ipk. still in beta, but progressing smoothly

_________________
Michael R. Bernstein
http://www.nachofries.com
PhotoPoint, FKO alpha + more on the way....


Top
 Profile  
 
 Post subject: Re: Easy-to-use project template for building haXe for webOS
PostPosted: Mon Sep 05, 2011 5:25 am 

Joined: Sat Sep 03, 2011 10:00 pm
Posts: 12
This stuff looks great... except that I can't get the CPP project to actually run. I get:

error: 64-bit java is required.
Build halted with errors.

after the palm-package step.

I do have 64-bit Java installed, so I have no idea why this is coming up. Obviously, I'm developing in Win7 x64. The palm-package script has worked fine for me with a mojo app I developed.

java version "1.6.0_21"
Java(TM) SE Runtime Environment (build 1.6.0_21-b07)
Java HotSpot(TM) 64-Bit Server VM (build 17.0-b17, mixed mode)

Any ideas? I'd love to get this all working so I can finally start moving forward on my Touchpad app, and my son is interested in developing, and Flash would be a good starting point for him.

UPDATE: Strange issue, but after going to the haxenme.org web site, I downloaded the WORKING actuate example, and that works great.

It would be nice to have a slightly deeper template using the actuate example build files... preferably, a "hello world" app better suited for modification.

What I've learned is that while haxe/nme looks great for development, getting up to speed with it has been an adventure because of outdated info, multiple sites, and multiple downloads of working/non-working (incomplete) examples. I look forward to seeing better tutorials down the road.

Another great help would be a tutorial on packaging an app developed with haxe/nme for commercial sale (i.e. what we, as developers, need to do to satisfy licensing requirements to sell our apps on the mobile markets)


Top
 Profile  
 
 Post subject: Re: Easy-to-use project template for building haXe for webOS
PostPosted: Wed Sep 07, 2011 12:12 am 
User avatar

Joined: Mon Dec 28, 2009 6:46 pm
Posts: 502
Hi LeeLorenzSr,

I am a contributor on http://www.haxenme.org, so I am trying to consolidate to make that the "source of truth" for how things work. Your feedback is very helpful, because I want to make sure to include enough documentation, tutorials and examples that no one has to feel stranded.

If you do run into specific questions or issues, the forums should be a good place where I or someone else will be able to help you.

The biggest change between these project templates (which are currently out-of-date) and the updated build process is that the packaging/build process used to be managed individually. Now, there is an installer tool which can handle it all automatically. Particularly for going cross-platform, that tool makes things much easier.

Here is another template which is more "bare bones," but when I have a chance I should create a true FlashDevelop project template (like these) which you can use to create new project files without editing names or references.

http://joshuagranick.com/code/haxe/NMETemplate.zip

The difference between an application packaged with the NME install tool and one you can submit to an application store depends on which store you are targeting.

There is nothing more you need to do to submit your application to the webOS App Catalog. Just submit. For Android or iOS, you will need to include your own certificate (instead of an empty, dev certificate), but otherwise those packages are good to go as well.

If you want to publish on Facebook, the Mac App Store, Ubuntu Marketplace, Chrome App Store, or try for services like Steam or Desura, you will have to package for those stores. Lastly, if you want to publish to Blackberry App World for the Playbook, you will need to publish as Flash and then publish as AIR. Currently that is much slower than the native applications NME creates for iOS, webOS and Android, but I don't think (not sure) there is a solid C++ path for BlackBerry

_________________
Joshua Granick
Developer Relations


Top
 Profile  
 
 Post subject: Re: Easy-to-use project template for building haXe for webOS
PostPosted: Wed Sep 07, 2011 9:11 pm 

Joined: Sat Sep 03, 2011 10:00 pm
Posts: 12
Thanks for the thoughtful reply. I do like Haxe as a multi-platform tool, and it's taken a few days, but I'm getting my game ported from Mojo into Haxe. I've taken a few side trips to enhance it, as well as bang my head against a brick wall or two.

I'll probably post up the skeleton of my game as a starting point for others, along with some practical samples of code left in so others don't have to hunt too much. That includes some matrix manipulation stuff which will be handy for anybody who wants to go crazy with sprites.

I can see my next several projects will be using Haxe/NME.


Top
 Profile  
 
 Post subject: Re: Easy-to-use project template for building haXe for webOS
PostPosted: Wed Sep 07, 2011 10:04 pm 
User avatar

Joined: Mon Dec 28, 2009 6:46 pm
Posts: 502
Thanks again for the feedback,

It encouraged me to go ahead and create a FlashDevelop project template for now. It should make it simpler to create a new project using NME, since you can select "NME Project" from the list, and it will populate values based on the project name and package name you select.

I've added it at the end of the "Get Started" page:

http://www.haxenme.org/developers/get-started/

That would be great! I would love to see what you have. There definitely need to be some new tutorials posted, to cover important topics. Matrix graphic manipulation would be a great intermediate or advanced topic

_________________
Joshua Granick
Developer Relations


Top
 Profile  
 
 Post subject: Re: Easy-to-use project template for building haXe for webOS
PostPosted: Thu Sep 08, 2011 9:41 pm 

Joined: Tue Aug 30, 2011 1:31 am
Posts: 7
Hi singmajesty,

Im Will Townsend, the guy that's been asking you for help on your blog (thanks for that by the way!).

I am extremely thankfull for what you have posted on the net about HaXe + NME, and would be keen to write a few guides for others. When I have some spare time, and figure out how to get Box2D + HaXe + NME working on WebOS...


Top
 Profile  
 
 Post subject: Re: Easy-to-use project template for building haXe for webOS
PostPosted: Fri Sep 09, 2011 5:45 pm 
User avatar

Joined: Mon Dec 28, 2009 6:46 pm
Posts: 502
Sure! I am very glad that I have been able to help!

I would love to see what you come up with.

I'm using Box2D in Hoops, so I know it should be possible, but uses an older API (before version 2?) so not all tutorials were compatible. If I have time, I would like to probably create a new Box2D port, that uses the latest sources.

_________________
Joshua Granick
Developer Relations


Top
 Profile  
 
 Post subject: Re: Easy-to-use project template for building haXe for webOS
PostPosted: Sat Sep 10, 2011 2:00 am 

Joined: Tue Aug 30, 2011 1:31 am
Posts: 7
As I have said, I managed to get it to build, and run on the device, but collisions don't work at all. I've uploaded a video to show you what I mean... http://wtsnz.com/box2dwebos.MOV

The plank falls, then slows ever so slightly as it goes through the ground... Any ideas?
(Compiled to flash, this test works perfectly..)

Would it be possible for you upload a copy of your Box2D port so I could try it out?

Thanks.


Top
 Profile  
 
Display posts from previous:  Sort by  
   [ 23 posts ] 


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron