Coming soon - Get a detailed view of why an account is flagged as spam!
view details

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

1
I made a text based pong game over the weekend
Post Body

www.noguiping.xyz

Here is a lengthy description of what the game is: pong, but without graphics. I imagined the idea of the game last Friday and made myself laugh, so I'm proud of myself of seeing it through.

The hardest part of the game has been making it work on mobile (not even sure if it works well on a small screen, but it works on my small tablet) and making the controls work well for both touch and mouse.

I learned about the viewport from making this, so that's very important.

If anyone is interested, I also wrote a note for myself of everything I had to do to make the game playable on mobile. The punctuation isn't great because it was just text-to-speech, sorry.

I had to edit the HTML and add a viewport element In the HTML I set the inability to zoom in and out because double tapping on the phone causes zooming

I use a previous function that I made called isMobile and set different margins and with settings or the main element

I had to cancel out onclick and onmouseenter event and the unclick events because those caused the ball to perpetually move due to the code I had set up and I had to substitute with on touch start and on touch end

to solve the problem of having the text be selected on clicking I had to do something pretty weird I created a very tiny input field and every time you click on the main element it selects the text in that field therefor overriding any selection the player might have but it's not perfect and still once in a while to player accidentally selects the button the best solution is probably to not use an ASCII character for button names unfortunately it's probably best to use an image instead

Author
Account Strength
100%
Account Age
15 years
Verified Email
Yes
Verified Flair
No
Total Karma
647,322
Link Karma
110,472
Comment Karma
533,603
Profile updated: 1 day ago
Posts updated: 4 months ago

Subreddit

Post Details

We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
4 years ago