[Beta] RSAndEngine - Beta testers/Sample writers needed

NFOBoy

Active Member
Licensed User
Longtime User
Tomas,

I'm going thru and trying to convert the AndEngine Examples from the "normal" AndEngine install (similar the one available on the market), and just to make sure I didn't miss it.. there is no Line Primitive? (Simple->Drawing Lines from the AE examples app)

Also, for the Drawing Rectangles example, no RectangleGroup Entity either? Not a big deal, except (I believe) when I get to the Post-Processing->Motion Streak example (not from the Market, but the newest available examples), it would make the setup a lot easier.

Ross
 

XverhelstX

Well-Known Member
Licensed User
Longtime User

Hi Ross

Thanks for your comment.
For me, it is very hard to wrap every class to RSAndEngine.
I might forget a couple of important aspects like indeed the Line primitive.

I'll add the Line entity and other primitive entities to RSAndEngine in version 1.05.

Regards,
Tomas
 

XverhelstX

Well-Known Member
Licensed User
Longtime User
Version 1.04 is online!

Version 1.04 supports TMX tiles!

TMX (Tile Map XML) is a XML based format, that is mainly human readable but still has very small file-sizes. The biggest plus of the TMX format is that it has a fully featured and easy to use cross-platform Map-Editor called “Tiled”, which can be obtained for free here: Tiled Map Editor

The TMX map format used by Tiled is a flexible way to describe a tile based map. It can describe maps with any tile size, any amount of layers, any number of tile sets and it allows custom properties to be set on most elements. Beside tile layers, it can also contain groups of objects that can be placed freely.

V1.04 - Current version
  • Bug fixes
  • TMX Tiled maps:
  • - AndTMXLoader
  • - AndTMXTiledMap
  • - AndTMXTile
  • - AndTMXLayer
  • - AndTMXTileProperties
  • Animation listeners
  • More animation methods
  • Path & PathModifier
  • AlgorithmPath
  • IUpdateHandler
  • PhysicsHandler
  • Player class
  • New events:
  • - _Started

Regards,
Tomas
 

NFOBoy

Active Member
Licensed User
Longtime User

Tomas, completely understand, it's huge! I'll just go down the list of examples, as that seems to be the way that many on the forums refer to as "the documentation" for AndEngine (along with other examples posted), which does make a bit of sense to me...

Now as far as what you would like to see released, I can post the sample code (sans library) along with the apk(s) of the samples I convert. That way people can get an idea of what the coding entails, or just the apk(s)?

Ross
 

NFOBoy

Active Member
Licensed User
Longtime User
Tomas,

for AndBackground, the initialize method will only accept int, but it is either an off/on situation for r,g,b. The setColor method works perfect for float values, but not sure if the initialize method is a feature or not

Also, in 1.04, the back button no longer functions, was this desired feature?

Ross
 

XverhelstX

Well-Known Member
Licensed User
Longtime User

Sure, that was what i was looking for.
People who could write samples to showcase RSAndEngine and it's capacities.
You can both share the apk and the sample on the main thread. it will be released soon.


1. It will be fixed in 1.5

