You Are Here:

Community: Developer Discussion Boards

#1 Old Efficient rendering engine (problem with a big amount of .drawImage calls) - 2005-09-30, 09:13

Join Date: Nov 2003
Posts: 14
wedge_
Offline
Registered User
Hey everyone,

I'm currently developing a puzzle type of game. The game is basically ready, but there are some draw performance issues I am facing with certain devices. The problem areas performance wise in my game are (emulated) floating point calculations (non avoidable) and drawImage calls..

Basically game looks like this:
Code:
--------
|YYGGBB|
|RRDDVV|
|      |
|      |
In certain cases player is able to remove blocks from the game (the purpose), and blocks fall off the board, so say those 2 'B' blocks are removed from left upper corner, these blocks will fall from the screen, and so forth.
The problem is that when on board there are say, 60 different blocks, and multiple blocks are falling off, they need to be painted, and a block that is under a falling block needs to repainted too so it doesn't get corrupted. Currently as I don't know which blocks (in the block array) will get under (falling movement is randomized, they don't just drop down) so I need to draw all the blocks on the field (and the background of the board) to get uncorrupted image.

As one can imagine, this can cause up to 60 calls/frame to drawImage, to draw all the images, and this creates lag on certain devices.

I have been thinking of collision detection between dropping and static blocks, to see which blocks need redrawing, but I'm not sure if there could be something more efficient, still doing collision detection between 10 falling blocks and 50 static ones will cause alot of calculations too (10[falling balls] * 4[values to check] * 50[static balls to check against] = 2000 comparisons)

Somehow I still think it's possible to make more efficient drawing engine than just shitloads of drawImage calls, looking at some professional games that are out there, they seem to have heaps of sprites on the screen and still run smooth.

I've been wondering if it's possible to use System.arraycopy to an offscreen image somehow from byte information of images and then just drawing one image to the screen.. ? If someone could point to some advanced rendering tips or a book I would appreciate that..

Thanks for the trouble
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
Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem in making calls prathimakotha General Symbian C++ 0 2005-07-01 07:55
Engine class naming convention problem lauyk001 General Symbian C++ 1 2004-11-23 06:04
What is the real problem to receive data calls with Nokia TDMA cel modems? jackal_jr PC Suite API and PC Connectivity SDK 1 2002-12-09 10:02
What is the real problem to receive data calls with Nokia TDMA cell modem? jackal_jr PC Suite API and PC Connectivity SDK 0 2002-12-04 17:05
What is the real problem to receive data calls with Nokia modem phones? jackal_jr General Messaging 0 2002-12-04 16:46

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