Author Topic: flixel-android 0.2 released  (Read 8659 times)

Wing Eraser

  • Guest
flixel-android 0.2 released
« on: Thu, Nov 3, 2011 »
DOWNLOAD

http://www.wingeraser.com/flixelandroid/flixel-android.apk


Source: https://code.google.com/p/flixel-android/
Zip download available.


It's been awhile since I worked on flixel-android. So I’ve pick it up again. Now flixelA supports OpenGL and there is no memory corruption anymore.
So what’s the big deal? I’ve done reading about OpenGL ES less than a month. I bought this book: Beginning Android Games by Mario Zechner. Mario is the developer of libgdx OpenGL framework. I’ve use libgdx to get OpenGL ES on flixelA. I’ve work a month plus couple days on flixelA and the following classes are done, well there are still missing features…

- FlxBasic done
- FlxButton, sound missing
- FlxCamera, this was one big hell to get the multiple cameras support working. The splitscreen is working, but the result is not like the flixel one. So I’ve decided to drop it. There is also no fading and flash, but shake works. Google for “OpenGL Camera” for information and think hard why the missing features aren’t implemented.
FlxEmitter, custom particle missing
FlxG, the most important thing are there.
FlxGame, well, the rendering stuff, etc.
FlxGroup, no sorting.
FlxSound and FlxMusic. The differents, FlxSound is loaded to the RAM and FlxMusic streams from the (internal or external) storage. A lot of features are missing, due the lack of features of Android API itself. FlxMusic can do fadeIn and fadeout.
FlxObject, no followpath.
FlxParticle, done
FlxPath, nothing
FlxPoint, done
FlxRect, done
FlxSprite, no brush
FlxState, it’s an abstract class now. People always forget to put the code in the create(). Now you’ll be forced heaving a create() method inside every FlxState.
FlxText, I wouldn’t even called it Text anymore. The name FlxBitmapFont is better. I just made it simple for showing text only.
FlxTileBlock…it doesn’t create random blocks, because I can’t do copypixels. So it’s not working.
FlxTilemap, nothing. Libgdx supports tmx.
FlxU, everything
FlxAnim, done
FlxList, done
FlxQuadTree, done

The input
- Input, done
- Keyboard, done
- Touch (Mouse), done
Keyboard is turned off in the demos. I can’t let two InputAdapter run simultaneous. It will override the other one.


Demo explanation
There are demos from the official flixel website. The creators got credit in the code (PlayState).
All demos are landscape and are set on 60fps. The resolution is 480x320.
It's based on flixel v2.55.


Animation
I don’t own any sprites and I can’t use copyrighted sprites. I just borrowed from Adam and zanardi gave me a zombie sprite. So if you can provide me some sprites then I’ll put the whole screen full of sprites to test the performance. PM me. So the this will be piece of cake with so less sprites on screen.

Collision
300 particles spawns every 0.025s. This could be heavy on weaker phones.

Particles
Gravity and collision. The performance should be ok. 200 particles spawns every 0.01s.

Thousand Particles
Yes there are thousands of them. All of them are rotating. They won’t reach the bottom, which means all particles are used. This is easy peasy! There is no collision. You’ll get good performance.

Blur
This blur won’t work on my phone HTC Desire HD, neither on LG Optimus p500h and Samsung Galaxy 2. Tell me if it’s working on your phone, the brand and serie.
The performance is easy peasy again.
!! Doesn't work anymore.

Scrolling
A performance hitter for weaker phones. Scroll with your finger on screen.

MultiTouch
Test how many fingers your phone supports. I capped the amount of touches to 10.

DragAndDrop
Single touch, drag some crates.
NOTE: there is a bug in the touch area. The further you go, the more the x-value is increasing. The object is offset.

Audio
Simply test the sound and music.
NOTE: the app will crash when you swith to another demo if you played the music (not the sound). You are warned.




I lied. The fps is not set at 60. So you really though you’re getting 60fps. It is set on 30fps. Libgdx got his own calculation and doesn’t know how flixel handling the drawing. So get that smirk of your face already.


So that’s all folks. I’m way over my budget time. There won’t be much updates. The code will be release soon. Someone else will take care of this. I’m heading back to my work.





« Last Edit: Sun, Nov 6, 2011 by Wing Eraser »

John Hutchinson (Johntron247)

  • Commodore 256
  • Contributor
  • ****
  • Posts: 392
  • Karma: +1/-0
  • I can has lazerz?
    • View Profile
    • Level X Games
Re: flixel-android 0.2 beta apk download
« Reply #1 on: Thu, Nov 3, 2011 »
What version of flixel are you porting?

Wing Eraser

  • Guest
Re: flixel-android 0.2 beta apk download
« Reply #2 on: Fri, Nov 4, 2011 »
What version of flixel are you porting?