2. I forgot to remove this in SimpleBaseGameActivity. it should be fixed in V1.5. (Still it's prefered to use BaseGameActivity rather then SimpleBaseGame for Basic4Android Games)

Regards,
Tomas
 

NFOBoy

Active Member
Licensed User
Longtime User
Tomas,

copy. Will go with BaseGameActivity (I was just trying to translate them as written in Eclipse)

On that, do not see any Alt-Tab for auto-fill of events, so not sure exactly what it is, but I cannot get:

B4X:
Sub Scene_AreaTouched (Action As Int, LocalX As Float, LocalY As Float)
   
End Sub


to fire.

When I use SimpleGame, if I do:

B4X:
'Add a touch listener for the scene
   Scene.setOnSceneTouchListener
   Scene.setOnAreaTouchListener

both of those work, but only get

B4X:
Sub Scene_SceneTouched (Scen As Object, Action As Int)
   
   If sprFace.IsInitialized Then
      sprFace.Remove
      sprFace = Null
   End If

End Sub

to fire. (If I use only one of them (either one) they both cause that listener to get fired)


and when I use BaseGameActivity

If I use

Scene.setOnAreaTouchListener, then nothing gets fired


If I use

Scene.setOnSceneTouchListener, then I do get

B4X:
Sub Scene_SceneTouched (Scen As Object, Action As Int)
   If sprFace.IsInitialized Then
      sprFace.Remove
      sprFace = Null
   End If

End Sub

to fire


Ross
 

NFOBoy

Active Member
Licensed User
Longtime User
PhysicsHandler strangeness

Tomas,

attached is my "slow" progress so far, with the default runner of the "a moving ball example" (GameServiceMovingBallExample)

Two Things with this one:

1. I think I have it registered with the Scene properly, but I can't get the PhysicsHandler to fire the OnUpdate method. To get around that, I added the AndTimerHandler and use its TimePassed call to check position going around the box.

2. Not sure if not using the actual PhysicsHandler update (which might be why), but every so often, the sprite manages to get "past" the actual limit, and starts to "tunnel" lock with the wall test.

Ross

P.S. Posting these as I find them. If you would prefer, I can save them all up till my end of day?
 

Attachments

  • debugSample.zip
    26.6 KB · Views: 350
Last edited:

walterf25

Expert
Licensed User
Longtime User
AndEngine Examples

Hi NFOboy, i have been doing the same thing, i have been trying to go through the original andengine examples, particularly the physics examples.

I was wondering if you've had a chance to play with those yet, currently i'm working on the example where the user touches anywhere on the screen an animated sprite gets created and falls to the floor.

My problem is that when a few objects have been created then the app re-starts all over, i do not get any errors, the problems happens very randomly sometimes with only 3 or 4 objects created the app re-starts, other times you can create 30 to 40 objects and the app re-starts, for some reason i can not pin point where the problem is, if you ever come across this same issue let me know, maybe if we put our brains together we can figure this out.

As far as your post, I also had the same issue with the SceneTouch Events.
I talked to Thomas and he adviced me to do the following.
if you have a sprite that you registered to receive the touchEvent then the

B4X:
Sub Scene_SceneTouched (Scen As Object, Action As Int)

End Sub

and the
B4X:
Sub Scene_AreaTouched (Action As Int, LocalX As Float, LocalY As Float) 
End Sub

will not work, the reason is very obvious, that you have the sprite registered to receive the touchevents, so in order to be able to use the above events you need to unregister the sprite that is receiving the Touch Events.

Hope this helps.

cheers,
Walter
 

PaulusPaulus

Member
Licensed User
Longtime User
Testing

Tomas
I'd like the zip to try it too/look at some writing, please. AndEngine looks cool.
Cheers - Paul
 

MaxApps

Active Member
Licensed User
Longtime User
Hi
I would like to try it. Any room for another tester?

Kind regards
Jakob
 

NFOBoy

Active Member
Licensed User
Longtime User
Walter,

I'll do that one today, to see if I get similar erros.

For this:

will not work, the reason is very obvious, that you have the sprite registered to receive the touchevents, so in order to be able to use the above events you need to unregister the sprite that is receiving the Touch Events.

I didn't register any sprites to handle any touch events (they are the basic Scene handles anything/everything type of mode)

Did you ever get the PhysicsHandler _Update method to fire?

Ross
 
Last edited:

NFOBoy

Active Member
Licensed User
Longtime User
Similar issue as Walter?

Attached is my translation of the PhysicsExample from AndEngine Examples.

I did indeed get errors when attempting to add sprites to the mix (random occurence, between 4 and ???? based on how how fast I try to add them).

On my S3 I get a fatal signal 11 (SIGSEGV)

unfiltered:

B4X:
elivering touch to current input target: action: 0x1
Delivering touch to current input target: action: 0x1
Delivering touch to current input target: action: 0x1
GC_EXPLICIT freed 47K, 22% free 12577K/16007K, paused 3ms+3ms, total 28ms
*** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***


Build fingerprint: 'samsung/m0du/m0:4.1.2/JZO54K/I9300TDUEMB1:user/release-keys'
pid: 21155, tid: 21155, name: b4a.example  >>> b4a.example <<<
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr deadbaad


Touch event's action is 0x0 (deviceType=0) [pCnt=1, s=0.5305 ]
Delivering touch to current input target: action: 0x0
Delivering touch to current input target: action: 0x0
Delivering touch to current input target: action: 0x0
Touch event's action is 0x1 (deviceType=0) [pCnt=1, s=]


Delivering touch to current input target: action: 0x1
Delivering touch to current input target: action: 0x1
Delivering touch to current input target: action: 0x1
    r0 00000027  r1 deadbaad  r2 400c1b0c  r3 00000000


    r4 00000000  r5 be81c424  r6 00000000  r7 4139db78
    r8 be81c4d4  r9 4139db64  sl 413c52e0  fp be81c4ec
    ip 00004000  sp be81c420  lr 40093c65  pc 400902fe  cpsr 60000030
    d0  000000003c8efa35  d1  4059000000000000
    d2  4055800000000000  d3  0000000000000001
    d4  0000000000000000  d5  0000000144a00000
    d6  c2c800003f800000  d7  0000000900000000
    d8  0000000000000000  d9  0000000000000000
    d10 0000000000000000  d11 0000000000000000
    d12 0000000000000000  d13 0000000000000000
    d14 0000000000000000  d15 0000000000000000
    d16 4036a09e667f3bcd  d17 4080000000000000
    d18 0000000000000000  d19 4018f40b5ed9812d
    d20 0000000000000000  d21 3ff0000000000000
    d22 8000000000000000  d23 0000000000000000
    d24 0000000000000000  d25 8000000000000000
    d26 3ff0000000000000  d27 0100010001000100
    d28 0100010001000100  d29 0100010001000100
    d30 0100000001000000  d31 0100000000000000
    scr 60000011



backtrace:
    #00  pc 000182fe  /system/lib/libc.so
    #01  pc 0000dc04  /system/lib/libc.so (abort+4)
    #02  pc 0001f0bf  /system/lib/libc.so (__assert2+30)
    #03  pc 0002e600  /data/data/b4a.example/files/libandenginephysicsbox2dextension.so (b2Body::SetTransform(b2Vec2 const&, float, bool)+92)
    #04  pc 0002e598  /data/data/b4a.example/files/libandenginephysicsbox2dextension.so (b2Body::SetTransform(b2Vec2 const&, float)+36)
    #05  pc 00014f0c  /data/data/b4a.example/files/libandenginephysicsbox2dextension.so (Java_com_badlogic_gdx_physics_box2d_Body_jniSetTransform__JFFF+64)
    #06  pc 0001deb0  /system/lib/libdvm.so (dvmPlatformInvoke+112)
    #07  pc 0004d103  /system/lib/libdvm.so (dvmCallJNIMethod(unsigned int const*, JValue*, Method const*, Thread*)+394)
    #08  pc 000272e0  /system/lib/libdvm.so
    #09  pc 0002bbe8  /system/lib/libdvm.so (dvmInterpret(Thread*, Method const*, JValue*)+180)
    #10  pc 0005fb37  /system/lib/libdvm.so (dvmInvokeMethod(Object*, Method const*, ArrayObject*, ArrayObject*, ClassObject*, bool)+374)
    #11  pc 000670e5  /system/lib/libdvm.so
    #12  pc 000272e0  /system/lib/libdvm.so
    #13  pc 0002bbe8  /system/lib/libdvm.so (dvmInterpret(Thread*, Method const*, JValue*)+180)
    #14  pc 0005fb37  /system/lib/libdvm.so (dvmInvokeMethod(Object*, Method const*, ArrayObject*, ArrayObject*, ClassObject*, bool)+374)
    #15  pc 000670e5  /system/lib/libdvm.so
    #16  pc 000272e0  /system/lib/libdvm.so
    #17  pc 0002bbe8  /system/lib/libdvm.so (dvmInterpret(Thread*, Method const*, JValue*)+180)
    #18  pc 0005f871  /system/lib/libdvm.so (dvmCallMethodV(Thread*, Method const*, Object*, bool, JValue*, std::__va_list)+272)
    #19  pc 000496f3  /system/lib/libdvm.so
    #20  pc 0004c571  /system/lib/libandroid_runtime.so
    #21  pc 0004d6d3  /system/lib/libandroid_runtime.so (android::AndroidRuntime::start(char const*, char const*)+390)
    #22  pc 00000dcf  /system/bin/app_process

stack:
         be81c3e0  be81c428  [stack]
         be81c3e4  12d0c115  
         be81c3e8  5d6e40c8  
         be81c3ec  00000000  
         be81c3f0  00000000  
         be81c3f4  00000000  
         be81c3f8  400bc774  /system/lib/libc.so
         be81c3fc  400c1d10  
         be81c400  00000000  
         be81c404  40093c65  /system/lib/libc.so (_fwalk+32)
         be81c408  00000001  
         be81c40c  be81c424  [stack]
         be81c410  00000000  
         be81c414  4139db78  
         be81c418  df0027ad  
         be81c41c  00000000  
    #00  be81c420  5ee89ab8  /data/data/b4a.example/files/libandenginephysicsbox2dextension.so
         be81c424  fffffbdf  
         be81c428  400b2ecc  /system/lib/libc.so
         be81c42c  00000000  
         be81c430  4139db78  
         be81c434  400931d1  /system/lib/libc.so (fprintf+16)
         be81c438  400bc718  /system/lib/libc.so
         be81c43c  5ee89ab8  /data/data/b4a.example/files/libandenginephysicsbox2dextension.so
         be81c440  400b2ecc  /system/lib/libc.so
         be81c444  40085c08  /system/lib/libc.so (__pthread_clone)
    #01  be81c448  be81c448  [stack]
         be81c44c  400970c3  /system/lib/libc.so (__assert2+34)
    #02  be81c450  00000199  
         be81c454  5ee89ef8  /data/data/b4a.example/files/libandenginephysicsbox2dextension.so
         be81c458  5ee89ef8  /data/data/b4a.example/files/libandenginephysicsbox2dextension.so
         be81c45c  5ee60604  /data/data/b4a.example/files/libandenginephysicsbox2dextension.so (b2Body::SetTransform(b2Vec2 const&, float, bool)+96)

memory near r2:
    400c1aec 00000000 00000000 00000000 00000000  ................
    400c1afc 00000000 00000000 00000000 00000000  ................
    400c1b0c 00000001 00000000 00000000 00000000  ................
    400c1b1c 00000000 00000000 00000000 00000000  ................
    400c1b2c 00000000 00000000 00000000 00000000  ................

memory near r5:
    be81c404 40093c65 00000001 be81c424 00000000  e<.@....$.......
    be81c414 4139db78 df0027ad 00000000 5ee89ab8  x.9A.'.........^
    be81c424 fffffbdf 400b2ecc 00000000 4139db78  .......@....x.9A
Touch event's action is 0x0 (deviceType=0) [pCnt=1, s=0.5306 ]
    be81c434 400931d1 400bc718 5ee89ab8 400b2ecc  .1.@...@...^...@


    be81c444 40085c08 be81c448 400970c3 00000199  .\.@H....p.@....
Delivering touch to current input target: action: 0x0

memory near r7:
Delivering touch to current input target: action: 0x0
Delivering touch to current input target: action: 0x0
    4139db58 00000006 00000000 f8b00019 5d6e4088  .............@n]
    4139db68 00000000 40f10000 40e90000 00000000  .......@...@....
    4139db78 4139dbc4 5d0c3a50 570c21d8 5d08f0a0  ..9AP:.].!.W...]
    4139db88 00000000 42089910 5d6e4088 00000000  .......B.@n]....
    4139db98 40f10000 40e90000 00000000 42089910  ...@...@.......B

