pouët.net

Go to bottom

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.
added on the 2008-07-24 16:48:51 by smash smash
and shallow copy traps :)
added on the 2008-07-24 17:12:53 by Gargaj Gargaj
Optimus: Most major GBA demos are AFAIK written more or less in pure C/C++.
added on the 2008-07-24 17:19:47 by kusma kusma
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?
added on the 2008-07-24 17:41:00 by Optimonk Optimonk
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! :)
added on the 2008-07-24 17:46:36 by smash smash
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.
added on the 2008-07-24 17:52:57 by doomdoom doomdoom
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 :)
added on the 2008-07-24 17:53:18 by GbND GbND
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)
added on the 2008-07-24 18:01:41 by kb_ kb_
smash: ... wtf is netball?
added on the 2008-07-24 18:03:42 by Gargaj Gargaj
volleyball i guess ? o_O
added on the 2008-07-24 18:06:40 by Zest Zest
ah no, a mix between basketball and handball, only for british women :p
added on the 2008-07-24 18:08:50 by Zest Zest
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
added on the 2008-07-24 18:18:24 by Jcl Jcl
zest: yeah the "british" part of the sentence convinced me that envy is not required in this situation :D
added on the 2008-07-24 18:19:33 by Gargaj Gargaj
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.



added on the 2008-07-24 18:20:53 by chaos chaos
well at least c# does have unsafe mode...
added on the 2008-07-24 18:46:29 by Gargaj Gargaj
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.


added on the 2008-07-24 18:46:36 by Zest Zest
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.
added on the 2008-07-24 19:25:52 by ryg ryg
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,
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 :)
added on the 2008-07-24 19:52:05 by skrebbel skrebbel
muahahaha, ok, epic nomenclature fail from my side, sorry for that. Kids, better study or be a loser like me ;)
added on the 2008-07-24 22:34:57 by kb_ kb_
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 ;-)
added on the 2008-07-24 22:47:34 by thec thec
thec did you just say *valve* ??
added on the 2008-07-24 23:11:14 by Zest Zest
Pressure valve demos <3
added on the 2008-07-24 23:11:53 by doomdoom doomdoom
Quote:
I have coded asm on 8bit microcontrllers (68000)


Waiting for amiga zealots to raise their voice. Come on, where are you?
added on the 2008-07-25 01:24:11 by Calexico Calexico
Quote:
I have coded asm on 8bit microcontrllers (68000)

FINISH HIM !
added on the 2008-07-25 01:28:53 by RetroVM RetroVM
C-C-C-C-Cpubreaker!!! :)
added on the 2008-07-25 01:53:21 by raer raer

login

Go to top