7 ms·
Take Over The Galaxy with GitHub (DCPU16 support)
- gravitronic 14y agoOk after seeing the assemblers/VM's last week I wasn't expecting to see much new this week.. then I saw this: https://github.com/krasin/llvm-dcpu16/ https://github.com/krasin/llvm-dcpu16/ C compiler support for dcpu16! In a way this almost saddens me as by the time the game comes out it looks like the community will have javascript ported to the CPU and no one will actually have to program in assembler as per the original idea... ;)
- TazeTSchnitzel 14y agoIt could run JavaScript, but this is a 16-bit processor we're talking about here, with minimal RAM. It's more likely we'll be using C and BASIC ;)
- gravitronic 14y agoagreed, but at this rate I figured I'd suggest the moon
- flatline 14y agoYeah this seems like the exact scenario where hand-rolled assembly and perhaps some hand-optimized C will really shine. You don't see a lot of embedded processors running javascript, for example. If your ship can process data and respond 5% faster than an opponent's, all other things being equal, you will come out ahead. If the current level of interest persists, by the time the game launches, I imagine that the vast majority of people will be downloading and running programs written by others. These will have been pored over and optimized to an extent that most of us would be unable to achieve by ourselves, and it will not pay to roll your own trivial implementation. I'd be curious to see what Notch can do to still encourage people to learn how the CPU works themselves. If the environment and game dynamics are rich enough, perhaps this will not really be a problem?
- DanBC 14y ago> I'd be curious to see what Notch can do to still encourage people to learn how the CPU works themselves. Have some ship customisation stuff tied to assembly programming. People love changing the colour of carpets or wearing hats or collecting and displaying fossils. Then allow the community to create simple how to guides - "This program will do $THIS_THING; here's how it works; now try to change it to do something slightly different." I guess Codecademy should have a DCPU section too.
- seanp2k2 14y agoDID SOMEONE SAY HATS?! Agreed that higher-level langs would be helpful for "newbies". I wonder if this was at all inspire by Schemaerse (google it, but TL;DR it's a space game written mostly with Postgres triggers where /you build the game client/ in whatever you want to use to interface with the pgsql :)
- dons 14y agoI think we're going to see some clever optimizing DSLs (a la FFTW) -- restricted languages for the kinds of embedded programs you write on such an architecture will be easier to optimize than general purpose languages. Particularly if they have a clear cost model. The Haskell embedding is very likely to head in that direction. (See e.g. in this style : http://www.fftw.org/faq/section4.html#whyfast http://www.fftw.org/faq/section4.html#whyfast or this style : http://www.cse.unsw.edu.au/~chak/papers/polymer.pdf http://www.cse.unsw.edu.au/~chak/papers/polymer.pdf -- code generation + DSL + constraint solver for instruction level timings). At least, that's what I'd do.
- Hoff 14y agoFor those old grey-hairs around and reading that remember RSX-11M/M+, there was a tool known as TKB. The task builder. TKB allowed (much) larger applications to run in the address space of a 16-bit DEC PDP-11, using what were called overlays, and overlay trees. With overlays, the application call tree within an application was analyzed and implemented to allow various sections of code within a tree of subroutine calls to be paged out to backing storage. If the underlying "processor" is fast enough and if you have enough swap space available, then you can stuff a whole lot of code into a 16-bit address space. Just not all loaded in physical memory at once. And debugging it... Shudder...
- KC8ZKF 14y agoHow about FORTH?
- colomon 14y agoShhhh.... don't give away our secret weapon!
- brianobush 14y agoor false? http://strlen.com/false-language http://strlen.com/false-language
- pjmlp 14y agoTurbo Pascal!
- tomjen3 14y agoNew challenge - clone the Turbo Pascal IDE and get it to run on the processor.
- cpeterso 14y agoFor reference, Things That Turbo Pascal is Smaller Than. I am still amazed that the compiler and IDE are only 39 KB. http://prog21.dadgum.com/116.html http://prog21.dadgum.com/116.html
- pjmlp 14y agoTurbo Pascal 3.0 was my first contact with Pascal, and while it was great for the time, I doubt I can call it an IDE. It was more similar to vi + integrated compiler as an IDE.
- praptak 14y ago4096 18-bit words are known to host a Lisp interpreter (http://www.softwarepreservation.org/projects/LISP/maclisp_family/ http://www.softwarepreservation.org/projects/LISP/maclisp_fa... ), so 64K 16-bit words should be more than enough :)
- secoif 14y agoDon't start worrying about the "purity" and "this was never intended". You don't specify a processor instruction set in the real world without expecting people to write higher level languages for it, so why expect people to write at such a low level in a GAME of all places? I am fairly certain everything is going exactly as planned. Notch has got this.
- soupboy 14y agoI second this. If anything, Notch must be feeling immensely satisfied if not somewhat overwhelmed by all the effort that the community has put into his project.
- GuiA 14y agoIt must definitely be overwhelming. So much hype is building, and he doesn't even have a functional prototype working yet. Greater men have failed to succeed when so much pressure is present. I love the game idea, and think Notch is a great game designer+developer, and sincerely hope that it will be what we think it will be. But at the same time, I'm not as optimistic as others might be.
- joncalhoun 14y agoI second this. Think about all the hype and excitement he is building simply be releasing a processor instruction set. Pure marketing genius =D.
- Niten 14y agoAlong similar lines, this morning I was thinking how wonderful it would be if whatever interfaces exist between the ship's computer and the rest of the 0x10c game world are rich enough to make security vulnerabilities in players' DCPU-16 code a real concern. Imagine disabling an opponent's ship by exploiting a buffer overflow in a custom communications protocol implementation, for instance...
- lloeki 14y agoThat very well may be part of the game: https://twitter.com/#!/notch/statuses/187474819980328962 https://twitter.com/#!/notch/statuses/187474819980328962
- rmc 14y agoIt's a game. if you can make your code run faster, you'll probably get more magic pixels.
- kilowatt 14y agoI for one plan on writing the first in-game magic-pixel-collecting DCPU16 botnet.
- drawkbox 14y agoHe who has the best systems will win, no matter the tools or platform. I love it. I think it is great for teaching kids to program as well, or be excited about it. Notch is going to do what thousands of teachers can't do because he is using the power of gameplay to drive it.
- soupboy 14y agoLooking at all the amazing work done regarding the DCPU and the article yesterday on Instagram's technology stack made me realize just how far we've advanced. With the tools that we have available now, it is possible to do things in a few days that it took people years if not decades to achieve.
- rmc 14y agoThe Singularity is near.
- unreal37 14y ago"it is now possible to do things in a few days that took people ... decades to achieve". Let's not get too excited here. Name one thing that can be done in days that used to take decades.
- NickPollard 14y agoCopying the entire contents of a large library of books.
- lolcraft 14y agoThe first Fortran compiler's creation took 18 person-years. Now there are C compilers which were written from scratch in person-weeks, like TCC.
- mbrubeck 14y agoBut the first C compilers were written four decades ago by a couple of people in a matter of months. And they were not just writing the compilers but also designing the language at the same time. "When Steve Johnson visited the University of Waterloo on sabbatical in 1972, he brought B with him. It became popular on the Honeywell machines there, and later spawned Eh and Zed (the Canadian answers to `what follows B?'). When Johnson returned to Bell Labs in 1973, he was disconcerted to find that the language whose seeds he brought to Canada had evolved back home; even his own yacc program had been rewritten in C, by Alan Snyder." -- Dennis Ritchie, who wrote the first C compiler. http://plan9.bell-labs.com/who/dmr/chist.html http://plan9.bell-labs.com/who/dmr/chist.html
- deleted 14y ago[deleted]
- phren0logy 14y agoI'm having a hard time articulating why I think this is so fantastic. It's great to see people attack a not-so-serious problem with such gusto. I love the passion behind taking things apart just to see how things work. Thanks, github. You made my day.
- dan00 14y agoThe value of just playing around is underestimated. A lot of discoveries have been made by people just playing around.
- cdk 14y agoAs someone with not a lot of experience in low level languages and I can't wait to play around with this. I think it will be fun way to learn and maybe even try building hardware implementation using a FPGA.
- dholowiski 14y agoHackaday.com will be running a competition for hardware implementations: http://hackaday.com/2012/04/08/getting-12-year-olds-to-learn-assembly-programming/ http://hackaday.com/2012/04/08/getting-12-year-olds-to-learn...
- DanBC 14y agoThe comments link to information about the Apollo Guidance Computer. (https://en.wikipedia.org/wiki/Apollo_Guidance_Computer https://en.wikipedia.org/wiki/Apollo_Guidance_Computer) (http://www.ibiblio.org/apollo/ http://www.ibiblio.org/apollo/)
- Brashman 14y agoOn my list of things to get around too. I don't expect it to be too hard as it's a fairly simple processor as specced. It'll be interesting to see what architecture techniques could be added to improve things while still remaining within spec.
- yolesaber 14y agoI had a dream the other night wherein there was a start-up that took custom code requests for 0x10c players on commission. Requests ranged from optimizing the ship's defense to autopilot and hyperspace jump controls. Viable?
- SoftwarePatent 14y agoAbsolutely. Maybe you can get acquired before the game is actually released! ;)
- dholowiski 14y agoTime to fill out a YC application!
- DanBC 14y agoFor some definitions of viable. Perhaps taking the requests, and converting those into mechanical turk tasks would work. That'd allow the price to be low enough to be doable. There's a market for minecraft servers, so anything's possible.
- aaronblohowiak 14y agosmall business, not startup
- falcolas 14y agoConsidering that the gold farming business runs revenue in the billions, the moniker of startup could definitely apply to a service catering to MMO gamers.
- xsmasher 14y agoDue diligence is called for. Has this business model been successful in other games? Do you have some advantage over the throngs who will gladly do it for free / recognition?
- 14y ago
- newobj 14y agoI wonder if Notch is regretting releasing these details so soon. Now he's already going to be a slave to backwards compatibility and the game is about 0.1% complete.
- phren0logy 14y agoSeeing that everyone is doing this just for fun, I doubt it. He could change everything tomorrow and I bet people would be excited to do it all over again.
- newobj 14y agoI don't think everyone's doing it for fun, I'm sure there are savvy dudes out there that know that there's a lot of money to be had by being a first mover in the Notch ecosystem. But even those that are doing it for fun -- you might be underestimating the amount of nerd rage that people are capable of when stuff they don't want to have happen happens. Just sayin'.
- rasur 14y agoSo, who's going to be first with a hardware implementation of the DCPU16? :)
- waffle_ss 14y agoIf you count Verilog, there are already at least a couple[1][2]. [1]: https://github.com/sybreon/dcpu16 https://github.com/sybreon/dcpu16 [2]: https://github.com/filepang/dcpu16-verilog https://github.com/filepang/dcpu16-verilog
- clavalle 14y agohackaday.com currently has a contest running to answer that very question.
- tcas 14y agoI'm working on a multicycle implementation that I will be able to push to a FPGA. There's no way I'll be able to get the same cycle timing as the specs indicate however. 3 cycles for a divide is very, very generous for such a simple CPU, I'll probably either end up implementing a shift and subtract algorithm (will take more than 3 cycles), or using huge look up tables (probably too big fit in a single blockRAM as well...) to try and achieve it. On the other hand, SHR and SHL are trivial to do in hardware via a barrel shifter, but he assigned 2 cycles for them. The [next word + register] instruction is also a bit annoying to deal with in the given time tables and a simple register file design, though I haven't thought about the design of that too much.
- monological 14y agoNotch said it'll run around 100khz in-game, so it should be a piece of cake for an FPGA to do it in even one in-game clock cycle.
- obtu 14y agoWould it be a good idea to run the instructions as fast as you can, adding some cycle accounting and using it to generate some external interrupt to help implement quotas? Though when it gets IO support you might have to run things entirely in lockstep again.
- Porter_423 14y agoNever been prouder to be a Github user and subscriber. This is why you guys are awesome.
- waffle_ss 14y agoWeird that they didn't include the language link[1] that shows all the repo statistics for the language, like most watched, most forked, newly created, etc. [1]: https://github.com/languages/DCPU-16%20ASM https://github.com/languages/DCPU-16%20ASM
- petercooper 14y agoNow all we need is a DCPU16 to x86 translator and we have a whole new stack of dev tools ;-)
- cpeterso 14y agoWhat does the D in DCPU stand for? Notch's DCPU16 spec does not say.
- Raphael 14y agoDigital?
- jazzychad 14y agoHN is funny. Last week as each new dcpu emulator implementation popped up, they got fewer and fewer votes and more comments like "oh great, yet another dcpu post. let's call this Dcpu News for crying out loud!" Then github adds syntax highlighting and gets 150+ points. I'm very curious why that is...
- Twisol 14y agoThe emulators got less votes because it was more of the same exact thing ("someone implemented DCPU-16"). This is news because a big name has taken notice of DCPU-16, going so far as to officially support it. It's a different flavor.
- jazzychad 14y agoAh, so dcpu is cool now because somebody cool says its cool. Just seems like bandwagon/fanboyism to me. Call me a dcpu hipster :) btw, awesome work w/ mappum on the js emulator stuff. you guys update w/ impressive speed.
- Twisol 14y agoIt's not fanboyism, most like "stop showing me emulators it's not interesting anymore". The subject of the DPCU iself is still pretty interesting. Also, thanks!
- minhajuddin 14y agoMy sentiments exactly, I don't believe that Github adding syntax highlighting of a language is "hacker news". They are supposed to have syntax highlighting for most of the languages. Maybe on HN people are discussing DCPU, but if you look at the comments on Github, they are all "awesome", "+1", really? for adding a syntax highlighting for one more language.
- Natsu 14y agoNotch tweeted the other day that he was thinking about DCPUs coming with some fan-made open source OS... as soon as someone writes one. This should be interesting.
- MiguelHudnandez 14y agoI want to see a networking protocol between ships so that fleets form in order to take advantage of multiple "cores." So for example, you'd have the difference between a single-celled organism (standalone ship) versus a multi-celled organism (a fleet), with a fleet of ships delegating work to specific ships. So 10 ships run the "scout" programming in a perimeter, 5 act as resource gatherers, and a few others as transports within the protected space. Perhaps some act as brain cells which tell ships when to change roles. All of this is happening even when no members of the fleet are actually playing. This just boggles the mind with possibilities and I can't wait to start playing this game. Furthermore, you have people trying to break into space protected by fleets by attacking networking protocols--in a game!
- iseyler 14y agoWhile its great the GitHub added support for this how about x86-64? https://github.com/ReturnInfinity/BareMetal-OS/blob/master/os/kernel64.asm https://github.com/ReturnInfinity/BareMetal-OS/blob/master/o... The 64-bit register names are still not handled correctly. It does properly color the 8, 16, and 32-bit register names.
- roryokane 14y agoGitHub uses the open-source Pygments (http://pygments.org/ http://pygments.org/) to highlight source code. If you can find the code for whatever ASM highlighter Pygments uses, you could probably fix it yourself. Though I tried searching for it and didn't find it after a while, so it would take some tracking down.
- codesuela 14y agonow let's just wait for the first O'reilly book on DCPU16 programming
- AbyCodes 14y agono starch press most likely :D
- neilparikh 14y agoI'm a beginner programmer with a little of bit of programming experience, and this idea of programming a game through assembly interests me, but I'm not familiar with assembly. How should I go about learning DCPU16?