5 ms·
From my read of this, we do not yet have code that accurately emulates the number of cycles per instruction, which will probably turn out to be critical in the
by VikingCoder 15y ago
From my read of this, we do not yet have code that accurately emulates the number of cycles per instruction, which will probably turn out to be critical in the final game.
- sp332 15y agoMost instructions take one cycle. The ones that don't, disconcertingly, have the results available immediately and then deduct cycles. I don't know if this will be fixed later or not. https://twitter.com/#!/notch/status/187449161216573441 https://twitter.com/#!/notch/status/187449161216573441
- Anderkent 15y agoWhy do you care when the result is available if the next instruction will run after the wait is complete? I guess it matters if another CPU can read your memory and depends on the cycle count to synchronize...
- VikingCoder 15y agoIt also matters if writing to the memory causes an actuator to... act. Picture if memory location 7 is mapped to how much energy to pump into the laser cannon.
- Anderkent 15y agoIn which case interaction happening when you send the command and not at a command-specific during the execution should simplify things?
- VikingCoder 15y agoIf it's supposed to take 3 clock cycles to execute an instruction, then it's "unfair/unrealistic" to really activate the laser cannon instantly, and then make the processor wait 3 clock cycles before it begins to execute the next instruction. It'd be "more fair/realistic" if it took 3 clock cycles, and THEN the memory was overwritten. Note: this is debating the timing of a 100 kHz simulated processor, within a game... so, the discussion is kind of inherently pedantic. =)
- swetland 15y agoAs far as I can tell, I think the cycle count is intended to model the cost of cycles against your 100KHz budget. I'm not sure I think it's worth the complexity. Given that Notch seems to want to continuously operate one or more virtual CPUs for every user, if it were me, I'd favor making the execution model as simple and cheap as possible.