 |
|
|
Scene.org is hosted and supported by:
|
|
|
Scene.org is sponsored by:
|
|
|
|
|
 |
forum - #coders |
|
 | | Topic: | ASM? (another newbie language question) | | | Hi,
I've been interested in demos for about 15 years now, but I've only recently thought about trying to put one together myself and maybe attend a party.
I've been writing games for nearly 20 years, doing it professionally for 5 years, and I know a fair bit of C/C++. I like optimisation and weird realtime programming tricks, I know how to do a lot of effects, but I never got round to learning ASM. Is it a big/important part of writing demos these days? Can good C/C++ coders write decent demos/intros without knowing any ASM? Or does the code always end up too bloaty or slow if you don't write parts of it in asm?[Post edited by electrodruid on Monday 14 April 2008 - 0:56] | | |
| You don't generally need ASM anymore unless:
- writing for an embedded or low powered platform (gba, c64, vcs)
- for the "last mile" performance improvements using SIMD instructions for example. However that is less and less often needed. | | |
| also, most bytetro's (256b, 128b, etc) are written in asm, afaik
but i guess it's easier to start coding without sizelimits, anyway | | |
| Heh, size limits are part of the fun, surely? :)
Like I said, I'm a sucker for optimisation, although I think I'd start by looking at trying some stuff that might work for a 64k intro rather than something bytetro-sized. Sounds like I should be able to make some progress without the asm, to begin with at least. That's encouraging :) | | |
| | For 64kb you just have to do away with the c library. Not a big deal for audio/visual work anyway. | | |
| All of it? No C library #includes at all?
I can see how that's doable (I've written my own versions of various standard stuff before), but I hadn't considered it a necessity until you mentioned it.
I'm guessing the size-limited demos/intros don't use any graphics APIs either? Or is there some kind of exception or workaround that lets you use OpenGL or DirectX without having to have them included in the executable? I gather that things like .kkrieger use DirectX, but I've not looked into how they did that but kept the executable size down.
(truth be told, I've never really looked into what using those APIs does to executable size, and I don't know what the rules are for demos that use them)[Post edited by electrodruid on Tuesday 15 April 2008 - 1:48] | | |
| In windows the C library has traditionally been linked statically to your executable. Newer, dynamically linked libraries exist/are-shipped by microsoft but they may not be present in all versions of windows. For that reason it's not a good idea to rely on dynamically linked C-libraries for your intros.
You can use a smaller replacement for the C-library, one such exists and come by the name of WCRT. I'm not terribly convinced one needs more than a math.h implementation.
As for graphic libraries, sound libraries etc, they can be dynamically linked to your executable.. You're always going to require a >=directx8 installation anyway. Opengl also ships with OS. So no problem on that front. | | |
| or you just get the old vc6 version of the msvcrt lib which uses msvcrt.dll (always present on every version of windows since 2000 at least), and dynamic link to that.
if you're using vc2003/2005 you might get a couple of undefined symbols like ftol2, which you can easily implement yourself. | | |
| | since Win95 OSR2C, actually. | | |
| | keeping an eye on performance/optimising issues is never a bad idea ofcourse :) just don't forget to have fun while you're doing it :) | | |
|
|
|