You Are Here:

Community: Developer Discussion Boards

Reply « Previous Thread | Next Thread »

#1 Old Device 6280 - LayerManager and Sprite - strange behavior - 2006-06-19, 09:36

Join Date: Mar 2003
Posts: 2
selaoren
Offline
Registered User
I have a Class that extends from class Sprite.
After I append this class to a LayerManager object
I'm using the Sprite functions defineReferencePixel() and setRefPixelPosition() to set the object position.
The problem is that it seems the object is not drawing in the right place
to be precise, twice more on the X and Y axis.
the code works fine on other devices except the nokia 6280,
anyone know of this problem or a workaround?
Reply With Quote

#2 Old Re: Device 6280 - LayerManager and Sprite - strange behavior - 2006-06-26, 21:32

Join Date: Apr 2003
Posts: 6,408
Location: USA, CA
hartti's Avatar
hartti
Offline
Nokia Expert
selaoren, have you been able to solve your problem? I do not exactly understand what you mean with "twice more on the X and Y axis". Have you tried with other handsets or emulators? If yes, is the behavior different?

If you still have a problem, would it be possible to see a code sample and more detailed explanation what goes wrong.

Hartti
Reply With Quote

#3 Old Post Re: Device 6280 - LayerManager and Sprite - strange behavior - 2006-06-28, 11:19

Join Date: Mar 2003
Posts: 2
selaoren
Offline
Registered User
hi hartti,
i encountered the problem only on the nokia 6280 handset & emulator.
other handsets like nokia 6680 worked just fine.
here's a more detailed explanation of the problem:
assume i have a sprite 50x50 pixels that i want to draw at (100,100) display coordinate. I want to set a reference point to hold it from it's bottom center, so i use defineReferencePixel(25,49) and then call setRefPixelPosition(100,100).
the expected result would be to see the sprite drawn (top left) at (75,51),
but the actual result on the 6280 is that the sprite is drawn (top left) at (50,0) which is twice the pixel delta.
if i call defineReferencePixel(12,24) i will get the (75,51) desired result but in that case, beside the fact that this is a patch up solution, i also encounter problems while trying to apply transformation on the sprite.
at the moment, i solved the problem by just overriding the defineReferencePixel() and setRefPixelPosition() functions, and implement them by myself (though the transformation issue wasn't completly solved).
i would like to mention that the sprite is a part of a LayerManger object, and is drawn by calling the LayerManager's paint().
do you know about this bug, or have any suggestions?
thanks,
oren
Reply With Quote

#4 Old Question Re: Device 6280 - LayerManager and Sprite - strange behavior - 2006-07-08, 18:43

Join Date: Jul 2006
Posts: 25
Location: Berlin
ray()'s Avatar
ray()
Offline
Registered User
hi,

i encountered the same problem.

a rotation of a 2-frames image around a refpoint inside the first frame (myObject.defineReferencePixel(4,49)) goes wrong the way, that the centre of the rotation is drawn some pixels above the position the sprite is appended to the layerManager.

I cannot really measure a pixel count, because only have a dig. video showing the behavior, but it seems that seleaoren is right in his theory.

the problem did not occure on other handsets from different manufacturers (two hands full tested, nokia included).

any patch or workaround in sight?

regards ray()
Last edited by ray() : 2006-07-08 at 18:46. Reason: some additions
Reply With Quote

#5 Old Re: Device 6280 - LayerManager and Sprite - strange behavior - 2006-07-11, 18:37

Join Date: Jul 2006
Posts: 1
p3pp8
Offline
Registered User
i have da same problem.........and i've encountered it only on a 6280 device too..........did you've found any solution to the problem?
regards
Reply With Quote

#6 Old Re: Device 6280 - LayerManager and Sprite - strange behavior - 2006-07-12, 09:20

Join Date: Jul 2006
Posts: 25
Location: Berlin
ray()'s Avatar
ray()
Offline
Registered User
not at the moment. seleaoren already described a workaround (for 6280 only, same thread, other branch). but i didn't check it, because i'm more than busy. will be later.
Reply With Quote

#7 Old Re: Device 6280 - LayerManager and Sprite - strange behavior - 2006-07-18, 12:28

Join Date: Jul 2006
Posts: 25
Location: Berlin
ray()'s Avatar
ray()
Offline
Registered User
hi selaoren,

can you tell me the (range of) return(s) System.getProperty ("microedition.platform") delivers for any affected device?

tia ray()
Reply With Quote

#8 Old Question Re: Device 6280 - LayerManager and Sprite - strange behavior - 2006-07-19, 15:15

Join Date: Jul 2006
Posts: 25
Location: Berlin
ray()'s Avatar
ray()
Offline
Registered User
sorry, may be this was a little bit to short.

i would like to know, how to tell the correct phones from the 6280-family. i suspect that System.getProperty("microedition.platform") will provide this information.

because there is no 6280 accessible at the moment, it would be nice to read here what returns are to be expected for the "family".

may be i'm totally wrong and System.getProperty ("microedition.platform") cannot help me, what are you doing to patch your games when?

ray()
Reply With Quote

#9 Old Re: Device 6280 - LayerManager and Sprite - strange behavior - 2006-07-19, 15:17

Join Date: Jul 2006
Posts: 25
Location: Berlin
ray()'s Avatar
ray()
Offline
Registered User
hi oren,
can you please provide me a link to a 6280 emulator. i couldn't find one.
regards ray()
Reply With Quote

#10 Old Re: Device 6280 - LayerManager and Sprite - strange behavior - 2006-07-19, 19:36

Join Date: Apr 2003
Posts: 6,408
Location: USA, CA
hartti's Avatar
hartti
Offline
Nokia Expert
The Series 40 3rd Edition SDK contains the emulator one should use for 6280 testing.
http://www.forum.nokia.com/info/sw.n...form_SDKs.html

The "microedition.platform" is the correct property string. The return string starts with "Nokia6280" for 6280 phones.

Hartti
Reply With Quote

#11 Old Smile Re: Device 6280 - LayerManager and Sprite - strange behavior - 2006-07-20, 09:17

Join Date: Jul 2006
Posts: 25
Location: Berlin
ray()'s Avatar
ray()
Offline
Registered User
good news. thanks ray()
Last edited by ray() : 2006-07-20 at 09:19. Reason: added an icon to the posting
Reply With Quote

#12 Old Re: Device 6280 - LayerManager and Sprite - strange behavior - 2006-07-20, 10:59

Join Date: Jul 2006
Posts: 25
Location: Berlin
ray()'s Avatar
ray()
Offline
Registered User
hi hartti,

i assume devices not returning "Nokia6280" will not show this issue. am i right?

ray()
Reply With Quote

#13 Old Question Re: Device 6280 - LayerManager and Sprite - strange behavior - 2006-07-20, 13:16

Join Date: Jul 2006
Posts: 25
Location: Berlin
ray()'s Avatar
ray()
Offline
Registered User
(A)

this doesn't seem to be the case. the emulator returns "Nokia6270/p03.20" AND shows the issue.

BTW: the handset where the issue occured returns "Nokia6280/03.60"

so maybe i have to handle a wildcarded return of "Nokia62*/*03.*" ???

will this target all issued handsets?


(B)

the patch oren suggested (set the refpixel to half x and half y needed) failed because transformations (combinations of rotations and mirrors) lost their correct centre.

instead i only added the refpixels coordinate to the sprites coordinate and the transformations worked well (at their correct location)

this is my favorite workaround.

regards
ray()

p.s. can anybody answer (A)?
Last edited by ray() : 2006-07-20 at 15:32. Reason: another patch added
Reply With Quote

#14 Old Re: Device 6280 - LayerManager and Sprite - strange behavior - 2006-07-21, 13:26

Join Date: Jul 2006
Posts: 25
Location: Berlin
ray()'s Avatar
ray()
Offline
Registered User
hi all,

if nobody knows if a wildcarded return of "Nokia62*/*03.*" would cover all affected devices, may be someone knows where i can read this (a link, a book, ...??

tia

ray()
Reply With Quote

#15 Old Exclamation Re: Device 6280 - LayerManager and Sprite - strange behavior - 2006-07-21, 18:01

Join Date: Jul 2006
Posts: 25
Location: Berlin
ray()'s Avatar
ray()
Offline
Registered User
dear friends,

i think it's now time to open a new branch for this thread.

here is a short description for the issue:

- a sprite which's refpixelposition was set to a delta value, will be transformed regarding this refpixel, but the delta value is not used for positioning the sprite


let me summarize, what was done in the meanwhile

a) in former branches 2 workarounds were described:

1. Modify the sprites refpixelposition (transformations will work regarding a changed refpixel)
2. Modify the sprites location (add the delta value)


b) the issue is reproducable with the series 40 sdk 3rd edition emulator


