PDA

View Full Version : Impressive! Performance though?



Cord Rehn
12-05-2011, 09:37 AM
I've really been wanting to develop 3D for Android, Java's performance is pitiful in comparison to C++ with the NDK. I've worked with Irrlicht source code on PC (and PSP! lookup the developer SG57 ;]) for over 3 years now for odd projects and definitely loved the performance from the Proton Android 3D demo. I took my own crack at porting Irrlicht 1.7 and failed, I could not get textures to bind, even with power^2 textures.

Oh and you're one funny dude Seth.

Questions:
If I were to simply use the Irrlicht aspect of Proton, could I make an app that does everything via irrlicht and my own code?

Would there be a huge performance difference due to the overhead?

If I were to not make use of the entity system framework, is there a hit on performance due to any underlying framework overhead?

Seth
12-05-2011, 12:02 PM
Hey,


If I were to simply use the Irrlicht aspect of Proton, could I make an app that does everything via irrlicht and my own code?

Would there be a huge performance difference due to the overhead?

If I were to not make use of the entity system framework, is there a hit on performance due to any underlying framework overhead?

If anything, not using Proton's entity system will improve your performance, not hurt it - so you can do it nearly 100% with the Irrlicht side if you want.

Easiest thing would be to start with the RT3DApp example and sort of locate App::Update() and App::Render(). And maybe check RTBareBone's for an example of getting raw input.

