codecademy / 40phaser Goto Github PK
View Code? Open in Web Editor NEWCodecademy's 404 page! ✨
Home Page: https://codecademy.com/errors/404
License: MIT License
Codecademy's 404 page! ✨
Home Page: https://codecademy.com/errors/404
License: MIT License
Currently, when a player hits the end screen they'll always see the text: "So Close!".
There should be some logical check for how the current score compares to the existing high score (if it exists at all) and display matching text.
For instance:
If the scores match ("Wow! Same high score!")
If a new high score ("Amazing, new high score!")
If less than high score ("So Close!") or ("Maybe next time")
The text can also be randomly chosen from an array of possible sayings.
🙃
There are two types of places in code that still rely on a global (window
) Phaser
object existing:
index.js
, which contains type: Phaser.AUTO
Phaser.Scene
Both of the above crash if the global doesn't exist.
We've duplicated a type definition for this repo a few times now:
To DRY things up, we should add this definition to this repo.
The type def we've used (at time of this issue creation) is:
declare module '40phaser' {
export type LaunchOptions = {
phaser?: typeof Phaser;
phaserOptions: {
parent?: string;
};
};
export const launch40Phaser: (options: LaunchOptions) => void;
}
Along with #6 (publishing an npm package), we'll want this to be import
able as an npm module. Ideally something like:
import { launch40Phaser } from "40phaser";
window.onload = () => {
launch40Phaser({
buttonGameStart: document.getElementById('game-start'),
buttonGameReplay: document.getElementById('game-replay'),
app404: document.getElementById('app-404'),
appEnd: document.getElementById('app-end'),
});
};
Currently, the text in a button that leads to the Phaser Course reads as 'Build your own'.
This text should be more descriptive to match its action.
Also, consider linking to the skill path instead of the course. (Double check free vs pro statuses on each).
If the course is free - leave the link as is.
There's currently a placeholder state, the task would be to implement the end state so that 'game over' message appears, players can see their score and play again.
I want to be able to play this thing on my phone when viewing the 404 page in Desktop Mode 😄. The game works but there's no way to control the player. Let's have them jump when the screen is touched.
Precursor to #8 being used for anything.
Should each scene have its own file?
Following #4. I'll take this one on.
It's a bit confusing reading it without context. I thought it was part of debug information at first...
I forgot to delete it i resolving #18...
Following #17:
I don't know Phaser best practices and I don't know how to message pass between scenes... in the meantime, made a state.js file that keeps the game so they can start other scenes. I'm hoping there's an easier way to get around this.
💖 linting!
We want to be able to message to a parent that, say, someone has started the game.
There is no documentation regarding how to publish new versions of the npm package
Following #7: results came back in and the game needs to be narrated to screenreader. We should add role="img"
and an aria-label
so the game can be narrated.
Are these what we'd consider... unit tests?
There are two styles of storing state info in scene files:
let someState = false;
this.someState = false;
Standalone variables don't cause bugs directly, but can lead us to introducing bugs if we don't properly reset them when entering a scene.
Right now because of the resolution, it look a bit illegit like a sidebar ad.
If there's some kind of way to use vector fonts or render the canvas at higher resolution, it would fit in better with the rest of the Codecademy site!
Currently, users can only pause the game by clicking the "pause" button.
It would be nice to add an event listener to the "p" key to also allow for pausing.
Additional, if possible underline "P" in "pause" to suggest it does something.
Remove instances of gamePlaying
and replace it with isPaused
to be more straightforward and in line with how games are set up.
We'll need to make sure this is accessible. Tools such as aXe are useful for checking these. Ideally we'd also have tests set up to catch basic accessibility issues.
😬 . Awkward.
As reported by @LinKCoding in #59. https://www.npmjs.com/package/http-server claims we can reduce it:
-c
Set cache time (in seconds) for cache-control max-age header, e.g.-c10
for 10 seconds (defaults to3600
). To disable caching, use-c-1
.
That's the official Codecademy font 😄 . If 40phaser is on a page where it's available, it should be used.
Is it more standard to use an underline to indicate a shortcut? We think the parenthesis are enough notice (and it's in the aria-label
), but as a fun good first issue
, this might be a nice little quality of life improvement.
Currently, Codey's fall is a bit anticlimactic. Let's add some flair to their downfall with some camera shake and a fade.
Following #7: results came back in and the game would benefit from having have shortcuts everywhere, such as for folks who don't have a mouse. Right now it only has shortcuts for some actions (namely P to pause/play).
A little convenient to check this in for VS Code users like me! ✨
I think an "invisible box/button" that links to this repo would be a nice to have.
Couple of ideas:
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.