Why bother to learn assembler?

Started by
10 comments, last by Gandalf 24 years, 3 months ago
Oh yeah, Assembly is cool. But keep in mind that there a lot of Win32 programmers around here. Assembly for console, well I don''t know much of that. But wasn''t assembly really a DOS thing (5 percent of DOOM was written in Assembly, the rest in C)? They used it to "accelerate" their games. But in Win32, I don''t know anybody who still uses Assembly to optimize games. And since game programming is mostly data manipulation, there has to be some way to get the game to run fast enough.
- DarkMage139
Advertisement
> Assembly for console, well I don''t know much of that. But
> wasn''t assembly really a DOS thing (5 percent of DOOM was
> written in Assembly, the rest in C)? They used it
> to "accelerate" their games.

What I meant by consoles is N64, Sega, etc. Doom is a good example, for if it was written entirely in assembler, we''d never see it anywhere except the PC. With C code, you just recompile (and tweak) for your target platform. With assembler, you have to rewrite. So if you envision someday having your game run on a N64 or whatever, write as little as possible in assembler.

> And since game programming is mostly data manipulation,
> there has to be some way to get the game to run fast
> enough.

Amen, brother. Using assembler to increase speed *should NOT be done first*. Focus on the design, and improve the speed from the design level. Then see if you can improve on the C code. Once you''re sure you''ve got it as fast as it will go in C, then drop to assembler if needed. Well written C will outperform poorly written assembler.

Brian

This topic is closed to new replies.

Advertisement