Live data from Hacker News

My son (9 yrs old) used plain JavaScript to make a game, and wants your feedback

armaansahni.com

111–120 of 493 posts

Re: My son (9 yrs old) used plain JavaScript to make a game, and wants your feedback

#111

Great game. I'm very impressed that a 9 year old made this. A few suggestions: 1. Take input on the page rather than through a prompt. Current implementation breaks immersion. 2. I'd like there to be some time pressure. This can be done either by the opponent making their attacks on a timer (rather than taking turns the way it's done now) or by putting an explicit countdown for how long you have to solve the arithmet…

Some of these are already on his plan. We've talked about turning the game into a real-time game instead of a turn-based game, and he was excited about that direction.

Appreciate the feedback!

Re: My son (9 yrs old) used plain JavaScript to make a game, and wants your feedback

#112
post #97

Great game. I'm very impressed that a 9 year old made this. A few suggestions: 1. Take input on the page rather than through a prompt. Current implementation breaks immersion. 2. I'd like there to be some time pressure. This can be done either by the opponent making their attacks on a timer (rather than taking turns the way it's done now) or by putting an explicit countdown for how long you have to solve the arithmet…

re: (1) I know what you mean, but the prompt component is a great way leverage browser UI for input without affecting the rendered website, so it makes good sense in this case.

Kids dad here.

alert() was MVP style guidance on my part. Least effort way to get a modal. Quick for him to learn and implement.

Re: My son (9 yrs old) used plain JavaScript to make a game, and wants your feedback

#113
post #39

Earlier quoted context omitted.

Frankly, it looks like a scam. It mentions AI and NFTs everywhere, in-app purchases are for “Mint Passes” and “Sticky Coins”, and it tracks users. What this 9-year old did is different. Maybe it’s a modest game, but they used an LLM as a tool to learn to code, not just to produce AI slop. It feels crummy that you’ve taken a thread that is about celebrating a kid’s first achievement in creating a game and made it abou…

[flagged]

"It looks like a scam" is arguably the most charitable feedback you'll get for launching a NFT-laden product in 2024.

Re: My son (9 yrs old) used plain JavaScript to make a game, and wants your feedback

#114

For those wondering, the current charge mechanic is shared amongst all attacks. You start with 0 "charge". Each time you click an attack button (regardless if it lets you attack or not) you gain 1 charge. If you have enough charge, the attack triggers and you're deducted its "charge" cost. Throwing Star = +1, Cost 0 Shooting Star = +1, Cost 2 Blasting Star = +1, Cost 3 Exploding Star = +1, Cost 4

did you get this from the source? :)

Re: My son (9 yrs old) used plain JavaScript to make a game, and wants your feedback

#115

This is awesome. My son recently turned 8. All his coding so far has been with Scratch and other block-based programming environments (Octostudio, VEX Robotics, Apitor, Microsoft Makecode). His typing speed is better than most kids his age, but still slow (around 10wpm). I'm curious how you helped introduce your son to text-based programming. I've been considering either: A) Having him go through this free Python cou…

We've had a long journey. Main thing is that I realized that my son doesn't learn enough from open ended tools like Scratch. So we tried a bunch of other things. He started with Scratch JR & Scratch. Then we switched to Tynker Jr & Tynker. Which provide challenge oriented block based games. Teaches loops, functions, etc. Then we switched to CodeMonkey, which provides challenge oriented block & code based games (coffe…

Thank you. This is a very helpful description. I think the same process might work for my son.

Re: My son (9 yrs old) used plain JavaScript to make a game, and wants your feedback

#116

Ah, a fun game, with math! Scrolled through all of the comments, didn't find mention of the spelling mistake right at the top. Sorry, but spelling/grammatical errors often communicate sloppiness. Even when you worked very hard. "Chosse your oponent" perhaps: Choose your opponent:" and "you win refresh to go again" could be "You won! Refresh to play again" -- you could even add a link to load the page again. "sorry th…

Also, looking at the code, I don't think you use "question_array" or "answer_array". And I don't know what "utah2" means.

Sorry I'm not great at games but I like looking at code and interfaces.

Re: My son (9 yrs old) used plain JavaScript to make a game, and wants your feedback

#118

This is awesome. My son recently turned 8. All his coding so far has been with Scratch and other block-based programming environments (Octostudio, VEX Robotics, Apitor, Microsoft Makecode). His typing speed is better than most kids his age, but still slow (around 10wpm). I'm curious how you helped introduce your son to text-based programming. I've been considering either: A) Having him go through this free Python cou…

> His typing speed is better than most kids his age, but still slow (around 10wpm).

Get him on gtypist for 20-30 min a day. It’ll pay dividends for life. You’ll be shocked how fast it gets up to 60+ wpm.

Re: My son (9 yrs old) used plain JavaScript to make a game, and wants your feedback

#119

For those wondering, the current charge mechanic is shared amongst all attacks. You start with 0 "charge". Each time you click an attack button (regardless if it lets you attack or not) you gain 1 charge. If you have enough charge, the attack triggers and you're deducted its "charge" cost. Throwing Star = +1, Cost 0 Shooting Star = +1, Cost 2 Blasting Star = +1, Cost 3 Exploding Star = +1, Cost 4

did you get this from the source? :)

Indeed!

Re: My son (9 yrs old) used plain JavaScript to make a game, and wants your feedback

#120
You haven't made any of the mistakes that I see from professional web developers. (I'd critique the use of onclick, except you've found the one context where it's acceptable (even sensible!) to use onclick.) Using the Orca screen reader, the game is almost completely playable. Some feedback:

• I can't "see" when exploding star is charged up, except by clicking it every turn.

• I can't tell whether I've got the answer right or wrong. The animation is not exposed to Orca at all. It would be nice to have a text description of what's happening (which you could then apply aria-live to).

• Technically, I can find this information by navigating down and checking the HP scores, given knowledge of the game rules. (Just putting aria-live=polite on the HP elements would be a quick fix.)

• I can't necessarily read English: the other text can be auto-translated by my browser, since the page is marked lang=en, but the text in the images can't unless the alt attribute is set appropriately.

• You use - (hyphen-minus) rather than − (U+2212 MINUS SIGN). Most screen-reader users will be used to this: do NOT tweak things to make it sound better in one screen reader: that will probably break things for others. However, in this case, you do really mean 24 − 5, so it might be worth changing it.

• document.write replaces the document (not its contents), which causes some software (e.g. Firefox F12 Inspect Element) to break a bit. Orca-in-Firefox seems to cope, though, so this probably isn't a big deal.

Digital accessibility involves considering a lot of I/O modalities at once, so it's really hard. (A lot of the advice you'll find online is wrong: there are even companies who sell wrong "solutions", and it's very annoying!) Since your game is mostly HTML, with for controls, it's already very accessible. This is, in all sincerity, a lot better than most professionals can manage.

Edit: ooh, you do have a blog. I'd suggest RSS, though. Email sign up forms are a pain to manage, there are privacy problems, and it's generally less convenient than RSS.

Post reply on HN