News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Game Development in Win32 Assembly Language

Started by gwapo, March 13, 2006, 02:09:47 AM

Previous topic - Next topic

gwapo

Hi,

I'm not sure if this is the correct forum to ask, but do you guys know of any site/thread that has good discussions about the pros and cons of "Game Development in Win32 Assembly Language"?


Thanks,

-chris

donkey

Down for maintenance tonight but http://win.asmcommunity.net/board/index.php has a dedicated Game dev sub forum that is excellent. Also BogdanOtanu is developping an awesome RTS game called Hostile Encounter...

http://www.oby.ro/rts/index.html

Assembler if written well will outperform any other language and has the advantage that any new processor features are normally available to assembly authors before any others (we can directly insert hex opcodes). For speed and flexibility asm is the way to go but dev time may suffer as a result.
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable

hutch--

Chris,

You also have the option of mixed language programming with game development where you can write the more complex but not necessarily fast sections in C/C++ and write a seperate assembler library with the correct C prototypes for code that is truly speed critical. As long as you are familiar enough with MASM you can more easily deliniate between code that is better suited for one production method over another.

You can not only target small intensive routines with a library but with a size advantage in most instances, you can also build things like very large jump tables that may end up too big or too slow in a higher level language. Another thing depending on the VC version you have available is the Profiler Guided Optimisation or if you well understand what code is critical and what is not, seperate the fast code from the non critical code and build them with the different optimisation options so for example with complex but not fast code, build it with the minimum size option but with speed critical code build it with the maximum speed option.

In conjunction with a well written assembler library, this should be a viable method to get the work done within a reasonable time frame while putting the performance where it counts.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

BogdanOntanu

Our development time  or speed for HE in ASM was never slower than HLL projects. In Fact the development speed in ASM was faster that most HLL.
However we did have problems with fund raising :D Because everybody has to live and pay for invoices we did have to slow down or halt development and the team was kind of broken. Today is just me in some weekend sometimes :D

But if we would have had money support we would have finished the game much faster than in any other programming language.
However take care --> that is just me ;) ... me an my team were somehow experts in ASM
Ambition is a lame excuse for the ones not brave enough to be lazy.
http://www.oby.ro

gwapo

Thanks donkey, hutch and BordanOntanu, that surely helped a lot, also I'm looking at winasm community board right now to read good discussions about game-programming in assembler.

hutch,
Out of curiosity, are there real differences writing separate assembler module which are made accessible from C/C++ program, than using inline assembly in C/C++?


Thanks again,

-chris

hutch--

Chris,

There are advantages in a number of areas, if you make the assembler component of the mixed language project seperate, you can have alternative versions that you may want to port to another platform or you may later write a faster asm module. The other factor is modern C compilers do extensive internal optimisation which is messed up by the register usage of inline asm. 64 bit compilers don't currently support inline assembler and if you truly need an asm section, you must write a seperate object module in assembler to do it.

Inline asm is a shortcut that is a little easier to get going but its much harder to change than just using a different module or perhaps porting the entire app to another platform. For a project of any size, keeping the assembler code seperate has too many advantages to ignore it.
Download site for MASM32      New MASM Forum
https://masm32.com          https://masm32.com/board/index.php

gwapo