Wow i did not think that my simple (intended helpfull) remark will generate such an emotional flame
but know it did....so:
Guys, if u think modern computers dont help ASM or non OOP programming also...you are wrong...
So when a OOP compiled program runs "decent" an ASM program "rocks the sky". I know it because i do it. My whole RTS game is done in ASM....so...wanna check compiler speeds?
My whole project is now about 150.000 lines of code, about 1000 files and it re genereates an exe from scratch (compile,link with resouces add) in about 1 (ONE) second on a P2/400 computer
Of course i have no OOP (besides DirectX code i call, an the window class if u can call that OOP
today most "optimized" compilers only make about 100% up to 300% slower programs then ASM and again OOP compiled code is about 200% slower then normal HLL code...
Yes there are tricks to make it run a little faster...but the only thing that really can be done is pump up the hardware...
(but again ASM will benefit more ...)
For the ones that think their OOP code is fast, think about it:
Are you calling hardware assisted 3D render in? Well thats not your code...is HARDWARE! Are you calling some highly optimized ASM code? (like DirectX API...)...Well that is not your code also!
I have done my whole game myself...i only call DirectX for setup ... try to do Alpha Blending Blt in OOP an let us live long to see it finish a screen redraw..
Most source code i have ever seen (the one released to the public and that compile and run fine) are at least 40% ASM (the core) and the rest of the code is non OOP not even without jumps to labels!
Yes some AI scripts (they are HLL languages them self) are written using OOP....but they rely heavyly on some optimized ASM blocks to do the interpreted tricks...and they can have o fps of about..."now and then" or "once every 2 secconds"
If the OOP ONLY disadvantages are (you say):
and let me add:
Then i will consider removeing it from programming totally!... ...just kidding....but guys...dont forget its all about SPEED in games....(think at AI, GFX)
Games are very demanding to a PC, and if i can squeeze even 10% more using ASM and droping OOP i will gladly do it! But i get more then 200%...
Even if OOP has decent speed today (1Ghz Micros do the trick
) you can add enormouse more AI and GFX to a game by using ASM or even non OOP code and killing some OOP...
Yes there are advantages to OOP but those are more likely to be used in database visual programming rather then fast games.
I just wanted to kindly say: take care OOP can ruin your game speed...and generated a flame...ooops...not my intention...but if u want i can give you more arguments....just dont think i have to...
Edited by - bogdanontanu on December 22, 2000 5:36:06 PM