Hehe, forgot that detail. It's based on v2.55.

John Hutchinson (Johntron247)

  • Commodore 256
  • Contributor
  • ****
  • Posts: 392
  • Karma: +1/-0
  • I can has lazerz?
    • View Profile
    • Level X Games
Re: flixel-android 0.2 released
« Reply #3 on: Fri, Nov 4, 2011 »
Nice!  Please keep us posted.

Wing Eraser

  • Guest
Re: flixel-android 0.2 released
« Reply #4 on: Sat, Nov 5, 2011 »
FlxCamera
- fade support
- flash support

FlxSprite, FlxText, FlxGame, FlxG, FlxObject
- removed FlxGame - FlxG.camera.draw is not called anymore.
The background will be filled by gl.glClearColor.
This alo means the Blur Demo won't give the blur trace anymore.

Camera Effects Demo is added. A new APK is available for download.

Wing Eraser

  • Guest
Re: flixel-android 0.2 released
« Reply #5 on: Sun, Nov 6, 2011 »
FlxSprite
- removed the Reverse argument in loadGraphic. OpenGL can always flip, so
reversing is not needed.

FlxCamera
- commented out the code creating the background of the camera in the
constructor.


Files are zipped. Document included.


That's it guys. The progress will slowdown for now. Next year I'll continue (or maybe in the weekend). In mean time you guys can help me out, creating patches or something like that.

test84

  • Key Contributor
  • *****
  • Posts: 1328
  • Karma: +0/-0
  • ت
    • View Profile
    • My personal site.
Re: flixel-android 0.2 released
« Reply #6 on: Sun, Nov 6, 2011 »
Very good, keep up the great work.
blog, twitter, Check out my award winning game, Rot Gut:

John Hutchinson (Johntron247)

  • Commodore 256
  • Contributor
  • ****
  • Posts: 392
  • Karma: +1/-0
  • I can has lazerz?
    • View Profile
    • Level X Games
Re: flixel-android 0.2 released
« Reply #7 on: Mon, Nov 7, 2011 »
Ya, definitely keep at it.  If it works well then a lot of people will be interested in this, including myself.  I'm still not happy with Flixel vanilla + AIR when targeting mobile devices, even with AIR3/FP11.  When you get it to a "complete" state I'd love to take it for a test drive and shoot you back some feedback.

Wing Eraser

  • Guest
Re: flixel-android 0.2 released
« Reply #8 on: Tue, Nov 8, 2011 »
The problem is, this is a one men's project. If I could team up with someone got experience in flixel and knows the basic stuff of OpenGL it will help me a lot. Using libgdx you can program flixelapps without learning OpenGL. I've have or libgdx has hid the most nasy things. Look at the source code, you'll see I've use just the minimum of the required classes of libgdx. The rest are still flixel.

Currently I need to study for my work. When I'm studying nothing will stop me for doing that until I achieved my goal.

John Hutchinson (Johntron247)

  • Commodore 256
  • Contributor
  • ****
  • Posts: 392
  • Karma: +1/-0
  • I can has lazerz?
    • View Profile
    • Level X Games
Re: flixel-android 0.2 released
« Reply #9 on: Tue, Nov 8, 2011 »
No pressure and no worries! I'm a one-man team and work+school as well, so I know exactly how hard it is to juggle multiple endeavors and devote time where needed, when needed.  I just wanted to give you a little encouragement, that's all.  Keep up the good work, at your leasure of course. :D

3WG

  • Active Member
  • ***
  • Posts: 110
  • Karma: +0/-0
    • View Profile
    • Jeux.MU
Re: flixel-android 0.2 released
« Reply #10 on: Sun, Nov 13, 2011 »
great news
Flash games are FUN !
Jeux.MU

kimikooxx

  • New Member
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: flixel-android 0.2 released
« Reply #11 on: Sun, Nov 13, 2011 »
First of all, this is awesome! I just started building a game on android using your port  and  is't working brilliantly so thanks! :D

I got some error trying to run the demo on Android Emulator 2.2:

11-14 03:25:28.394: D/Intent Class(330): org.flixel.BlurDemo
11-14 03:25:28.426: W/dalvikvm(330): Exception Ljava/lang/UnsatisfiedLinkError; thrown during Lcom/badlogic/gdx/backends/android/AndroidApplication;.<clinit>
11-14 03:25:28.426: D/AndroidRuntime(330): Shutting down VM
11-14 03:25:28.426: W/dalvikvm(330): threadid=1: thread exiting with uncaught exception (group=0x4001d800)
11-14 03:25:28.454: E/AndroidRuntime(330): FATAL EXCEPTION: main
11-14 03:25:28.454: E/AndroidRuntime(330): java.lang.ExceptionInInitializerError
11-14 03:25:28.454: E/AndroidRuntime(330):    at java.lang.Class.classForName(Native Method)
11-14 03:25:28.454: E/AndroidRuntime(330):    at java.lang.Class.forName(Class.java:235)
11-14 03:25:28.454: E/AndroidRuntime(330):    at java.lang.Class.forName(Class.java:182)
11-14 03:25:28.454: E/AndroidRuntime(330):    at org.flixel.ExampleStarter.onListItemClick(ExampleStarter.java:31)


