Frame Rate Test for tile-based games test results. [Confused inspiration]

Source: Internet
Author: User

Http://discussion.forum.nokia.com/forum/showthread.php? S = db67f2a788859f04447a0e9bfd9f05e9 & threadid = 33852 & perpage = 15 & pagenumber = 2

Frame Rate Test for tile-based games

Hi, all.

Recently there were pretty much discussions on which method is faster and more efficient
For using in tile-based games.
I was also interested in the issue, of course

I spent some free time and created small test that rather reallistically models typical
Situation:

It fills screen with 16x16 pixel tiles and then draws 3 "Actor" images. For each drawing
Method I move actors pixel by pixel from left to right.

After the test you have the following info:

1. FPS: frames per second for each method tested
2. Total time and total frames for each method
3. Amount of tiles per frame = width_in_tiles * height_in_tiles + number_of actors
4. Amount of milliseconds per single Tile painting-this parameter might be useful
If you try to optimize your game by repainting only needed areas
5. textual method description. on very small screens might not fit to the screen

Here are the methods tested:
1. Graphics & immutable: paints images using graphics. drawimage () and preserving
Transparency
2. Graphics & mutable: Same, but with mutable images. Hence, no

Transparency
3. Graphics & mutable by directutils: Same, but mutable image is created by directutils.
No transparency
4. directgraphics & immutable: paints Images Using directgraphics. drawimage.
Transparency.
5. directgraphics & mutable: paints mutable Images Using directgraphics. drawimage.
No transparency.
6. directgraphics & converted Arrays: paints Images Using drawpixels in native
Phone format. No transparency.
7. directpixels & prepared Arrays: paints Images Using drawpixels and arrays read
From files in type_ushort_4444_argb format. With transparency

Dwarf in Nokia Forum

Anyway, we can already make some
Conclusions. For Series 40 and Series 60 straight MIDP 1.0. graphics is the fastest
Or almost the fastest option.

For some Series 40 devices standard graphics is too slow, while drawpixels in native
Format is the best.

...
There is one issue...
Drawpixels & converted arrays goes in native format without transparency and
Drawpixels and prepared array goes in argb_4444 format with transparency.

I suppose it wocould be nice to add testing converted arrays with transparency or
Least to show what the native format is.

Does anybody want to make these additions to the open source code?
Then Ican publish it on the same place in the web.
As I'm doing it in my free time, myself I'll probably find some time for modifications
Not earlier than in a week

6610 v4.18

113 frames, 67 tiles per frame

Graphics & immutable
11.2304 FPS, 1.3093 MS per tile

Graphics & mutable
12.2070 FPS, 1.2050 MS per tile

Graphics & mutable by directutils
11.4746 FPS, 1.2954 MS per tile

Directgraphics & immutable
6.5917 FPS, 2.2580 MS per tile

Directgtaphics & mutable
6.5917 FPS, 2.2500 MS per tile

Drawpixels & converted Arrays
15.1367 FPS, 0.9721 MS per tile

Drawpixels & prepared Arrays
8.0566 FPS, 1.8281 MS per tile

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.