4 ms·
You have to plan from the beginning to abstract away the system-specific stuff. Java: I only wrap what I need with JNI and use C for the rest. Anybody would ge
by hy3lxs 17y ago
You have to plan from the beginning to abstract away the system-specific stuff.
Java: I only wrap what I need with JNI and use C for the rest. Anybody would get burned out trying to cut-paste a huge Objective C program into Java.
Debugging: good old asserts and printfs are your friend. Last I checked asserts weren't working out-of-the-box on Android, so you may need to roll your own log/assert macros.
Profiling: it's not supported very well on the NDK, so take 15 minutes to add timestamps to critical parts of the code and printf.
OpenGL: again, target C for the bulk of your code and vertex buffer objects and interleaved arrays work great. No need for ByteBuffer madness.
Fixed point: ARM chips are not going away anytime soon. Converting your data to fixed point before uploading it to the GPU is a simple problem compared to getting your fancy website to render properly in IE6 or your pretty desktop game to not choke on Intel Accelerated Graphics. Do microbenchmarks once at runtime or test lots of different devices to see what kind of data works best on the host device.
Good thing is you only have to do these things once, ever. Once you have your build system setup and all your happy interface libraries running you can do the same things for all your Android+iPhone projects.