Live data from Hacker News

Notch's Specification for the In-Game DCPU-16

0x10c.com

51–60 of 177 posts

Re: Notch's Specification for the In-Game DCPU-16

#51

Now here's an interesting bit: "Question: can we trade the programs we create? How will you stop malicious viruses etc?" "yes. And I won't stop viruses, the players will have to do that themselves." ~ https://twitter.com/#!/notch/status/187474819980328962

I worry about the griefing potential here. I can imagine nothing pissing off a noob more than getting a virus within 10 minutes of play and having no idea how to stop his ship from self destructing. Perhaps this will need some sort of firewall system built in where ships cannot communicate unless ports have been explicitly opened. Perhaps some sort of communications proxy that can serve for safe communications. It co…

Firewall? Ports? Communication proxy?

It has 64K 16-bit words. What exactly are you expecting the default software to do that opens it up to viruses?

Re: Notch's Specification for the In-Game DCPU-16

#52

Now here's an interesting bit: "Question: can we trade the programs we create? How will you stop malicious viruses etc?" "yes. And I won't stop viruses, the players will have to do that themselves." ~ https://twitter.com/#!/notch/status/187474819980328962

I worry about the griefing potential here. I can imagine nothing pissing off a noob more than getting a virus within 10 minutes of play and having no idea how to stop his ship from self destructing. Perhaps this will need some sort of firewall system built in where ships cannot communicate unless ports have been explicitly opened. Perhaps some sort of communications proxy that can serve for safe communications. It co…

I was thinking they could treat software and components like we do when granting third-parties permission to access our Twitter/Facebook accounts:

Plasma Shield Generator requests the following permissions:

  * Read/write to the ship's log
  * Draw power from the core
  * Use the red alert system
Plasma Shield Generator will not:

  * Access communication protocols

Re: Notch's Specification for the In-Game DCPU-16

#54
post #51

Earlier quoted context omitted.

I worry about the griefing potential here. I can imagine nothing pissing off a noob more than getting a virus within 10 minutes of play and having no idea how to stop his ship from self destructing. Perhaps this will need some sort of firewall system built in where ships cannot communicate unless ports have been explicitly opened. Perhaps some sort of communications proxy that can serve for safe communications. It co…

Firewall? Ports? Communication proxy? It has 64K 16-bit words. What exactly are you expecting the default software to do that opens it up to viruses?

Someone should port http://en.wikipedia.org/wiki/Contiki for this :)

Re: Notch's Specification for the In-Game DCPU-16

#55
post #51

Earlier quoted context omitted.

I worry about the griefing potential here. I can imagine nothing pissing off a noob more than getting a virus within 10 minutes of play and having no idea how to stop his ship from self destructing. Perhaps this will need some sort of firewall system built in where ships cannot communicate unless ports have been explicitly opened. Perhaps some sort of communications proxy that can serve for safe communications. It co…

Firewall? Ports? Communication proxy? It has 64K 16-bit words. What exactly are you expecting the default software to do that opens it up to viruses?

Who knows. Assuming there is some way for players to transfer stuff between their computers and therefor address spaces all you need is one rogue jmp instruction.

Not to mention the usual social engineering stuff. "Hey install this great program, it'll make your guns 200% more powerful"

Re: Notch's Specification for the In-Game DCPU-16

#57

Earlier quoted context omitted.

I worry about the griefing potential here. I can imagine nothing pissing off a noob more than getting a virus within 10 minutes of play and having no idea how to stop his ship from self destructing. Perhaps this will need some sort of firewall system built in where ships cannot communicate unless ports have been explicitly opened. Perhaps some sort of communications proxy that can serve for safe communications. It co…

I was thinking they could treat software and components like we do when granting third-parties permission to access our Twitter/Facebook accounts: Plasma Shield Generator requests the following permissions: * Read/write to the ship's log * Draw power from the core * Use the red alert system Plasma Shield Generator will not: * Access communication protocols

It's 128KB of RAM, that's the same as the original Macintosh in 1984. I would be surprised if it ran at more than about 10MHz. And nevermind the constrained resources for implementing any of this hypothetical infrastructure, unless Notch adds an MMU, you can't enforce permissions

You can't think about this in modern terms. It's not a modern computer. It's a 1980s computer, and it's supposed to run a spaceship. Think microcontrollers, not smartphones or set-top boxes.

Re: Notch's Specification for the In-Game DCPU-16

#58

Earlier quoted context omitted.

Good question. To run python on this CPU, someone (you?) needs to port Cpython to it. A CPU runs assembly language, and it's not hard for a hacker to port C to a new CPU, because C is small. In addition, implementing C is the sort of thing that hackers like to do. So you can count on C running on any given CPU, virtual or real. http://en.wikipedia.org/wiki/CPython

This thing will have a total of 128kB directly addressable ram (as 64k 16b words). There's no way, no how that CPython would ever do anything remotely useful here.

It depends what the purpose of the DCPU is. If it's the scripting engine, well, you can easily write an aimbot in 128KiB of .pyc files and the python VM. If your only access to the world is through the DCPU, yeah, you're probably out of luck, but the second scenario makes for a much smaller and less interesting game.

It's also an obvious in-game/micropayment reward to expand the address space, somewhat analogously to the N64's memory expansion pack.

Re: Notch's Specification for the In-Game DCPU-16

#59
post #9
post #7

Earlier quoted context omitted.

I'm a self-taught programmer, and don't know much about CPUs. Would someone mind putting this into relatively plain english, I'm quite curious to know the practical implications of this. Can we expect to see Python running on it in the near future for example :) ?

Although some of the implications require experience to understand, I'd say it already is in "relatively plain English", you simply haven't been exposed to the vocabulary and concepts necessary. Trying to explain in any detail would basically be reproducing Wikipedia, so here are some links: http://en.wikipedia.org/wiki/Program_counter http://en.wikipedia.org/wiki/Word_(computer_architecture) http://en.wikipedia.org/…

A smarter way might be just implementing a new LLVM backend (gives us C via Clang, some other languages). However, even with C, the standard library probably won't leave much space for the user code itself -- so you might need something slimmer. Also, some kind of simple RTOS (www.freertos.org, maybe?) to run all these programs (I assume people would really want to run several programs at a time). I wonder if the 128k limitation was intentional, to make programming the computers more interesting. Anyway, I'm actually looking forward to seeing what kind of clever solutions the players come up with.

Re: Notch's Specification for the In-Game DCPU-16

#60
post #3
post #2

Just waiting for the first post about programming this CPU to pop up on Stack Overflow ... :) It's quite an interesting architecture. From an initial perusal, I found these features note-worthy: * Explicit access to PC as a register, makes "computed goto" trivial and very natural. * Because of the above, there is no JMP instruction. * Treating operations on registers as "values" makes the instruction set very orthogo…

> * Word-addressed memory will make string processing interesting to implement. Maybe in space, everyone uses UTF-16. Everyone in Minecraft, too -- almost. The string encoding in Minecraft's protocol spec is UCS-2, just a sneeze away from UTF-16. It seems Notch has a soft-spot for large encodings. It makes sense from a calculation and lookup perspective, but I wonder if the increased bandwidth and storage of 16-bit b…

By going UTF-16, he would make the game much more accessible to those not using a latin alphabet.

If I was designing the game, I would favor internationalization vs space efficiency in the virtual computer. That way russian kids would get to have fun learning to write silly programs too.

Post reply on HN