difference in layout: FF vs IE

Get help using Construct 2

Post » Sat May 12, 2012 5:16 pm

In my game "Rastermind" is see differences between the layout in IE and FF. I created the game using FF. Now i get bugreports about wrong placings of objects. At first i didn't understand, until someone reported he was using IE.

I tried the game in IE, and indeed, the placings of some objects are wrong. Now, i did place the object wrong intensionaly (a little lower then wanted) because the objects were higher placed in FF.

So basicly its not IE thats going wrong, but its FF placing the objects to high. Does anybody has a solution for this problem?

Thanks in advance!
MAD (Mark aka Dark)
B
19
S
6
G
3
Posts: 33
Reputation: 2,712

Post » Sat May 12, 2012 5:43 pm

Can you share a .capx reproducing the problem?

Rendering differences between browsers are very rare, so I would suspect the real problem is something else.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,518

Post » Sat May 12, 2012 6:10 pm

@Ashley I noticed this aswell. Text objects are always displayed a fex pixels higher in Firefox.

http://dl.dropbox.com/u/8367729/construct/example/textAlignment.capxramones2012-05-12 18:11:00
B
54
S
28
G
18
Posts: 1,520
Reputation: 24,990

Post » Sat May 12, 2012 7:20 pm

And here is mine.

http://dl.dropbox.com/u/43534527/1to100.capx
B
19
S
6
G
3
Posts: 33
Reputation: 2,712

Post » Sun May 13, 2012 1:11 pm

Another more "FF" Text/Font bug no ? In my game "FF" loose Italic attribute of my font so => "Chrome" ... IE and Chrome Text/Font display seems nearly the same (except always in front Chrome text display) so i consider them as the "good" behaviour.

(Mark4Media ... numbers in black and font change => really good !)


naelian2012-05-13 13:17:46
B
16
S
5
G
3
Posts: 298
Reputation: 5,240

Post » Sun May 13, 2012 5:08 pm

So this is specific to Text objects, not Sprites or Tiled Backgrounds?

This is kind of to be expected - text is one thing browsers do not implement identically, because there are many different ways to draw text. See the section on 'Text rendering' in the manual.
Scirra Founder
B
359
S
214
G
72
Posts: 22,946
Reputation: 178,518

Post » Sun May 13, 2012 6:19 pm

Hi,

As i read the manual about text rendering and the best practices page i got the feeling that nothing can be done about it? Or would changing to webfonts help?

Kind regards,
MAD
B
19
S
6
G
3
Posts: 33
Reputation: 2,712

Post » Sun May 13, 2012 6:40 pm

This is what I'm doing now.



Seems to do the job.
B
54
S
28
G
18
Posts: 1,520
Reputation: 24,990

Post » Sun May 13, 2012 6:47 pm

haha, great,

I was just going to ask this when a saw your post!
I think i'll going to do this:
at the beginning i lookup if the browser is firefox.
If it is i set a variable to 1.

When the raster is build i'll implement an or/else, at which the variable will set the difference.

But that's going to be tomorrow... Thanks again!

Kind regards,
MAD (Mark aka Dark)
B
19
S
6
G
3
Posts: 33
Reputation: 2,712

Post » Sun May 13, 2012 7:17 pm


Thinking about this some more. Set textYOffset to 0 or 6 depending on browser and then add it to any text you place on screen. I think this is cleaner than using if/else every time you place text.
B
54
S
28
G
18
Posts: 1,520
Reputation: 24,990

Next

Return to How do I....?

Who is online

Users browsing this forum: Sotir31, Zebbi and 23 guests