c) the emulator shows the issue for an emulated nokia 6270, the issue was originally reported for a Nokia6280. there was no further device affected reported (but one can be supected below the series 40 sdk 3rd edition implementors)

d) the idea is to deal with the return of System.getProperty("microedition.platform") to determine a device affected.

this is the status quo

ray()
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
animating separate Spriteson top of LayerManager idrop Mobile Java General 0 2003-10-13 16:38

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: qdcZidentifierQSxhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomE2fforumE2fshowthreadE2ephpE3ftE3d127641X qdcZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qdcZtypeQUqfntypeZCommunityContentQ qdcZtypeQUqfntypeZE44iscussionQ qdcZtypeQUqfntypeZE44iscussionContentQ qdcZtypeQUqfntypeZE52esourceQ qdcZtypeQUqfntypeZWebpageQ qdcZtypeQUqmarsZManagedE52esourceQ qdcZtypeQUqwebZInformationE52esourceQ qdcZtypeQUqwebZPageQ qdcZtypeQUqwebZE52esourceQ qdcZtypeQUqrdfsZE52esourceQ qfnZtopicQUqfnTopicZentertainmentQ qfnZtopicQUqfnTopicZgamesQ qfnZtopicQUqfnTopicZj2meQ qfnZtopicQUqfnTopicZjavaQ qfnZtypeQUqfntypeZCommunityContentQ qfnZtypeQUqfntypeZE44iscussionQ qfnZtypeQUqfntypeZE44iscussionContentQ qfnZtypeQUqfntypeZE52esourceQ qfnZtypeQUqfntypeZWebpageQ qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX qrdfZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qrdfZtypeQUqfntypeZCommunityContentQ qrdfZtypeQUqfntypeZE44iscussionQ qrdfZtypeQUqfntypeZE44iscussionContentQ qrdfZtypeQUqfntypeZE52esourceQ qrdfZtypeQUqfntypeZWebpageQ qrdfZtypeQUqmarsZManagedE52esourceQ qrdfZtypeQUqwebZInformationE52esourceQ qrdfZtypeQUqwebZPageQ qrdfZtypeQUqwebZE52esourceQ qrdfZtypeQUqrdfsZE52esourceQ