Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 11 Aug 2006
Offline Last Active Jun 07 2013 07:40 AM

Topics I've Started

J2ME Modals

18 September 2008 - 06:09 AM

Heyas I was checking some things and I realised that doing modal dialogs in J2ME is a bit trickier than I thought. for example Main Loop: while(true) {do game } During the game i want to ask the user a question so boolean bResponse = GetUserChoice; GetUserChoice would be something that draws a modal window and then asks the user to choose its option, basically a modal window. My problem is this: if I wait for user input I have to pause my main loop and trigger a second loop on a separate thread that will handle the drawing and management of my modal. Nothing else on the main loop will be working as its locked onto that point, waiting for that answer. I can write this no worries but I was wondering if there was a better way of handling this. Any thoughts? Yours Truly K

J2ME sizeof

09 December 2007 - 11:10 PM

Heyas Does anyone know how to get the sizeof of j2me's native types? or at least their size? for example how many bytes to an int? The reason for this is that I would like to use bit masking for some of my properties: ie: 0x00000001 is tile a, etc etc and 0x10000000 means its blabla Yours Truly K

widgets on J2ME

22 October 2007 - 10:41 PM

Ok... maybe im missing something but there arent any, are there? I mean i wanted to do something simple as a text box that can be scrolled and I cant seem to find anything to do it with. The default objects in J2ME seem to be usable only on forms and you cant even use absolute positions with them. Is it just me that is missing something or do we have to implement our own code for this? Implementing text boxes will mean calculating text lengh and then drawing string by string isntead of the good ol set text with wrap. Yours Truly K

Phone Heap Memory

18 September 2007 - 02:31 AM

Ok here is something Im finding confusing. I just recently mistook heap memory for stack memory but no, heap memory is the total memory available for your program. When you realise a good recent phone only has 2MB worth of heap memory you realise why J2ME requires so much optimisation. My greatest worry now is images: a 240x340x24bit screen will consume 225kb of heap for each image. That means it cant hold in memory more than 10 images like this. Thats a huge bottle neck on the entire system. I was using a sprite class to display a small full screen animation for my splash screen. 10 different screens at 3 seconds each is not that much (company name, game name, small intro, credits, etc) but it wont work since it will burst the memory clean. Am I reading this correctly? Is this really how it works? I was worried about compressing images so that the jar would be small enough... should be worried about the heap size instead. Does anyone know how much of a performance bottleneck is loading each image at the time to show it? would it work nicely for the splash? I can try this on my 6230i and the 6300 but those are all the handsets I have available. Yours Truly K

Nokia 6300 reporting out of memory (SOLVED)

14 September 2007 - 01:56 AM

Heyas So I have been developing a small game for myself on my Nokia 6230i and everything is fine there. However I just got a brand new Nokia 6300 and when I tried my game there it crashes with an Out of Memory exception during the midlet initialisation. Does anyone know what is going on? how can the game work fine on 6230i and not on a new 6300. Also I havent got a single idea on how to debug this. I usually debug on the default emulator and then on the nokia 6230i sdk emulator (for more precision as its slower to load). Obviously these are fine, as is running the game on my own 6230i. Since I dont have a specific emulator for the 6300 Im not sure how can I reproduce the problem in a debuggable enviroment. Any help would be greatly appreciated. Yours Truly K [Edited by - BloodWarrior on September 18, 2007 8:21:28 AM]