| Reply | « Previous Thread | Next Thread » |
|
Hi. I have some strange problems with Nokia 668x devices.
It's a rather big 2.5D game with a lot of memory used. After starting it shows a strange behavior. Update() method contains these parts: 1. Renderer traces and fills rgb array. 2. Processing keys Draw() method contains these parts: 1. DrawRGB() called for rgb array 2. Update HUD (with health, ammo etc) in buffer if needed 3. Draw HUD buffer It can work well for some time, than screen become black for several short period of times (some kind of flickering) and after that it became black forever and phone freezes. BUT hud buffer is drawn over blank black screen! It seems drawRGB() or renderer fails first of something. sometimes screen becomes black right after starting The game works well on 7610, 6260, 7500 and some non-Nokia devices. may be it's thread problem? here is the code of run(): while(!stopped) { try { while(!stopped) { curTime = System.currentTimeMillis(); dif = curTime - frameTime; if(!inactive && dif >= 0) { if(!paused) { curFrame++; } if(dif > frameLen) { frameTime = curTime; } else { frameTime += frameLen; } update(); draw(); flushGraphics(); } Thread.sleep(1); lastTime = curTime; } } catch(Exception ex) { ex.printStackTrace(); } } thank you for helping in advance :)We are fighting this problem for some days, so it would be great if you give some clue... |
| Chikinrodion |
| View Public Profile |
| Find all posts by Chikinrodion |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|