logoalt Hacker News

Show HN: A game where you build a GPU

343 pointsby Jaso1024today at 4:45 PM108 commentsview on HN

Thought the resources for GPU arch were lacking, so here we are


Comments

roadbustertoday at 6:54 PM

I worked on deep sub-micron, full custom mixed-signal integrated circuits for more than a decade, and I can't pass the first level.

> Wire an NMOS transistor so that when In is 1, the output is pulled to ground (0). When In is 0, the output should be unconnected (Z).

Certainly:

(a) The nMOS has 3 connections: its drain is only connected to the output (no +Vdd supply), it's source is tied to ground, it's gate is tied to the signal input

(b) When the gate (input) is driven high, the nMOS transistor turns "on," connecting the output to the source (which is grounded). This acts as a "pull-down network"

(c) When the gate is driven low, the nMOS turns "off," leaving no connection to the output. This is equivalent to a "high-impedance" / "unconnected" / "Z" output

Fails 1/2 tests

(Edit) - I thought the light grey, thick line on the background grid was a wire from "input" to the transistor's gate. It is not. You need to explicitly add a wire from "input" to gate :\

show 2 replies
rustybolttoday at 6:48 PM

This is great!

Some comments:

- I didn't like the "truth tables" one, I got many duplicate questions and for some reason I got only one second for the first question. The rest of the questions I managed to answer correctly but I still got only one start out of three?

- I got very confused by the capacitor. Capacitors do not have an "enable" gate! In fact, in 2.7 (1T1C) you are supposed to build the enable gate -- with a transistor. So currently, you can just simply not build the enable gate and use the one already in the primitive, meaning you don't need the NMOS gate at all.

Was this made using LLM-assistence? (Not judging, I'm just interested!) I'd love to hear more about your workflow and how you managed to produce a good UI as it's something I couldn't do if my life depended on it, and it's a skill I'd like to learn.

show 2 replies
txrtoday at 6:59 PM

Anyone who likes this should also take a look at: https://store.steampowered.com/app/1444480/Turing_Complete/ At the end you have your own CPU with your own assembly language. Sadly stuck in early access since forever with some very rough edges

show 1 reply
yuppiepuppietoday at 7:29 PM

Neat idea!

Ive added this to the HN Arcade! https://hnarcade.com/games/games/mvidia

show 1 reply
brynnbeetoday at 9:26 PM

Huge fan of this! I love learning-by-doing and this captures that cycle perfectly.

Anonynekotoday at 5:53 PM

This looks really cool, although I personally seem to lack the absolute basic knowledge that is required to make sense of the tutorial messages, so I couldn't even figure out the first level.

show 2 replies
frmersdogtoday at 7:21 PM

You need to have a, "Okay, I've tried 10 times, it's not working, what's the answer?" button. That will help not just us rubes who can't understand, but also in the off chance something is broken and even "correct" answers are being rejected.

show 1 reply
vibe_that_workstoday at 8:38 PM

That was great fun, an interactive refresher on my EE studies. Thank you so much for creating it.

If anybody can create something similarly interactive, educational and hands-on for microbiology or robotics, I am happy to sponsor your cost.

xmprttoday at 8:15 PM

This is super cool but part of me wishes I could skip to the later levels rather than redo college homework from a decade ago. Maybe that ruins the fun but also slogging through the early levels (especially when the UI is a bit rough around the edges and doesn't support copy paste) isn't fun either.

oytistoday at 9:18 PM

Must be missing something - is there a way to save progress?

john_strinlaitoday at 5:57 PM

as a learning resource, it would be great it acronyms were expanded at least once. nmos, pmos, gnd, vdd all in the first 5 seconds or so, and i didnt see anywhere that actually said what those stood for

otherwise, looks polished and fills in a nice niche!

show 2 replies
npinskertoday at 5:51 PM

Great game! For learning, might be nice to see some commentary or example (model) solutions after beating a level.

show 1 reply
iandevtoday at 7:50 PM

I'm confused about a difference in the NMOS and PMOS. The scenario I'm confused about is when the source is VDD and the drain is connected to GND and output.

For the PMOS, the output toggles between 1 and 0 (opposite the gate) as expected. However, for the NMOS, the output is always 0.

I don't understand why GND pulls VDD down to 0 for the NMOS, but not the PMOS.

show 1 reply
unsnap_bicepstoday at 8:18 PM

The truth tables are way too hard for me. I need time to think and the 10 seconds is way too fast. If this is intended to be a teaching resource, avoid timers IMHO. It needlessly excludes people.

show 1 reply
Jaso1024today at 7:43 PM

Hi everyone, commenting to address feedback:

- Made timed minigames optional (e.g. binary tables)

- Added 7 (optional) intro levels to walk through pmos and nmos transistors

- Fixed the bug in the capacitor levels

- Changed editor bg to use dots instead of lines to fix wire confusion

show 1 reply
xnzakgtoday at 8:00 PM

The 2.13 level ("hex racer") is kind of pain. Apparently I'm not fast enough at dividing/multiplying by 16... when I get something like "convert 0xB3 to decimal"

show 1 reply
NooneAtAll3today at 7:31 PM

if you solve a level, then press "next level", then solve that next level - then it still shows the original level (I think it just gets hidden below the new one and then reappears after a solve?)

show 1 reply
gchadwicktoday at 7:17 PM

A nice game, though the truth table lighting round is pretty punishing! Big contrast to the circuit building part where you can take your time. Personally I'd drop the time requirements from that quiz section.

show 1 reply
buildbottoday at 5:36 PM

This would be such a good game for introducing students to digital technology! This is so fun! We just had to draw them by hand back in the dark ages of the 2010s.

show 1 reply
baobabKoodaatoday at 7:17 PM

Is this a sequel to "How to make a CPU"? https://www.youtube.com/watch?v=vuvckBQ1bME

show 1 reply
zapkyeskrilltoday at 6:56 PM

Any easy way to make this usable on mobile? In portrait mode things are unreadable, zoom and scrolling do not work. Landscape is even worse as everything is out of view (and zoom/scroll do not work).

show 1 reply
K0INtoday at 8:49 PM

love it, some level (full adder with 8 inputs) where a bit repetative, but it is fun.

flesherstoday at 6:26 PM

This is awesome! The truth table lightning round took me by surprise, I am rustier than I thought...

One note: It isn't immediately obvious that the In/Out nodes can be connected to multiple wires, made the first few rounds harder to work thru.

show 2 replies
anderskaseorgtoday at 7:46 PM

The “next level” button takes you to the next level even if you haven’t solved that level’s prerequisites.

show 1 reply
Ginoptoday at 5:57 PM

It's always nice to see educational games like that. A lot of new learners (like me) are just looking at the high level stuff, where the computer "just works"...

Well done and keep it up :)

lukebechteltoday at 8:46 PM

really fun :) thanks!

