View Single Post
Old 12 February 2015, 15:44   #50

Join Date: Dec 2014
Location: Montreal
Posts: 129
Originally Posted by Thorham View Post
As you can see, the assembler does all the work and allows the programmer to change anything they want. Works in any sane assembler. Don't EVER make structures in assembly language by using numerical values instead of names.
Damn, that is neat.
I had a feeling assemblers could have such a feature when I wrote that line but my memory of Devpac is a little hazy.

Wouldn't call it hard, just more time consuming and a potential pain in the back side. I don't think assembly language is really any harder than C, it's just more work to get things done, and requires more thought in order to keep things from turning into a mess.
Again, you are correct.
Hard is not the proper term, time consuming and tedious is more appropriate.
C being higher level (but I would not call it high level, to me it's a typed assembly with automatic register assignment) it lets you concentrate on your algorithms and architecture first which is what really matters if you want to produce a good game. When this is set in stone you can go for the kill and convert the critical path parts to assembly.

StingRay is correct that C compilers produce code that is quite less good (although this depends a lot on the scope and how you choose your C statements) than kitten written assembly but it is supremely easy to transform C to assembly once you have prototyped your gameplay and settled on the game features.
Speed is important and necessary but that's not the sole thing you want to tune in a game. Gameplay is the part you want to be able to quickly iterate on and modify constantly during development, optimizing can come later and is specific to lower level routines: no need to optimize code which runs one a frame and controls the character if on the other hand you have a bob drawing routine which is called thousands of times.
The former is best written in C for easy tuning and modifying, the latter of course should be assembly.

C and assembly are tools which serve different purposes. Both useful.
Nekoniaow is offline  
Page generated in 0.07628 seconds with 9 queries