Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Random shapes cover the playing area #162

Open
TJScalzo opened this issue Jan 14, 2016 · 18 comments
Open

Random shapes cover the playing area #162

TJScalzo opened this issue Jan 14, 2016 · 18 comments

Comments

@TJScalzo
Copy link

Random shapes appear at the top of the screen that cover the hexagon. It's pretty annoying and I'm not sure why it's happening. I'm on a 2011 MacBook Pro playing in Safari. Is it just because I have an old computer?

Image 1
Image 2

@lengstrom
Copy link
Member

No, that's a canvas problem. I'm not sure why we have that problem. @garrettdreyfus and I will look into it.

@lengstrom
Copy link
Member

Do you have any steps towards recreating that problem?

@TJScalzo
Copy link
Author

I'm using Safari Version 9.0.2 (9537.86.3.9.1). I'm on a MacBook Pro 2011. Hm... what other information are you looking for?

@TJScalzo
Copy link
Author

Well I don't know what changed (if anything) but there aren't any shapes covering the game anymore. That's a little strange...

@rechl
Copy link

rechl commented Apr 11, 2016

I have the same problem on Safari on iOS 9.3. you can recreate this problem ( on a Mac at least) with the iOS simulator.

@lengstrom
Copy link
Member

Do you guys have the problem on https://hextris.io/ still?

@rechl
Copy link

rechl commented Apr 12, 2016

Yes it still exists. :(
I investigated further. Seems to depend on actual screen size or ratio.
Set the window height to 720px or 768px and it happens also on Chrome 49 on Mac

@lengstrom
Copy link
Member

Thanks for further info! I'll look into it. Also, pull requests are welcome
:)

On Tue, Apr 12, 2016 at 5:20 AM, sgotre notifications@github.com wrote:

Yes it still exists. :(
I investigated further. Seems to depend on actual screen size or ratio.
Set the window height to 720px or 768px and it happens also on Chrome 49
on Mac


You are receiving this because you commented.
Reply to this email directly or view it on GitHub
#162 (comment)

@hhiptmair
Copy link

adding a font definition (e.g. "px Exo") to the renderText(...) calls in view.js seems to fix the problem:

change
renderText(trueCanvas.width / 2 + gdx + 6 * settings.scale, trueCanvas.height / 2 + gdy - 155 * settings.scale, 150, "#2c3e50", "Hextris");
to
renderText(trueCanvas.width / 2 + gdx + 6 * settings.scale, trueCanvas.height / 2 + gdy - 155 * settings.scale, 150, "#2c3e50", "Hextris", "px Expo");
etc

at least for me, this fixed an issue with huge text-overlays in the canvas.

@rechl
Copy link

rechl commented Apr 25, 2016

Thanks for proposal @hhiptmair !
I will try this and create PR if it works!

@hhiptmair
Copy link

even better: just remove the "20" in the renderText-definition:
var font = 'px Exo';

@rechl
Copy link

rechl commented Apr 27, 2016

@hhiptmair you proposal worked fine regarding the visual elements.
see http://teraone.github.io/hextris/

Unfortunately I still can not play within the iOS Simulator on iPad. We should try on a real device.
Do you have an suggestions for debugging canvas elements in (mobile) safari?

@lengstrom
Copy link
Member

Chrome debugger console works well (you can emulate a mobile platform). Sorry I'm not more involved right now because of finals - I'll definitely fix this by the time finals end in late May.

@hhiptmair
Copy link

hhiptmair commented Apr 28, 2016

there is a problem with used device-detection when playing on an iPad. that's why the touch-event-bindings never happened on it.
to fix it: in initialization.js replace the line
if (/Android|webOS|iPhone|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent))
with
if (/Android|webOS|iPhone|iPod|iPad|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent))

@hhiptmair
Copy link

@sgotre for debugging canvas elements, the inspector-tool (switch to canvas in the menu) of firefox is quite powerful. but i assume there are plugins for chrome too

@lengstrom
Copy link
Member

Thanks! I'll test and deploy in a few weeks.

hhiptmair added a commit to hhiptmair/hextris that referenced this issue May 2, 2016
hhiptmair added a commit to hhiptmair/hextris that referenced this issue May 2, 2016
@ToStr1
Copy link

ToStr1 commented Sep 12, 2017

Windows 10 Chrome Version 60.0.3112.113 still experiencing this bug.

@peter-jerry-ye
Copy link

Windows 10 Firefox Version 69.0.1 still experiencing this bug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants