Live data from Hacker News

Show HN: Awesome J2ME

github.com

41–50 of 59 posts

Re: Show HN: Awesome J2ME

#41
Thanks 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

#42
I did J2ME development in the 64KB JAR era.

I 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

#44
post #36
post #25

Earlier 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

That's just good old fashioned hacking. Wasn't this more a reflection of the various platforms' limited memory resources, and not really anything to do with J2ME?

Re: Show HN: Awesome J2ME

#45

Thanks 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.

[dead]

Re: Show HN: Awesome J2ME

#47
post #38

The 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?

Alcohol abuse marketed as a social drinking game.

Re: Show HN: Awesome J2ME

#48
post #25
post #4

Brings 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.

IIRC FileInputStream objects in J2ME can only seek (skip) forward. If you might need data from before your current position, you can either reopen the file, or cache the data as you go (if you have the ram). Reverse seek wasn't added until Java 1.4, and J2ME is based on Java 1.3

Re: Show HN: Awesome J2ME

#49
gopher://hoi.st has Pocket Gopher, a J2ME gopher client.

Also, 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

#50

MeBoy 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…

I used to run MeBoy under Sony w200 phone. With some frameskip Zelda for the GB was somehow playable. Pokémon ran well enough OFC.
Post reply on HN