palashbansal / pacman Goto Github PK
View Code? Open in Web Editor NEWGame based on collision detection in Javascript
Home Page: http://palashbansal.github.io/Pacman
License: MIT License
Game based on collision detection in Javascript
Home Page: http://palashbansal.github.io/Pacman
License: MIT License
Red ball is going out of boundary from right and bottom edge.
ball should not go out of window like in top/left edges
ball goes out of window partially
On successfully hovering pacman over cherry, cherry stays and is not able to detect collision with pacman.
Occurs 50% of the time.
Collision with cherry should be sensitive enough.
Not able to take bonus cherries most of the times.
Bot will be controlling movement of red dot, and will prevent from colliding as much as it can.
Is your feature request related to a problem? Please describe.
Bringing pacman/ghosts images changes game a lot.
Remember that game was created based on escapa game, which got lost.
Describe the solution you'd like
Better keep both the game modes.
Create an option to switch to basic game, retaining red ball/ white obstacle part.
Grabbing food is quite easy sometimes, can make it interesting by bouncing it off whenever any obstacle hits it.
Bouncing must happen with good speed and slowly decrease to 0 i.e. resting state.
The direction of movement of food must be determined by where the obstacle is hitting it.
Optional:
Bounce speed can vary based on which obstacle hits, a bigger obstacle creates better momentum.
Note: It may happen that 2 obstacles are hitting the food one after other, in that case, food must bounce in different direction.
Game speed can vary based on memory load on the browser and system capabilities. FPS feature can be created to indicate game being with sufficient speed or not.
favicon not visible clearly. to create less detailed, better visible favicon.
.
gif pacman icon would be preferable.
if gif not supported by favicon, then normal red pacman bitmap can be used.
Is your feature request related to a problem? Please describe.
Describe the solution you'd like
Describe alternatives you've considered
Additional context
Is your feature request related to a problem? Please describe.
It's a standard to provide capability for user to play with keyboard itself.
Describe the solution you'd like
Arrow keys support can be provided so gamer can just press up/down/left/right to move pacman. (2 keys simultaneously to bring diagonal movement)
Support for WASD keys would be good add-on.
https://github.com/PalashBansal/Collision/pull/29/checks?check_run_id=1052962066
In header-
Run actions/first-interaction@v1
/usr/bin/docker run --name b3ac6d446532dbae243d6a2bd1c54febc8dbd_9cf1e8 --label 3b3ac6 --workdir /github/workspace --rm -e INPUT_REPO-TOKEN -e INPUT_ISSUE-MESSAGE -e INPUT_PR-MESSAGE -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e RUNNER_OS -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/Collision/Collision":"/github/workspace" 3b3ac6:d446532dbae243d6a2bd1c54febc8dbd
[@octokit/rest] `const Octokit = require("@octokit/rest")` is deprecated. Use `const { Octokit } = require("@octokit/rest")` instead
[@octokit/rest] `const Octokit = require("@octokit/rest")` is deprecated. Use `const { Octokit } = require("@octokit/rest")` instead
Checking if its the users first contribution
Checking...
Checking...
Adding message: Hello @xxx, thank you for submitting your first PR! -Palash to pull request 29
##[error]Resource not accessible by integration
A solution such that we don't have to reload page from mouse but keyboard, and not to reload webpage.
Like in many games, a star appears and player becomes immune to any kill for limited amount of time. Eg.: The famous "Super Mario bros"
A Star(or something else, open to creativity) appears for some time after random interval, at random location inside game canvas.
If player manages to hit it, make pacman immune to collision with obstacles for some time.
"Best Score" gets updated with "Current Score" at first run but doesn't get saved in browser cookies.
Best score should be highest recorded until cookies are cleared.
Best score is not getting stored in browser cookies
All game objects- logo, insctructions, game window appear fixed size. Can be changed to relative size. For, bigger resolution monitors, game looks same small size.
Game objects(width and height) should be changed based on monitor resolution.
Game objects are of same size.
A score sharing button can be created for users to share their highest score on regular social media- fb, twitter, etc.
btc using href-
bitcoin:
Show QR code for btc address
Keep the message poped out for more time (eg.- 3secs) and reduce the hidden time (eg.- 1.5secs)
Also show message the moment collision happens.
Message should appear immediately and should be there on screen for longer duration.
Also, font size and color can be changed for better readability.
Message takes time to appear initially. Also, it resides for same time 1sec based on below code snippet-
callBlink();
}, 1000);
It is easy to keep playing game if FPS is low due to browser performing poorly. User can himself tweak the browser to get better at score.
Game is easy to play and high score can be achieved easily
Score should not be considered for best score.
Copy address button for email address doesn't show tooltip with email on button click while that for BTC address does.
Red dot can be changed to a pacman .gif image(with mouth opening closing animation) which looks more meaningful iff-
we create an additional feature- food randomly getting placed and pacman need to be hovered over to make it eat the food(to get additional score as bonus point eg.- +20)
"Move cursor to avoid collision!" can be included with "HOW TO PLAY:" section of the game.
Issue:
Food appears but can get unnoticed as blends with obstacles.
Solution:
None of the obstacles blinks but only moves, so blinking food will grab attention of player.
Blinking of food must happen all the time and not just in last few seconds before disappearing as happens in games usually.
Is your feature request related to a problem? Please describe.
"โบ Reload page to start new game." - can be changed to "right click to start new game" and reload of game functionality can be improved.
Its's really frustrating to keep on pressing F5
Describe the solution you'd like
Page reload should never be required. Instead, state of the game can be saved and reset after every right click from mouse event.
"Collision Detected! Game Over!" message appears below game objects(red ball and probably white obstacles)
"Collision Detected! Game Over!" should be topmost layer
Some part of text "Collision Detected! Game Over!" gets hiddden behind red ball.
"Collision Detected! Game Over!"
"Copy address" button not working. BTC address should be added to clipboard and tooltip should change accordingly.
clipboard should be overwrited by btc public key
button not responding(only tooltip is appearing)
Too much code duplicacy. Redundant code can be removed from both index.htm and Game.js
Code snippets like-
DetectCollision("whiteDot1");
DetectCollision("whiteDot2");
DetectCollision("whiteDot3");
DetectCollision("whiteCircle");
DetectCollision("whiteSquare");
DetectCollision("whiteRect");
DetectCollision("whiteSquare1");
DetectCollision("whiteSquare2");
DetectCollision("whiteSquare3");
DetectCollision("whiteSquare4");
DetectCollision("whiteSquare5");
DetectCollision("whiteSquare6");
DetectCollision("whiteSquare7");
DetectCollision("whiteSquare8");
Can be created in one line after pushing all obstacles in an array and passing to DetectCollision(); like-
var whiteObstaclesArr[] = {"whiteDot1","whiteDot2",....};
foreach(var whiteObstacle in whiteObstaclesArr)
DetectCollision(whiteObstacle);
Is your feature request related to a problem? Please describe.
It's a standard to provide capability for user to play with keyboard itself.
Describe the solution you'd like
Arrow keys support can be provided so gamer can just press up/down/left/right to move pacman. (2 keys simultaneously to bring diagonal movement)
Support for WASD keys would be good add-on.
Is your feature request related to a problem? Please describe.
Clicking on btc address should automatically open installed default app for btc wallet if available.
Is your feature request related to a problem? Please describe.
Clicking on email address should automatically open the paypal donate webpage.
Is your feature request related to a problem? Please describe.
It's a standard to provide capability for user to play with keyboard itself. Functionality is there now but can be improved.
Describe the solution you'd like
Arrow keys support can be provided so gamer can just press up/down/left/right to move pacman. - (Already implemented in #50)
Two keys simultaneously to bring diagonal movement(For eg.- top and right arrow or W+D to move to right up diagonal)
Game starts only on left click on pacman. Game should also start by pressing any movement key.
Best score is retained if-
reloading tab by reload button
or, pressing enter on URL
or, reopen closed tab
but not when reopening http://palashbansal.github.io/Collision/ again in fresh tab or window
Best score should always be there until user himself clears "Browsing data"
Best score is gone too soon.
Is your feature request related to a problem? Please describe.
Food can be placed randomly, which can/cannot be moving. It can move by colliding with obstacles.
Pacman can eat it to get bonus score of +20 poping up in current score(and also in best score if best score is also increasing)
1 food at a time, it can be pacman game ghosts.
Is your feature request related to a problem? Please describe.
white obstacles look naive. change it to meaningful images for better game experience.
Similar to #13 issue
images like shown in https://www.stickpng.com/img/games/pac-man/pacman-yellow-ghost can be used
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.