News for hackers. Stuff that matters.
Re:An open source re-implementation of RollerCoaster Tycoon 2 by regan on Friday October 13, 2017 @09:21AM (#15465337)
Blows my mind. What sorts of optimizations can you do in assembly better than a good C compiler could?

I'm wondering what % performance improvement he saw from doing it this way.

Re:An open source re-implementation of RollerCoaster Tycoon 2 by justinhj on Friday October 13, 2017 @09:36AM (#15465470)
I started working on games in the early 90s and was one of the first to use C instead of asm because my game was targeting Amiga and PC and didn’t involve significant cpu intensive graphics etc. However the rest of the company was working on Super Nintendo, Megadrive etc and these were exclusively asm. C compilers back then actually did add significant overhead to code and you could do much better by hand, especially since cpus in consoles often lacked features such as floating point units or had cut down memory management units. In addition they had custom hardware that you could use (blitter for example on Amiga, gte on PlayStation) that was easy enough to use from asm and the compiler couldn’t help you.
Re:An open source re-implementation of RollerCoaster Tycoon 2 by duncanspumpkin on Friday October 13, 2017 @12:33PM (#15467149)
The main advantage that Chris used in RCT2 to optimise his code was that he could vary his calling convention however he felt. Most of the time all variables were passed in registers instead of the stack. This can make for some impressive speed ups.