zarx said:
| HappySqurriel said:
On the topic of CPU emulation ...
In the not too distant future I expect to see console manufacturers move towards having developers target a "virtual machine" rather than develop for the hardware directly. With how good JIT compilers are getting, you can still get a highly optimized program without being directly tied to specific hardware. If this was done well the vast majority of games would be "forward compatible" without losing a significant percentage of their performance.
|
doing that would lose all the advantages of running on dedicated hardware and the optimisations that makes possible. You would basically be making a PC game at that point (they can be optimised but they will never be able to get the level of optimisation of games designed "direct to the metal) but with slightly higher overheads (and you know how much devs complain about API overheads on PC) you won't see it next gen I don't think we will be at the point where hardware far outstrips the games capability to utilize it which is where you need to be for virtual machines to make sense, that or a totally hardware agnostic future where you can buy one game for all platforms (which I don't think the hardware manufacturers want as that would mean they couldn't charge as much royalties). Virtual mchine bassed games could make sense on PC tho as it would prevent issues with conflicts but even there the extra overheads (no matter how slight) make that prohibitive for AAA games. But for lower end games that want to be platform agnostic Java/HTML5 virtual machine makes a lot of sense as you can make one game that will run on anything, even in a browser like Bastion etc.
/Nerd rant
|
The primary considerations for producing high performance code is using the correct data-structures and algorithms, not on hand-optimization of byte-code that is better handled by a compiler. Even then, the 0.1% of code that you would (potentially) want to write in assembly to increase performance can be (mostly) written by the console manufacturer and provided as library to your VM.
Beyond this, people have been benchmarking C++ vs Java for nearly a decade with results that demonstrate that JIT compilation of Java byte code into machine-code produces similar (overall) results to compiling C++ code into machine-code; with each language having its own advantages in a handful of areas.
Google has already taken this approach with Android, and I don't think many people would say there has been noticeable performance problems on those devices because their games are java based ...
With that said, I'm not saying that this upcomming generation will move towards a virtual machine approach but I'm certain the following generation will ...