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.
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
Subreddit
Post Details
- Posted
- 4 years ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/playmygame/...