memory near r8:
    be81c4b4 5d6e4088 40f10000 40e90000 42089910  .@n]...@...@...B
    be81c4c4 40837eb4 40f10000 40e90000 00000000  .~.@...@...@....
    be81c4d4 40862a83 4139db60 00000001 42089910  .*.@`.9A.......B
    be81c4e4 00000000 4201b528 40867107 4139db60  ....(..B.q.@`.9A
    be81c4f4 5d125c97 5ee46ecc 413c52e0 00000000  .\.].n.^.R<A....

memory near r9:
    4139db44 4201c180 4139dbc4 4139db8c 5d08f0a0  ...B..9A..9A...]
    4139db54 570c14e8 00000006 00000000 f8b00019  ...W............
    4139db64 5d6e4088 00000000 40f10000 40e90000  .@n].......@...@
    4139db74 00000000 4139dbc4 5d0c3a50 570c21d8  ......9AP:.].!.W
    4139db84 5d08f0a0 00000000 42089910 5d6e4088  ...].......B.@n]

memory near sl:
    413c52c0 00000000 00000000 00000000 00000453  ............S...
    413c52d0 5d0962ae 4139db60 570c21d8 5a8a4000  .b.]`.9A.!.W.@.Z
    413c52e0 00000000 4036a09e be81c600 00000000  ......6@........
    413c52f0 be81c634 00000001 00000000 40838040  4...........@..@
    413c5300 00000000 00000000 4085e770 41398300  ........p..@..9A

memory near fp:
    be81c4cc 40e90000 00000000 40862a83 4139db60  ...@.....*.@`.9A
    be81c4dc 00000001 42089910 00000000 4201b528  .......B....(..B
    be81c4ec 40867107 4139db60 5d125c97 5ee46ecc  .q.@`.9A.\.].n.^
    be81c4fc 413c52e0 00000000 00000000 00000000  .R<A............
    be81c50c 400c8a6c 00000001 57e07d18 4139d9b8  l..@.....}.W..9A

memory near ip:
    00003fe0 ffffffff ffffffff ffffffff ffffffff  ................
    00003ff0 ffffffff ffffffff ffffffff ffffffff  ................
    00004000 ffffffff ffffffff ffffffff ffffffff  ................
    00004010 ffffffff ffffffff ffffffff ffffffff  ................
    00004020 ffffffff ffffffff ffffffff ffffffff  ................

memory near sp:
    be81c400 00000000 40093c65 00000001 be81c424  ....e<.@....$...
    be81c410 00000000 4139db78 df0027ad 00000000  ....x.9A.'......
    be81c420 5ee89ab8 fffffbdf 400b2ecc 00000000  ...^.......@....
    be81c430 4139db78 400931d1 400bc718 5ee89ab8  x.9A.1.@...@...^
    be81c440 400b2ecc 40085c08 be81c448 400970c3  ...@.\.@H....p.@

code around pc:
    400902dc e000b164 6823461c d1fb2b00 68e3e026  d....F#h.+..&..h
    400902ec 4a17b123 447a2401 47986014 20274911  #..J.$zD.`.G.I' 
    400902fc 70082400 ebb2f7f4 f7f52106 a902ecf2  .$.p.....!......
    4009030c f04f2006 460a5380 94029304 f7f59403  . O..S.F........
    4009031c 4629e8d0 20024622 e8d8f7f5 eb9ef7f4  ..)F"F. ........

