You Are Here:

Community: Developer Discussion Boards

#1 Old Tiles in 6600 - 2004-01-13, 14:18

Join Date: Nov 2003
Posts: 16
zono666
Offline
Registered User
Hi,

I'm making a tile based game for Nokia 6600 (MIDP 2.0) and have a question.
Is there any "best" size for the tiles and sprites, or is 20x20 as good as 16x16, regarding performance?

Thanks,
Jon
Last edited by zono666 : 2004-01-13 at 15:19.
Reply With Quote

#2 Old 2004-01-13, 15:13

Join Date: Mar 2003
Posts: 2,280
Location: Israel
shmoove
Offline
Forum Nokia Champion
Using sizes that are a power of 2 (like 16 and not 20), is usually better since the code can be optimized to take advantage of it in many places by using bit shifting instead of division and multiplication.

shmoove
Reply With Quote

#3 Old 2004-01-13, 15:22

Join Date: Nov 2003
Posts: 16
zono666
Offline
Registered User
Thanks,

Is this also true when using MIDP 2.0 tiledLayer Class?
Hopefully it is also optimized in this way, what do you think?

And how big can the differences be? The game runs around 18 fps with sprites and tiles not power of 2.
Last edited by zono666 : 2004-01-13 at 15:26.
Reply With Quote

#4 Old 2004-01-13, 15:25

Join Date: Mar 2003
Posts: 2,280
Location: Israel
shmoove
Offline
Forum Nokia Champion
I didn't implement the TiledLayer class so I can't say for sure. But it's possible. There can also be optimizations you'll find possible in your own code. In general it's always better to use powers of 2. Don't you like to do calculations better when your numbers of powers of 10?

shmoove
Reply With Quote

#5 Old 2004-01-13, 15:31

Join Date: Nov 2003
Posts: 16
zono666
Offline
Registered User
I also use MIDP 2.0 Sprite Class, so there really isn't any place to do my own optimization.

Does anybody know if MIDP 2.0 Sprite and TiledLayer Classes perform better with images that have heights and lengths measured in powers of 2?
Reply With Quote

#6 Old 2004-01-13, 16:25

Join Date: Mar 2003
Posts: 2,280
Location: Israel
shmoove
Offline
Forum Nokia Champion
Why don't you test it for yourself. Implement a simple scene with tiles and sprites that are powers of 2 and use the system timer to check the performance. Then run the same example with tiles and sprites that are not powers of 2.
But I will say it again: unless you have a good reason to make your tiles 20x20 there is no real reason not to use a power of 2. What exactly do you have to gain by using 20x20 tiles?

Quote:
I also use MIDP 2.0 Sprite Class, so there really isn't any place to do my own optimization.
The game logic could have code that could be optimized this way.

shmoove
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Forum Jump

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia 
RDF Facets: qdcZidentifierQSxhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomE2fforumE2fshowthreadE2ephpE3ftE3d18645X qdcZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qdcZtypeQUqfntypeZCommunityContentQ qdcZtypeQUqfntypeZE44iscussionQ qdcZtypeQUqfntypeZE44iscussionContentQ qdcZtypeQUqfntypeZE52esourceQ qdcZtypeQUqfntypeZWebpageQ qdcZtypeQUqmarsZManagedE52esourceQ qdcZtypeQUqwebZInformationE52esourceQ qdcZtypeQUqwebZPageQ qdcZtypeQUqwebZE52esourceQ qdcZtypeQUqrdfsZE52esourceQ qfnZtopicQUqfnTopicZentertainmentQ qfnZtopicQUqfnTopicZj2meQ qfnZtopicQUqfnTopicZjavaQ qfnZtopicQUqfnTopicZmediaQ qfnZtypeQUqfntypeZCommunityContentQ qfnZtypeQUqfntypeZE44iscussionQ qfnZtypeQUqfntypeZE44iscussionContentQ qfnZtypeQUqfntypeZE52esourceQ qfnZtypeQUqfntypeZWebpageQ qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX qrdfZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qrdfZtypeQUqfntypeZCommunityContentQ qrdfZtypeQUqfntypeZE44iscussionQ qrdfZtypeQUqfntypeZE44iscussionContentQ qrdfZtypeQUqfntypeZE52esourceQ qrdfZtypeQUqfntypeZWebpageQ qrdfZtypeQUqmarsZManagedE52esourceQ qrdfZtypeQUqwebZInformationE52esourceQ qrdfZtypeQUqwebZPageQ qrdfZtypeQUqwebZE52esourceQ qrdfZtypeQUqrdfsZE52esourceQ