It cannot find a class, here is the code in ExampleStarter.java:

   protected void onListItemClick(ListView l, View v, int position, long id)
   {
      super.onListItemClick(l, v, position, id);
      String exampleName = examples[position];
      try
      {
         Log.d("Intent Class", "org.flixel." + exampleName + "Demo");
         Class<?> c = Class.forName("org.flixel." + exampleName + "Demo");
         Intent intent = new Intent(this, c);
         startActivity(intent);
      }
      catch (ClassNotFoundException e)
      {
         e.printStackTrace();
      }
   }

Could anyone help how can i solve this problem?
« Last Edit: Sun, Nov 13, 2011 by kimikooxx »

Wing Eraser

  • Guest
Re: flixel-android 0.2 released
« Reply #12 on: Tue, Nov 15, 2011 »
It works fine on the emulator for me.
In your Package view there must be four folders:
- flixel
- flixel-android
- flixel-desktop
- flixel-examples

You must not put them in one folder, otherwise the pad to the examples and assets are wrong.
Have you try running the desktop version? flixel-desktop > pick a demo > run as Java Application.

NiksNut

  • New Member
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: flixel-android 0.2 released
« Reply #13 on: Wed, Nov 16, 2011 »
I'm having a hard time getting the demo run in emulator, I managed to get it running for desktop, but everytime I try to compile I get errors like GC headspace or java heap errors, I seem to be missing something in terms of project setup. Do I need to make every folder into a seperate project and link certain projects with each other? This seems like the only plausible solution left to me but it would be great to get your confirmation. Thanks in advance!

Wing Eraser

  • Guest
Re: flixel-android 0.2 released
« Reply #14 on: Wed, Nov 16, 2011 »
Flixel
tab Libraries
- gdx.jar
- trove-3.0.1.jar
tab Order and Export
- check gdx.jar
- check trove-3.0.1.jar
Flixel-android
tab Projects
- flixel
- flixel-examples
tab Libraries
- gdx-back-end-android.jar
- gdx.jar (via flixel/libs)
- trove-3.0.1.jar (via flixel/libs)

Flixel-desktop
tab Projects
- flixel
- flixel-examples
tab Libraries
- gdx-backend-lwjgl-natives.jar
- gdx-backend-lwlgl.jar
- gdx-natives.jar
Flixel-examples
tab Projects
- flixel



If you import those project, everything should be automatically set correct.
File -> Import... -> Existing Projects into Workspace -> Select root directory
You'll see four project folders in Project:
Select them all. Click on Finish. You're done.

NiksNut

  • New Member
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: flixel-android 0.2 released
« Reply #15 on: Wed, Nov 16, 2011 »
Thanks for your response. I actually never imported a project into eclipse that way, never checked out that import option I guess. I can easily comiple the desktop version now and it works like charm, but my computer still freezes when I try to compile an android version for some reason, I've set my workspace to 1.6 and I'm not sure which android SDK to use. (By default it's 2.2 I think, which I'm using.) Is there something obvious I'm missing or could there be something wrong with my installed SDKs? I could make a simple hello world app that didn't freeze up eclipse while compiling. I appreciate any tips I can get.

UPDATE: I google'd some stuff and found out that I had to crank up my heap space for eclipse, it works fine now. Great framework, looking forward to updates! C:
« Last Edit: Thu, Nov 17, 2011 by NiksNut »

kimikooxx

  • New Member
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: flixel-android 0.2 released
« Reply #16 on: Sun, Nov 20, 2011 »
Thanks for your help.
It's all ok now.

Wing Eraser

  • Guest
Re: flixel-android 0.2 released
« Reply #17 on: Fri, Mar 15, 2013 »
Can anyone tellme how to add ButtonGroup code to desktop version

Lol, didn't expected this. I'll send you DM.

ivanstame

  • New Member
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Re: flixel-android 0.2 released
« Reply #18 on: Mon, Mar 25, 2013 »
This is really great, i can use flixel in java for android games :D

But i am new to flixel and i dont understand one thing, how collision works with Tiled(map editor) maps.
I am talking about example in tiledmap2. In .tmx i see you have two layers one object layer and one map layer.
How does flixel know what layer is collision layer, and what layer is just decoration layer? And how i can change those?