Извините, ничего не найдено.

Не расстраивайся! Лучше выпей чайку!
Регистрация
Справка
Календарь

Вернуться   forum.boolean.name > Программирование игр для мобильных телефонов > MidletPascal

Ответ
 
Опции темы
Старый 09.12.2010, 01:44   #16
NastyKhan
Оператор ЭВМ
 
Регистрация: 26.09.2010
Сообщений: 29
Написано 0 полезных сообщений
(для 0 пользователей)
Ответ: Vibra, Data, Midi

I decided to not implement highscore table.

I've met another problem though. The game runs fine at simulator, but a little too slow on cellphone. Actually it's just.. boring-slow. I tried some things:

1. Disable some heavy functions, like sounds.
2. Disable.. all other functions including controls, most graphical elements etc.
3. Set main loop delay to 1.
4. Hell.. Remove completely main delay.

No changes. I mean literally - no changes. The game is still perfectly smooth (no jamming) but DAMN slow.

It's almost finished.. i can't end like this. Both phones i'm using supports 2d, and even 3d games with no problems (one also include gyroscope-ball-roller). Why they got so slow with my simple (830 source code lines) game?

Please help.


Edit:
Hmm.. i think i fixed that on as well. It looks like cell phones have FPS capped at 50 frames per second. And 50 frames per second = 1 frame for 20miliseconds. In other words: New 'repaint' cannot be done earlier than 20 miliseconds after previous one. Even if i ask them so, the program will wait 20 ms.

So if I want to make my object move 1 pixel for every cycle, and set cycle delay to 10 milisecond - the object will move 1 pixel/20 miliseconds anyway. To solve this problem i have to make my object move 2 pixel per cycle, and change delay to 20.

Success.

Последний раз редактировалось NastyKhan, 09.12.2010 в 04:03.
(Offline)
 
Ответить с цитированием
Старый 09.12.2010, 16:14   #17
odd
Мастер
 
Аватар для odd
 
Регистрация: 06.09.2007
Адрес: Донецк, ДНР
Сообщений: 1,023
Написано 298 полезных сообщений
(для 713 пользователей)
Ответ: Vibra, Data, Midi

Try to use the RepaintPart function. It operates much faster.
(Offline)
 
Ответить с цитированием
Ответ


Опции темы

Ваши права в разделе
Вы не можете создавать темы
Вы не можете отвечать на сообщения
Вы не можете прикреплять файлы
Вы не можете редактировать сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.


Часовой пояс GMT +4, время: 12:03.


vBulletin® Version 3.6.5.
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Перевод: zCarot
Style crйe par Allan - vBulletin-Ressources.com