jmhollatoday at 6:52 PM

The continue buttons in intro break for me all the time on Firefox. I can't actually finish most of them.

show 1 reply
joha4270today at 7:51 PM

So, is there anything about GPU's in here right now?

I didn't actually finish Act 2, but it seems to end in a conventional processor with the GPU first coming after another two acts currently under construction.

show 1 reply
arikrahmantoday at 5:19 PM

Awesome project! Reminds me of Turing Complete on Steam.

show 1 reply
kongchu2today at 8:48 PM

Soooo cool! I will keep try this

Falelltoday at 5:46 PM

Fun. 2.2 loads a blank screen for me, all previous levels were fine and 2.3 loads. Windows, Firefox 149.

Edit: Confirmed fixed.

show 1 reply
NooneAtAll3today at 7:39 PM

truth table minigame is lmost unplayable in dark mode

also it kept showing the same table to me like 4 times

show 1 reply
agrishintoday at 5:35 PM

Great project! I somehow missed whole cpu architecture topic, so gonna catch up on that now

show 1 reply
treelovertoday at 6:22 PM

I like the concept! What tools did you use to build it?

show 1 reply
schlecht_today at 5:46 PM

Love it, thanks! Would you mind making it possible for me to see my "circuit" after running the tests? Currently, I can't go back to the circuit I created.

show 2 replies
NooneAtAll3today at 7:45 PM

level 1.10 I put 2 AND gates and only one of them works...

show 2 replies
fragmedetoday at 7:25 PM

Reminds me of http://nandgame.com and https://nand2tetris.org

show 1 reply
tithostoday at 5:58 PM

Cool concept, but it should be mobile friendly

show 1 reply
nottorptoday at 5:12 PM

În a few years it will be the only way to explain the kids what a GPU is. Unless you work for an “AI” shop and sneak them into the data center.

show 1 reply
NooneAtAll3today at 7:27 PM

how do I remove/delete elements?

show 1 reply
SilentM68today at 5:30 PM

This is very cool!

We need more games like this so that the younger population get some sort of exposure to the hardware side of things, before AI takes over that field. I would also think that take-home electronic and soldering kits for adults and younger folks would be another way to reduce dependance on AI.

PunchyHamstertoday at 7:52 PM

...why capacitor has 3 pins ?

show 1 reply
skyskystoday at 6:13 PM

wow looks really cool, although seems kinda useless at first look.

show 1 reply
testaccount28today at 6:57 PM

not playing past the truth tables bs

show 2 replies
himmelsee2018today at 7:31 PM

[flagged]

aritzdftoday at 7:11 PM

[flagged]

bingbong06today at 4:53 PM

[flagged]

aritzdftoday at 7:05 PM

[flagged]

show 1 reply