4 ms·
It's kind of insane that people are writing games in assembly for a CPU in a game. I feel like 0x10c is going to be some sort of milestone in terms of innovatio
by catilac 14y ago
It's kind of insane that people are writing games in assembly for a CPU in a game. I feel like 0x10c is going to be some sort of milestone in terms of innovation.
Next up is the immersive technology.
- RegEx 14y agoAs someone who knows absolutely nothing about CPUs, is this CPU design _that_ good, or is it just the fact that Notch made it that's generated all this hype?
- clavalle 14y agoThe CPU design is bare bones which is part of the fun.
- dholowiski 14y agoNo it's not a great CPU design at all, it has some big limitations.
- sbarre 14y agoCan you expand on that? I'm genuinely curious (as an un-informed observer)
- unoti 14y agoThere is a good discussion of it here: http://fail0verflow.com/blog/2012/dcpu-16-review.html http://fail0verflow.com/blog/2012/dcpu-16-review.html The key criticisms center around it being not a instruction set for compiling C and other higher language code. The biggest reasons for that are: 1. No ability to store based on the stack pointer (this is great for handling local variables not in registers) 2. No ability to deal with negative numbers 3. No way to address single bytes, everything is full words only. This makes many basic manipulations take many instructions 4. Not very many registers, particularly in light of limitation 1 The 6809 and 6502 had far fewer registers, but didn't have any of the other limitations listed above.
- Someone 14y agoI don't think the 6502 had #1, or at least not in an easy way. Accessing, say, the second element from the top of the stack required you to copy the stack pointer to the ?X? register, then use that to index into the stack. That works, but is cumbersome.
- Tuna-Fish 14y agoAs an aside, I find it entirely plausible that these restrictions are, if not designed for, at least desired in the design. As they make the work of a compiler harder, they promote coding in assembly to get faster code. This, on the other hand, leads to lower code quality (as avoiding gotchas and dealing with corner cases correctly is a lot easier even in c than in assembly), which creates more "drama", which is good for gameplay.
- redthrowaway 14y ago>No ability to deal with negative numbers How is representing a number in 2's complement verboten?
- polyfractal 14y agoNot having interrupts makes it interesting to multitask as well, since every program has to be made to explicitly multitask cooperatively.
- sbarre 14y agoThat was a great link to read. Thanks!
- monatron 14y agoI think it has very little to do with the design of the CPU itself but rather the unprecedented introduction of a functional CPU being emulated and usable/programmable within a game itself.
- Wilduck 14y agoWhat's (potentially) revolutionary about this game is the deep rooted support for emergent gameplay. A telltale sign of a great game is that players themselves, in exploring the game, find new and interesting things to amuse themselves. Minecraft is an obvious example, with hundreds (thousands?) of public servers dedicated to varied pursuits. A different type of example could be EVE, where the rise and fall of corporations is gameplay not written in by the devs, but gameplay created by the players. Any game that has developed a professional gaming community could also be lumped into the category of having emergent gameplay, since there is an entirely new game mode (spectating) created by a community surrounding the game. When I look at 0x10c, and know that I'm going to have complete control over a CPU in game, and this CPU will be the basis of my pursuits in the game, I know that there will be interesting things to be done. This is because there's such a strong focus on allowing players to create their own gameplay. No other game (that I know of) takes its players' creativity seriously enough to rest so much of the fun on their shoulders. Having Notch to hype the game certainly helps, but helping to create this world is alone an exciting prospect.
- Lerc 14y agoThe fact that it was Notch gave it visibility, but I think the following is more than just design or cult-of-personality. Simplicity is extremely important. A lot of emulators appeared the same day that the spec was released. That not only needed people who wanted to implement the CPU, but also a spec that could be implemented in under a day. There's a bit of Benevolent Dictator effect here as well. It's not that the system is the absolute best, but it's something that people can target for interoperability. Someone can write a compiler and someone else can write the emulator.
- vajrabum 14y agoHow long will it be before somebody ports a nice VM to DCPU-16 or targets a compiler for it? The architecture is so simple and familiar I'm guessing that's not a terribly hard job. Folks are probably not going to write their programs in DCPU-16 assembler.
- Wilduck 14y agoThere are already a number of compilers targeted at it. Browse through reddit.com/r/dcpu16 and you'll see a new one pop up every few days. I'm curious how long it will take before we see compilers that are good at optimization. Pretty much every compiler I've seen crop up makes admissions that it's generating terrible code.
- nezzor 14y agoIt does exist: https://github.com/llvm-dcpu16/llvm-dcpu16 https://github.com/llvm-dcpu16/llvm-dcpu16. The only problem is that there's not going to exist a compiler in-game. People will have to import the compiled assembly code, which isn't nearly as fun as staying in the game during the whole process.
- RodgerTheGreat 14y agoWhich is a pretty good argument for building a self-hosted Forth. You get a compiler and REPL suitable for commanding the computer in a package that will fit easily in the limited memory resources available. If you use threaded code with an "inner interpreter", it's possible to generate very compact code and fit a lot in a small space, or you could emit machine code directly ("subroutine threaded code") for speed.
- Scaevolus 14y agoSomeone's done that! http://matt.immute.net/files/goforth/ http://matt.immute.net/files/goforth/