Who has coded (asm) demos on the biggest nb of machines?
category: general [glöplog]
in support of what kb says (i think).. if you went to a games company interview as a programmer, its very likely one of the questions in the c++ test would be on virtual functions, inheritance, order of calling destructors etc.
and shallow copy traps :)
Optimus: Most major GBA demos are AFAIK written more or less in pure C/C++.
True, even the impressive ones.
Although most of them are ugly 3d engines that goes a bit slow. I am wondering if faster and more impressive GBA demos would be possible with assembly or it doesn't deserve the struggle?
Although most of them are ugly 3d engines that goes a bit slow. I am wondering if faster and more impressive GBA demos would be possible with assembly or it doesn't deserve the struggle?
gargaj: but gated knowledge communities cant replace getting pissed at 1pm in a student bar at 50p a shot surrounded by the women's netball team! :)
kusma: I know, ASM today only makes sense in extremely rare cases. Or when you're writing a compiler.
But that's not the same as saying you can happily ignore low-level programming. No compiler I know of (for any language) will automatically change your doubles to floats (or vice versa, as seems to be ideal on many AMD processors), or convert your linked list into an array when the cache benefits outweigh the various drawbacks of using arrays, or split your vertex array into separate world-space/object-space/texture-space arrays, or whatever.
To know when what high-level approach is ideal, you need the low-level perspective too, I guess is what I'm saying.
But that's not the same as saying you can happily ignore low-level programming. No compiler I know of (for any language) will automatically change your doubles to floats (or vice versa, as seems to be ideal on many AMD processors), or convert your linked list into an array when the cache benefits outweigh the various drawbacks of using arrays, or split your vertex array into separate world-space/object-space/texture-space arrays, or whatever.
To know when what high-level approach is ideal, you need the low-level perspective too, I guess is what I'm saying.
For a huge uni project my group and I created a top-to-bottom SIMD DSP RAM , from c++ all the way down to hardware at the register level. I wrote programs in an asm language of my creation. And they fucking worked too :)
GbND: That's the whole point... We did that kind of too at university (ok, in that mandatory course we only designed a 16bit CPU with like 8 scalar registers and a whopping 8 instructions). Still; if students DO learn the extreme low level stuff as well as Java for Algorithms, lots of math and general scientific concepts that should be more than enough to fill all the blank spaces where the stuff you need in the industry resides in - why are only so damn few of them able to do it? I mean... the grads applying for a job in a game company DO want to work in that field (I wouldn't know any other reason, definitely not ease of work or even money :), and still they can't be arsed to at least apply their science stuff to our engineering stuff? Probably Zest is right, as much as it hurts to admit it ;)
(btw, two of the best guys in our company actually _did_ come from uni without any great coding experience, so there are notable and very appreciated exceptions)
(btw, two of the best guys in our company actually _did_ come from uni without any great coding experience, so there are notable and very appreciated exceptions)
smash: ... wtf is netball?
volleyball i guess ? o_O
ah no, a mix between basketball and handball, only for british women :p
To get back to the original topic... I don't think it's about assembler on different machines... it's about coding demos in assembler on different machines.
There's a big difference... I might know how to code assembly for a glass cutting machine controller... making a demo with that? it's a whole different story (even if the assembler is easy).
I have coded in the past some zx assembler... but have never done a demo (and wouldn't really know where to start) on a Spectrum
There's a big difference... I might know how to code assembly for a glass cutting machine controller... making a demo with that? it's a whole different story (even if the assembler is easy).
I have coded in the past some zx assembler... but have never done a demo (and wouldn't really know where to start) on a Spectrum
zest: yeah the "british" part of the sentence convinced me that envy is not required in this situation :D
i never coded a 100% asm demo on pc, but you can add c64 (refering to the first post). you could also add half a dozen other cpu's, but not if you make "released demo" a requirement.
assembly coding is mostly a waste of time, because the compiler can generate code in milliseconds that i can only beat spending hours, most times not even that.
if the compiler generates notably worse code than you could, in most cases it's a lot better to play with compiler options, pointer aliasing and intrinsics until you are satisfied, that's a lot faster and more flexible than writing the function in asm. reading compiler generated asm is an important skill here.
of course i am talking about c/c++. all java and c# code is inferior by definition. actually you can make c++ almost as slow as java and c# by using all the features that make java and c# a "better" language (GC, array checks, no pointers, ...), in this case you are better off using the looser-languages first place. but c++ gives you a choice.
when teaching, i recommend teaching c++. you can turn a c++ programmer into a java programmer by telling him he should simply forget about pointers and memory management. the other way around is more complicated: when you go from java to c++ you have to actually learn something new. of course, in a crammed teaching schedule java is just cheaper, and some stupid guys won't drop out of the course.
how can you write a c++ program without knowing what "virtual" does? you have the choice to make everything virtual, like in java, which is a very bad idea when it comes to performance and memory management, or you can make nothing virtual, which is simply wrong. if you don't know the difference you don't know what you are doing, and that is not acceptable for a professional programmer, even in the games business.
assembly coding is mostly a waste of time, because the compiler can generate code in milliseconds that i can only beat spending hours, most times not even that.
if the compiler generates notably worse code than you could, in most cases it's a lot better to play with compiler options, pointer aliasing and intrinsics until you are satisfied, that's a lot faster and more flexible than writing the function in asm. reading compiler generated asm is an important skill here.
of course i am talking about c/c++. all java and c# code is inferior by definition. actually you can make c++ almost as slow as java and c# by using all the features that make java and c# a "better" language (GC, array checks, no pointers, ...), in this case you are better off using the looser-languages first place. but c++ gives you a choice.
when teaching, i recommend teaching c++. you can turn a c++ programmer into a java programmer by telling him he should simply forget about pointers and memory management. the other way around is more complicated: when you go from java to c++ you have to actually learn something new. of course, in a crammed teaching schedule java is just cheaper, and some stupid guys won't drop out of the course.
how can you write a c++ program without knowing what "virtual" does? you have the choice to make everything virtual, like in java, which is a very bad idea when it comes to performance and memory management, or you can make nothing virtual, which is simply wrong. if you don't know the difference you don't know what you are doing, and that is not acceptable for a professional programmer, even in the games business.
well at least c# does have unsafe mode...
Eiffel is supposed to be the best OOP language from a teaching point of view (at least for some french uni professors... as the Eiffel founder is french ;) before Java. But Java is usually the chosen one because it's both good from this pov AND used in industry.
virtual/not virtual: the main problem here seems to be that kb said "virtual inheritance" in his original post. virtual inheritance is stuff like "class A : public B, public C, virtual public D", which really is a pretty obscure C++ feature that doesn't have analogs in most other languages. but i think what he meant is just the difference between virtual and nonvirtual (final in java parlance) methods, and that is indeed something every use of an OOP language should know.
smash/kb, ah ok we were talking about game programming purely. no shit most uni grads are bullshit for that. most of those who got through just got popped *out* of the idea that studying cs will make you the lead dev on quake 6!
but kb sure does have a point - wtf to gamedev applicants who can't even care to (have) figure(d) stuff out on their own.. they should become db consultants for better pay *and* career opportunities :)
ryg, ah so kb doesn't even know the difference? :D it's also why i was slightly "wtf" about it - it's not particularly commonly used or even needed.
that said i never understood why c++ needs virtual methods; can't the compiler just figure out itself which methods i'm overriding and which i'm not? D seems to be doing that.. but then again maybe i missed something.
zest: i never understood why unis so commonly pick java. it seems to have all the disadvantages combined (must be OO immediately, thus encouraging doing imperative shit in an OO environment and calling that OO; has things like eclipse that stop you from thinking for yourself; is generally *too easy*; etc)
my uni did the initial programming courses in pascal (personal preference of some teachers) which in fact did the job just fine. add object pascal (delphi) for real quite decent OO and after that my whole education stopped caring about which language to use ("for this project we recommend using c, get a book if you don't know it"). eiffel is great conceptually - i love bertrand meyer's ideas about multiple inheritance and how right he is (and how much c, ++, #, java, etc suck in this respect) and it's kind of too bad how eiffel isn't taken seriously. but it's just turned out to be mostly a showcase programming language..
anyway, i think haskell should be the first programming language taught.
btw zest,
but kb sure does have a point - wtf to gamedev applicants who can't even care to (have) figure(d) stuff out on their own.. they should become db consultants for better pay *and* career opportunities :)
ryg, ah so kb doesn't even know the difference? :D it's also why i was slightly "wtf" about it - it's not particularly commonly used or even needed.
that said i never understood why c++ needs virtual methods; can't the compiler just figure out itself which methods i'm overriding and which i'm not? D seems to be doing that.. but then again maybe i missed something.
zest: i never understood why unis so commonly pick java. it seems to have all the disadvantages combined (must be OO immediately, thus encouraging doing imperative shit in an OO environment and calling that OO; has things like eclipse that stop you from thinking for yourself; is generally *too easy*; etc)
my uni did the initial programming courses in pascal (personal preference of some teachers) which in fact did the job just fine. add object pascal (delphi) for real quite decent OO and after that my whole education stopped caring about which language to use ("for this project we recommend using c, get a book if you don't know it"). eiffel is great conceptually - i love bertrand meyer's ideas about multiple inheritance and how right he is (and how much c, ++, #, java, etc suck in this respect) and it's kind of too bad how eiffel isn't taken seriously. but it's just turned out to be mostly a showcase programming language..
anyway, i think haskell should be the first programming language taught.
btw zest,
Quote:
i started as a musician in the scene and only considered coding demos long after i had gotten into the scene - i could code (like you can), but had no idea about graphics coding. i still don't very much, but i'm able to pull off fairly decent demos when i try. i seriously recommend giving it a go. make a cube rotate, get stuff on screen, try to do a few effects. it's very rewarding, you'll see :)...
muahahaha, ok, epic nomenclature fail from my side, sorry for that. Kids, better study or be a loser like me ;)
I have coded asm on 8bit microcontrllers (68000), 16bit pc and 32bit pc, I also hacked machine code on a heathkit something, and some octal air valve preassure controller computer thingie back in school, but I never been stupid enough to code demos on any ;-)
thec did you just say *valve* ??
Pressure valve demos <3
Quote:
I have coded asm on 8bit microcontrllers (68000)
Waiting for amiga zealots to raise their voice. Come on, where are you?
Quote:
I have coded asm on 8bit microcontrllers (68000)
FINISH HIM !
C-C-C-C-Cpubreaker!!! :)