Warning: While Irrlicht's own GUI stuff can be used, (ie, text input and such) it isn't wired to mobile input which is a big problem.. that's why I sort of use Irrlicht, but Proton as the GUI overlay in the stuff I've done (http://www.rtsoft.com/pages/tanked.php) with it.

Now, if you aren't cut and pasting text around I'm sure you can whip up your own buttons/controls easily enough and it's not a big deal. Or learn how to use Proton's stuff and do the overlay trick.

Cord Rehn
12-05-2011, 07:11 PM
Hey thanks for the reply! Nice to see proton's main creator is active.

Those were the answers I was looking for so I will get started then.

In all honesty I've never been impressed by Irrlicht's GUI and have always resorted to making my own, same for irrlicht's eventreceiver... that and i mainly targeted a portable console that didnt have the event receiver ported over -- http://www.youtube.com/watch?feature=player_detailpage&v=C1TARoEMruQ#t=40s

Does proton-sdk have an active IRC channel or the boards just it?

Cord Rehn
12-06-2011, 11:46 AM
And on that note, was able to get the barebones up and running after quite a few issues where windows decided to be an overprotective SOB... file permissions mainly- libgnustl_static.a and shared/win/utils/*.exe's - Oh and beeper.exe crashes my system, fun times!

One thing however - the android_setup guide here (http://www.rtsoft.com/wiki/doku.php?id=proton:android_setup) instructs you to modify build.sh:

Edit RTBareBones/android/build.sh and set the path. Instead of ”/cygdrive/o/projects/proton/rtbarebones/android” it should be ”/cygdrive/c/proton/rtbarebones/android” or wherever you put proton. Also see where you have to change it a bit below.

Problem is, if you use a Windows editor (like Notepad or Wordpad), you will get errors about

$'/r': command not found
Due to obvious reasons. A simple fix possibly worth noting would be to run the unix command

dos2unix build.shWe either run this ourselves before building or you could integrate it into the build.bat file.

Hope others may find this useful

Seth
12-06-2011, 12:23 PM
Does proton-sdk have an active IRC channel or the boards just it?

Not currently.. if we ever get into interest I'd be happy to hang out in #proton on freenode.net though, I'm already in #clanlib there.


file permissions mainly- libgnustl_static.a and shared/win/utils/*.exe's - Oh and beeper.exe crashes my system, fun times!

Weird - is beeper.exe still crashing even after giving the dirs full permissions? Hmm, I should probably include the source to that so people can debug it if they want.. it's such a silly simple program, amazing it could cause problems.


Problem is, if you use a Windows editor (like Notepad or Wordpad), you will get errors about

Thanks - I went ahead and added a note about that to the wiki. Don't be shy about editing it yourself btw if you find important stuff like that missing! :sweatdrop:

Cord Rehn
12-06-2011, 01:04 PM
Hmm I am able to get SimpleApp to compile. but without resources/media. I attempt to update_media but RTPack.exe is throwing up an error:

The application was unable to start correctly (0xc0000022). Click OK to close the application.

This then proceeds to happen with each successive call to RTPack.exe for each media. I can only imagine it involves more freakin windows permissions but if you have any answers that would save me time digging through the source code for RTPack I'd love to hear it :}

Seth
12-06-2011, 01:20 PM
Hmm.. I"m pretty sure that's a permissions issue - but you checked that.. hmm it might not be that your proton svn folder is set wrong, it could be something in your system32 folder??

Check this: http://www.opssys.com/instantkb/article.aspx?id=10176

But for the file check msvcp60.dll and similar.. I used msvc2005 to compile, not sure exactly which .dlls it would use..

If all else fails, you *could* disable UAC completely (I ended up doing that in Vista.. got annoyed with all the issues.. Win7 is much better about it) but.. yeah, less secure.

Cord Rehn
12-07-2011, 02:15 AM
I resolved the application failed to initialize problem, it was as expected - user permissions. In this case, the problem lied with the PVRTexLib.dll file, to get it to work I had to allow the Read & Execute permission, it only had Read permission. Just to be safe, I also modified the zlib1.dll permissions to allow read & execute.

Do you think beeper.exe crashing my system is due to a permission issue as well? I know to get any of the shared/win/utils executables to even run i had to modify their permissions. It may be worth noting that I have UAC completely off and I obtained proton via subversion through cygwin, perhaps a recursive chmod could fix any future permission issues...

Also it would seem doing a full rebuild, permission errors pop up half way thru the ndk-build bitching about 1st:

/obj/local/armeabi/libgnustl_static.a: No such file: Permission denied
chmod 777 obj/local/armeabi/libgnustl_static.a fixes it. ndk-build again:

/obj/local/armeabi-v7a/libgnustl_static.a: No such file: Permission denied
chmod AGAIN and itll finally compile. On that note, rtsimpleapp is working as expected, I'm getting a 45-50 fps on the particle demo on my htc inspire with music playing

darkchazz
12-08-2011, 12:14 PM
hey man! loved your Light Cycle game :)
I was one of the followers of Brick's LTE thread at psp-hacks forum...

Haven't touched my psp ever since I got my Galaxy SII, this thing is years ahead (except for the controls xD)

This I have been trying to run on my psp with LTE but too many crashes, low performance, and runs out of memory, and now on my phone it runs beautifully with proton:
http://img26.imageshack.us/img26/3520/sc20110908025328.th.jpg (http://imageshack.us/photo/my-images/26/sc20110908025328.jpg/)
http://img20.imageshack.us/img20/7946/sc20110908025634.th.jpg (http://imageshack.us/photo/my-images/20/sc20110908025634.jpg/)
http://img405.imageshack.us/img405/5862/sc20110910232946.th.jpg (http://imageshack.us/photo/my-images/405/sc20110910232946.jpg/)
http://img38.imageshack.us/img38/3916/sc20110910232331.th.jpg (http://imageshack.us/photo/my-images/38/sc20110910232331.jpg/)
http://img694.imageshack.us/img694/693/sc20110910232447.th.jpg (http://imageshack.us/photo/my-images/694/sc20110910232447.jpg/)

Cord Rehn
12-08-2011, 11:13 PM
Well hi there :) yea LTE alone sucked, I had to dive into the source constantly either fixing stuff or figuring work arounds...that dam lighting bug ruined car colors in light cycle 3d :/

Those are some nice screens :) Whatcha makin? Are those lightmapped?? Bsp? I was considering using irrlicht without proton but I kinda like it, think ill give the entity stuff a chance :)

EDIT

OK so after officially forum-stalking you a bit, I got gile[s] and am playing with it. Wish there were some tutorials to get started but ill figure it out. I was wondering what file formats support light maps ? b3d, directx, bsp, md3 ? If things keep up like this Ill definitely port over The World, i'd love to see my towns rendering with PROPER lighting :]

darkchazz
12-09-2011, 10:50 AM
Well hi there :) yea LTE alone sucked, I had to dive into the source constantly either fixing stuff or figuring work arounds...that dam lighting bug ruined car colors in light cycle 3d :/

Those are some nice screens :) Whatcha makin? Are those lightmapped?? Bsp? I was considering using irrlicht without proton but I kinda like it, think ill give the entity stuff a chance :)

EDIT

OK so after officially forum-stalking you a bit, I got gile[s] and am playing with it. Wish there were some tutorials to get started but ill figure it out. I was wondering what file formats support light maps ? b3d, directx, bsp, md3 ? If things keep up like this Ill definitely port over The World, i'd love to see my towns rendering with PROPER lighting :]

Yes lightmaps with baked ambient occlusion using giles , I use b3d format.

Maybe you have read this post of mine:

As I said, I'm using a freeware lightmapper called gile[s] (http://www.frecle.net/index.php?show=giles.about).
I use a target directional light(and set the range to infinite) for the sunlight, and for the colored lights I use the omni type, the color is simply set in the properties of the light vv
And ofcourse I use one ambient light with infinite range and this color to avoid very dark black shadows.

http://img52.imageshack.us/img52/9813/giles.jpg (http://imageshack.us/photo/my-images/52/giles.jpg/)

All you need to do is import you level into giles, set the lightmap+render settings as shown in the pic (personally I found these settings the best).
And then insert all the lights you want and edit their properties for color, range, intensity etc etc(see pic)... and render the lightmap (render tab->render, or click the cube button).
After that just export to b3d format, it will ask you to name the lightmap image and choose a format, I chose png.

Cord Rehn
12-10-2011, 09:25 AM
Many thanks my friend, i'm sure others out there agree but just dont feel like posting to say so heh ;]

Hey man Ive been hanging out in irc.freenode.net #clanlib lately for my proton discussion and whatnot, you should join if ya want.. Seth is a great help and is there very frequently too. I wanna see a psp-scene sized proton irc hehe :P ##psp-programming RIP

darkchazz
12-10-2011, 09:51 AM
Any time man ;)

I'd love to join on irc but too busy atm with university that I haven't had the chance to develop anything :sweatdrop:


##psp-programming RIP
Amen to that :D

Cord Rehn
12-10-2011, 09:55 AM
Oh cmonnnnn my university just got on winter break, classes dont start til the 3rd, im gonna try and crank somethin out you should too!

darkchazz
12-10-2011, 10:11 AM
Oh cmonnnnn my university just got on winter break, classes dont start til the 3rd, im gonna try and crank somethin out you should too!

xD well I live in a part of the world where there is no such thing as Christmas.... Merry christmas! :P
will finish this semester Jan 14th