Bug 19177 - Mario Kart canvas rendering glitch
Summary: Mario Kart canvas rendering glitch
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: Canvas (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac All
: P2 Normal
Assignee: Nobody
URL: http://www.nihilogic.dk/labs/mariokart/
Keywords: NeedsReduction
Depends on:
Blocks:
 
Reported: 2008-05-21 17:52 PDT by Matt Lilek
Modified: 2014-04-08 22:35 PDT (History)
9 users (show)

See Also:


Attachments
Screenshot (28.83 KB, image/png)
2008-05-21 17:53 PDT, Matt Lilek
no flags Details
Qt port glitches (51.66 KB, image/png)
2008-05-22 06:01 PDT, Pierre-Luc Beaudoin
no flags Details
Gtk port glitches 1 (43.63 KB, image/png)
2008-05-22 06:02 PDT, Pierre-Luc Beaudoin
no flags Details
Gtk Port glitches 2 (46.28 KB, image/png)
2008-05-22 06:03 PDT, Pierre-Luc Beaudoin
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Matt Lilek 2008-05-21 17:52:30 PDT
The characters Mario Kart game at <http://www.nihilogic.dk/labs/mariokart/> render weird when they turn - it's like the character is looping around to the other side of where it's supposed to be drawing. See the attached screenshot for more clarity.  Firefox 3rc1 on Leopard doesn't have the problem.
Comment 1 Matt Lilek 2008-05-21 17:53:02 PDT
Created attachment 21279 [details]
Screenshot
Comment 2 Matt Lilek 2008-05-21 17:53:51 PDT
Safari 3.1.1 and ToT both have this problem.
Comment 3 Pierre-Luc Beaudoin 2008-05-22 06:01:46 PDT
Created attachment 21289 [details]
Qt port glitches
Comment 4 Pierre-Luc Beaudoin 2008-05-22 06:02:24 PDT
Created attachment 21290 [details]
Gtk port glitches 1
Comment 5 Pierre-Luc Beaudoin 2008-05-22 06:03:03 PDT
Created attachment 21291 [details]
Gtk Port glitches 2

On the Qt port (r32870), the game area is white except for the karts.
On the Gtk port (r33044), the track can partially be seen if selecting the "Per line canvas", otherwise the game area is black.  The trees in the background are drawn though along with karts.

In both cases, the rendering glitch in the first screenshot can be seen.
Comment 6 Matt Lilek 2008-05-22 07:13:19 PDT
(In reply to comment #5)
> Created an attachment (id=21291) [edit]
> Gtk Port glitches 2
> 
> On the Qt port (r32870), the game area is white except for the karts.
> On the Gtk port (r33044), the track can partially be seen if selecting the "Per
> line canvas", otherwise the game area is black.  The trees in the background
> are drawn though along with karts.
> 
> In both cases, the rendering glitch in the first screenshot can be seen.
> 

It's probably worth splitting those off into separate bugs, unless Oliver thinks those are related to the Mario/Luigi/Princess weirdness.
Comment 7 Matt Lilek 2008-05-22 07:22:03 PDT
Also confirmed this happens on Windows
Comment 8 Oliver Hunt 2008-05-22 07:30:59 PDT
I believe the Qt issue is that they don't support patterns in canvas iirc

Gtk ones also look to be unrelated

--Oliver
Comment 9 Pierre-Luc Beaudoin 2008-05-22 08:21:54 PDT
Bug #19190 (Gtk) and Bug #19191 (Qt) have been raised separately as it looks like a regression on Gtk and missing code on Qt.

Never the less, the characters weirdness still applies to these 2 ports.
Comment 10 Oliver Hunt 2008-06-27 19:31:29 PDT
Pierre-Luc? the character also get truncated/offset incorrectly at times? (sorry for delay, didn't get cc mail for some reason)
Comment 11 Dirk Schulze 2008-08-20 23:47:18 PDT
The game has one image with ca. 33 pictures per driver. Every picture another perspective of the driver. It seems that drawImage(image, sx, sy, sw, sh, dx, dy, dw, dh) gets the wrong parameters. 
Either a problem of calculating in webkit or a failure in the script. 
I tendent to say it's a failure in the script, because opera has the same glitches like https://bugs.webkit.org/attachment.cgi?id=21279
Comment 12 Oliver Hunt 2008-12-28 21:52:45 PST
Hmmm, as far as I can tell the character sprites are drawn with divs on top of the canvas, not using canvas APIs at all.

Hyatt any thoughts?
Comment 13 Alexey Proskuryakov 2010-07-02 00:37:21 PDT
This is still an issue with Safari 5.
Comment 14 Martin Robinson 2014-04-08 18:00:04 PDT
I see no glitches with modern WebKitGTK+.
Comment 15 Alexey Proskuryakov 2014-04-08 22:35:16 PDT
I can still reproduce with Safari 7.0.3 on Mavericks.