libindi 发表于 2012-4-4 16:00

shyso 发表于 2012-4-4 16:10

我覺得以現在的技術力,這遊戲五年內出不來,和mc的技術等級差的太遠了
當然,如果是方塊宇宙的話倒是有可能……

話說以前有一個隨機生成星球的遊戲開發著開發著就沒有消息了

云腾 发表于 2012-4-4 16:37

硬科幻 就得先绕着星球飞上3 4圈才降落。

normalli 发表于 2012-4-4 16:46

过程生成技术,以现在的技术可以做到的,但问题是你准备用什么填满不止一星球,正当防卫2才那么一个小岛都显得非常空旷,说道硬科幻,有那个太空游戏把各种星球的引力表现出来了

normalli 发表于 2012-4-4 16:49

不过0x10c这名字只有死程才能想到吧,到底啥意思啊

PabloPicasso 发表于 2012-4-4 17:11

绕指流光 发表于 2012-4-4 17:13

引用第3楼normalli于2012-04-04 16:46发表的:
过程生成技术,以现在的技术可以做到的,但问题是你准备用什么填满不止一星球,正当防卫2才那么一个小岛都显得非常空旷,说道硬科幻,有那个太空游戏把各种星球的引力表现出来了 images/back.gif

怒鸟:space

昔日之影 发表于 2012-4-4 17:16

引用第1楼shyso于2012-04-04 16:10发表的:
我覺得以現在的技術力,這遊戲五年內出不來,和mc的技術等級差的太遠了
當然,如果是方塊宇宙的話倒是有可能……

話說以前有一個隨機生成星球的遊戲開發著開發著就沒有消息了 images/back.gif
你说的是infinity这个万年大坑吧?估计要孙子烧给我们玩了

htbrkone 发表于 2012-4-4 18:54

infinity网站正好今天更新了 http://www.infinity-game.com/infinity/index.php?option=com_content&view=article&id=116:2011-retrospective-and-project-updates&catid=54:journal&Itemid=73

常州 发表于 2012-4-4 19:57

无限星辰的开发周期也是无限的……

normalli 发表于 2012-4-4 20:44

我仔细看了一下简介,貌似目前宣传的重点是哪个16bit的可编程cpu,红石电路弱爆了,看我的单片机,玩MC,学数电,玩0x,学汇编 ,果然够硬科幻。
还有那个big endian和little endian的梗

normalli 发表于 2012-4-4 21:07

这个是说明书,我没学过汇编,对计算机底层了解也非常有限,只能大概看懂一点
DCPU-16 Specification
Copyright 2012 Mojang
Version 1.1 (Check 0x10c.com for updated versions)

* 16 bit unsigned words
* 0x10000 words of ram
* 8 registers (A, B, C, X, Y, Z, I, J)
* program counter (PC)
* stack pointer (SP)
* overflow (O)

In this document, anything within is shorthand for "the value of the RAM at the location of the value inside the brackets".
For example, SP means stack pointer, but means the value of the RAM at the location the stack pointer is pointing at.

Whenever the CPU needs to read a word, it reads , then increases PC by one. Shorthand for this is .
In some cases, the CPU will modify a value before reading it, in this case the shorthand is [++PC].

Instructions are 1-3 words long and are fully defined by the first word.
In a basic instruction, the lower four bits of the first word of the instruction are the opcode,
and the remaining twelve bits are split into two six bit values, called a and b.
a is always handled by the processor before b, and is the lower six bits.
In bits (with the least significant being last), a basic instruction has the format: bbbbbbaaaaaaoooo



Values: (6 bits)
    0x00-0x07: register (A, B, C, X, Y, Z, I or J, in that order)
    0x08-0x0f:
    0x10-0x17:
         0x18: POP /
         0x19: PEEK /
         0x1a: PUSH / [--SP]
         0x1b: SP
         0x1c: PC
         0x1d: O
         0x1e:
         0x1f: next word (literal)
    0x20-0x3f: literal value 0x00-0x1f (literal)
   
* "next word" really means "". These increase the word length of the instruction by 1.
* If any instruction tries to assign a literal value, the assignment fails silently. Other than that, the instruction behaves as normal.
* All values that read a word (0x10-0x17, 0x1e, and 0x1f) take 1 cycle to look up. The rest take 0 cycles.
* By using 0x18, 0x19, 0x1a as POP, PEEK and PUSH, there's a reverse stack starting at memory location 0xffff. Example: "SET PUSH, 10", "SET X, POP"



Basic opcodes: (4 bits)
    0x0: non-basic instruction - see below
    0x1: SET a, b - sets a to b
    0x2: ADD a, b - sets a to a+b, sets O to 0x0001 if there's an overflow, 0x0 otherwise
    0x3: SUB a, b - sets a to a-b, sets O to 0xffff if there's an underflow, 0x0 otherwise
    0x4: MUL a, b - sets a to a*b, sets O to ((a*b)>>16)&0xffff
    0x5: DIV a, b - sets a to a/b, sets O to ((a<<16)/b)&0xffff. if b==0, sets a and O to 0 instead.
    0x6: MOD a, b - sets a to a%b. if b==0, sets a to 0 instead.
    0x7: SHL a, b - sets a to a<<b, sets O to ((a<<b)>>16)&0xffff
    0x8: SHR a, b - sets a to a>>b, sets O to ((a<<16)>>b)&0xffff
    0x9: AND a, b - sets a to a&b
    0xa: BOR a, b - sets a to a|b
    0xb: XOR a, b - sets a to a^b
    0xc: IFE a, b - performs next instruction only if a==b
    0xd: IFN a, b - performs next instruction only if a!=b
    0xe: IFG a, b - performs next instruction only if a>b
    0xf: IFB a, b - performs next instruction only if (a&b)!=0
   