code around lr:
    40093c44 41f0e92d 4c0b2600 447c4680 68a56824  -..A.&.L.F|D$h.h
    40093c54 e0076867 300cf9b5 dd022b00 47c04628  gh.....0.+..(F.G
    40093c64 35544306 d5f53f01 2c006824 4630d1ef  .CT5.?..$h.,..0F
    40093c74 81f0e8bd 000288b2 43f0e92d fb01461f  ........-..C.F..
    40093c84 f8dff602 b0878058 44f8460c 8000f8d8  ....X....F.D....

memory map around fault addr deadbaad:
    be7fc000-be81d000 [stack]
    (no map for address)
    ffff0000-ffff1000 [vectors]
Touch event's action is 0x1 (deviceType=0) [pCnt=1, s=]
Delivering touch to current input target: action: 0x1
Delivering touch to current input target: action: 0x1
Delivering touch to current input target: action: 0x1
!@dumpstate -k -t -z -d -o /data/log/dumpstate_app_native -m 21155


Copying /data/tombstones/tombstone_05 to DropBox (SYSTEM_TOMBSTONE)
begin


Touch event's action is 0x0 (deviceType=0) [pCnt=1, s=0.5307 ]
Delivering touch to current input target: action: 0x0
Delivering touch to current input target: action: 0x0
Delivering touch to current input target: action: 0x0
Touch event's action is 0x1 (deviceType=0) [pCnt=1, s=]


Delivering touch to current input target: action: 0x1
Delivering touch to current input target: action: 0x1
Delivering touch to current input target: action: 0x1
GC_CONCURRENT freed 1655K, 42% free 36147K/61639K, paused 17ms+10ms, total 136ms


WAIT_FOR_CONCURRENT_GC blocked 120ms


Touch event's action is 0x0 (deviceType=0) [pCnt=1, s=0.5308 ]
Touch event's action is 0x1 (deviceType=0) [pCnt=1, s=]


Thinking maybe my memory could have an issue, I try it on my SL running 2.3.4 and I don't get any messages, but the application does lock up after between 10 and 14 sprites are added. (Nothing on the logcat in Eclipse that I could see either)

So cannot point to any logcat for SL.

I do run the same sample from AndEngine, and both devices work well. I don't see anything in the original about locking the engine, etc when adding a Sprite, so not sure what I could do different in the B4A code to keep the error from occurring.


Ross
 

Attachments

  • debugSample.zip
    144.4 KB · Views: 335

walterf25

Expert
Licensed User
Longtime User
AndEngine Examples

Hi there, that is exactly the problem i'm having, i gave the apk file to a few people today just to confirm that it wasn't my device that was causing this issue, and they all confirmed to have the same issue on their devices.

I ran your example and yes i do get the same error as you, I really hope that Tomas gets a chance to look into this, otherwise this library is limited to only a few things, the game i have in mind needs to be able to add several objects but with this issue i won't be able to use AndEngine, which is a shame because I love AndEngine but i suck at Java so i was really excited when Tomas decided to wrap this library.

Anyhow let me know if you find a solution to this problem on your end, i have spent the last 3 days researching about this issue, and the only thread i was able to find was this Android AndEngine problem with touch events - Stack Overflow

Here Nicholas the developer of AndEngine answers saying this

Do not touch a Physics-"Body" inside of a TouchEvent. UI-Thread and UpdateThread hate working at the same time!

but this answer doesn't make sense either because as you mentioned the original example works just fine, Argggg i just wish i could find a solution to this, it is driving crazy.

Keep me in the loop and I will do the same if i find anything.

Cheers,
Walter
 

NFOBoy

Active Member
Licensed User
Longtime User
If you are able to even get to the point of running the samples from AndEngine, them I'm sure you don't "suck" at java... just prefer the comfort of B4A like me!

I hope Tomas is successful at finding a solution as well, as I do like the B4A coding more than java, and this would be a great library for us, especially if it runs as fast/smooth as the java compilation.


Ross
 

XverhelstX

Well-Known Member
Licensed User
Longtime User

1. I haven't added the Update method to the physicshandler.
This is because i followed a tutorial, but i couldn't find a lot of information about physicshandler. Is there a way you can show me some information about the physicshandler _update event?

2. Can you explain what you mean?


What walter meant was that if you have a sprite covering the scene, that that sprite will receive the touch events rather then the scene.

I hope Tomas is successful at finding a solution as well, as I do like the B4A coding more than java, and this would be a great library for us, especially if it runs as fast/smooth as the java compilation.


Ross

I'll try to find a solution to it and i might contact the AndEngine author.
Ross and Walter, is it possible to both post the logs until you receive the "bug/error"?


At all, i'm not looking for any more beta testers.


Regards,
Tomas
 

walterf25

Expert
Licensed User
Longtime User
AndEngine Examples

Hey Tomas, here is the logs i get when the app re-starts


Hope you can find a solution to this.

thanks,
Walter
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…