Show HN: Awesome J2ME
41–50 of 59 posts
Re: Show HN: Awesome J2ME
#42I can still remember setting up palette swapping (inspired by retro consoles, but still a common contemporary idea e.g. on GBA) by loading the byte data of PNG resources into an array and locating and replacing the PLTE chunk before handing it off to the MIDP image loader. Always wondered if anyone else had picked up the trick. I can also remember people suggesting on Nokia in particular to just store raw bitmaps (since they'd be compressed in the JAR anyway) with their API and that this was saving tons of space for some people... later I found out that one of these reports came from someone who had started out with individual image files for 12x12 tiles that had a full 256-entry PLTE (i.e., more colour entries than pixels).
I also remember a device-specific bug where doing something like `x[y+1]`, where `y` was a static byte set to -1, would produce an `IndexOutOfBoundsError` claiming the index used was -256. I assume this was some threading issue in the Java implementation, where the value would be loaded into a register and then the sign-extension would somehow affect the register after the increment. I only ever reproduced it with static class members, I think (but it did also happen with shorts).
Re: Show HN: Awesome J2ME
#43Re: Show HN: Awesome J2ME
#44Earlier quoted context omitted.
How limited could it have been? They were able to ship Google Maps Mobile with it.
How limited? We packed booleans inside integers instead of allocating separate booleans :P
Re: Show HN: Awesome J2ME
#45Thanks for making me feel old! One of my first real jobs involved MIDP/J2ME development. I cannot say I loved the platform, but it somehow felt more magical back then to develop something and run it on a Nokia brick than (mobile) development of today.
Re: Show HN: Awesome J2ME
#46It was fun to build small apps and felt like magic at the time.
Re: Show HN: Awesome J2ME
#47The first thing I ever wrote that other people used was a j2me app freshman year in college. It was a power hour app that played a random simpsons .wav every minute. I was a pretty poor CS student, in hindsight I'm surprised I got it to work.
> a power hour app Pardon?
Re: Show HN: Awesome J2ME
#48Brings back memories but I can't say they are good. It was so limited that it was mostly frustration.
How limited could it have been? They were able to ship Google Maps Mobile with it.
Re: Show HN: Awesome J2ME
#49Also, you can head to gopher://magical.fish, gopher://hngopher.com and gopher://sdf.org to get 'modern' services and news.
Re: Show HN: Awesome J2ME
#50MeBoy brings back some memories. I used it to catch so many Pokémon in middle school. What's really cool about that emulator is the way its sound emulation works. Instead of emulating the Gameboy's synthesizer synchronously and outputting a PCM waveform to a buffer, which is probably impossible on J2ME due to hardware and platform constraints, it uses the phone's own MIDI (or square wave) synthesizer to play whatever…