* SET, AND, BOR and XOR take 1 cycle, plus the cost of a and b
* ADD, SUB, MUL, SHR, and SHL take 2 cycles, plus the cost of a and b
* DIV and MOD take 3 cycles, plus the cost of a and b
* IFE, IFN, IFG, IFB take 2 cycles, plus the cost of a and b, plus 1 if the test fails
   

   
Non-basic opcodes always have their lower four bits unset, have one value and a six bit opcode.
In binary, they have the format: aaaaaaoooooo0000
The value (a) is in the same six bit format as defined earlier.

Non-basic opcodes: (6 bits)
         0x00: reserved for future expansion
         0x01: JSR a - pushes the address of the next instruction to the stack, then sets PC to a
    0x02-0x3f: reserved
   
* JSR takes 2 cycles, plus the cost of a.



FAQ:

Q: Why is there no JMP or RET?
A: They're not needed! "SET PC, <target>" is a one-instruction JMP.
   For small relative jumps in a single word, you can even do "ADD PC, <dist>" or "SUB PC, <dist>".
   For RET, simply do "SET PC, POP"
   
Q: How does the overflow (O) work?
A: O is set by certain instructions (see above), but never automatically read. You can use its value in instructions, however.
   For example, to do a 32 bit add of 0x12345678 and 0xaabbccdd, do this:
      SET , 0x5678    ; low word
      SET , 0x1234    ; high word
      ADD , 0xccdd    ; add low words, sets O to either 0 or 1 (in this case 1)
      ADD , O         ; add O to the high word
      ADD , 0xaabb    ; add high words, sets O again (to 0, as 0xaabb+0x1235 is lower than 0x10000)

Q: How do I do 32 or 64 bit division using O?
A: This is left as an exercise for the reader.
   
Q: How about a quick example?
A: Sure! Here's some sample assembler, and a memory dump of the compiled code:

      ; Try some basic stuff
                      SET A, 0x30            ; 7c01 0030
                      SET , 0x20       ; 7de1 1000 0020
                      SUB A,           ; 7803 1000
                      IFN A, 0x10            ; c00d
                         SET PC, crash         ; 7dc1 001a

                     
      ; Do a loopy thing
                      SET I, 10                ; a861
                      SET A, 0x2000            ; 7c01 2000
      :loop         SET ,       ; 2161 2000
                      SUB I, 1               ; 8463
                      IFN I, 0               ; 806d
                         SET PC, loop          ; 7dc1 000d

      
      ; Call a subroutine
                      SET X, 0x4               ; 9031
                      JSR testsub            ; 7c10 0018

                      SET PC crash             ; 7dc1 001a

      
      :testsub      SHL X, 4               ; 9037
                      SET PC, POP            ; 61c1
                        
      ; Hang forever. X should now be 0x40 if everything went right.
      :crash      SET PC, crash            ; 7dc1 001a

      
      ;
: Note that these can be one word shorter and one cycle faster by using the short form (0x00-0x1f) of literals,
      ;      but my assembler doesn't support short form labels yet.   

Full memory dump:

      0000: 7c01 0030 7de1 1000 0020 7803 1000 c00d
      0008: 7dc1 001a a861 7c01 2000 2161 2000 8463
      0010: 806d 7dc1 000d 9031 7c10 0018 7dc1 001a
      0018: 9037 61c1 7dc1 001a 0000 0000 0000 0000
按照这个说明0x10c可以解读成 IFE 0x10 A,不过好像没啥意义,也许是我想多了

gjly2 发表于 2012-4-4 22:48

vassiliev 发表于 2012-4-4 22:54

引用第5楼PabloPicasso于2012-04-04 17:11发表的:
In a parallel universe where the space race never ended, space travel was gaining popularity amongst corporations and rich individuals.

In 1988, a brand new deep sleep cell was released, compatible with all popular 16 bit computers. Unfortunately, it used big endian, whereas the DCPU-16 specifications called for little endian. This led to a severe bug in the included drivers, causing a requested sleep of 0x0000 0000 0000 0001 years to last for 0x0001 0000 0000 0000 years.

It's now the year 281 474 976 712 644 AD, and the first lost people are starting to wake up to a universe on the brink of extinction, with all remote galaxies forever lost to red shift, star formation long since ended, and massive black holes dominating the galaxy.
....... images/back.gif


这真带劲

knightgba 发表于 2012-4-5 00:24

这睡眠仓什么黑科技材料?宇宙都快死了,这材料还没坏掉?

asdfg 发表于 2012-4-5 03:12

卧槽,难道除法还要先手动在汇编里用欧几里德算法写一个函数吗?!

怀疑这游戏会有多少不学计算机的人玩

wormz 发表于 2012-4-5 05:09

The cost of the game is still undecided, but it's likely there will be a monthly fee for joining the Multiverse as we are going to emulate all computers and physics even when players aren't logged in. Single player won't have any recurring fees.

这是想把开服务器的权力收回来么

gadeesa 发表于 2012-4-5 09:05

eve告诉我们一步一个脚印才是正道。。。
页: [1]
查看完整版本: NOTCH 新作《0x10c》,硬科幻太空题材,可以无缝降落在星球