razorace Posted November 10, 2003 Share Posted November 10, 2003 Well, that's not what I've heard. What do you mean by "run-time polymorphism"? Link to comment Share on other sites More sharing options...
Marker0077 Posted November 10, 2003 Author Share Posted November 10, 2003 Half-Life was not based on Quake 1 or Quake 2, it was inbetween the 2 actually. Quake 2 was around the time of being released when they started on Half-Life, so I'm not exactly sure why they chose that version of Quake to base it on but that's what I read, it's based on an inbetween version of the 2. Link to comment Share on other sites More sharing options...
Emon Posted November 10, 2003 Share Posted November 10, 2003 Technically, it started on Quake, but they made many of the same changes to it that id did for Quake II. razorace, which isn't what you've heard? The run-time polymorphism? It's simple. Polymorphism is overloading things like operators, functions, etc. It's slow because it has to figure out what to call or use at the run time, each time. For example (very simple), if you have: void foo(int A, int B, int C) { ... } void foo(string A, string B, string C) { ... } for(int I = 0; I < 1000000; I++) { static string A, B, C; foo(A, B, C); } Each time you have foo(A, B, C); it has to figure out which function to call, every time, for every iteration of that loop. It's not a big deal with that example, but when you start to have a ton of classes, virtual functions and all that, it starts to get slow, and it starts to matter in games, where everything is real-time. GameDev.net has a good article on it here. Link to comment Share on other sites More sharing options...
RenegadeOfPhunk Posted November 10, 2003 Share Posted November 10, 2003 Emon, void foo(int A, int B, int C) { ... } void foo(string A, string B, string C) { ... } for(int I = 0; I < 1000000; I++) { static string A, B, C; foo(A, B, C); } This example you've used above is an example of polymorphism, but it's not the kind that will cause run-time slowdown. What you've shown is how functions can be differentiated not only by their name, but also by their parameter types. The compiler will effectively treat each function seperately - and compile them seperately. i.e. no run-time slowdown when compared with the C equivalent. (which would be just a function with a different name) The example used in the tutorial, however, is valid. The tutorial shows polymorphism as it relates to functions being overloaded by inherated classes. THis does require vtables, and as such, this would require extra run-time to work out exactly which function needs to be called. ...but let's make it clear - a vtable is just a list - nothing more. And unless your class structure is hideously tall, the time taken to traverse the vtable each time COULD be considred negligable -although I accept this depends on how 'real-time' the task is. I would say the example used in the tutorial - while valid - is a little extreme. It would be a VERY tricky task to ALWAYS single out loops which you can be sure will only EVER be passed one particular object type... So yes - C++ .vs C is a balance between maintainable code and squeezing absolutely every single cycle you can out of the resulting compiled code... (exactly the same as C vs. assembler) I would argue that - depending on what 'level' of the code your working on, the benifits of OOP would far outweigh any performance decreases (in fact, I'm not sure in many cases if you would even notice them) - but without knowing all the details of the specific tasks, you can only guess - so... One thing for sure is that HL used C++ - at least for the moddable parts. And I don't know of HL being a notoriously slow engine because of it... Link to comment Share on other sites More sharing options...
Samuel Dravis Posted November 10, 2003 Share Posted November 10, 2003 Well, HL is an old game. It wouldn't be as noticable on today's computers. Link to comment Share on other sites More sharing options...
Emon Posted November 10, 2003 Share Posted November 10, 2003 You're right, that's a bad example. I realized it when I was in the shower a few minutes ago. Link to comment Share on other sites More sharing options...
RenegadeOfPhunk Posted November 10, 2003 Share Posted November 10, 2003 Well, HL is an old game. It wouldn't be as noticable on today's computers. So you would have to compare HL's performance to a similar game from the same time. What I'm saying is - when HL first came out - were people saying 'Wow - this is slow as hell compared to the other © games around...?' - ermm - not that I'm aware of... And even IF there was a performance issue, how could you be sure which areas of slowdown were being caused by C vs. C++, as opposed to any number of other factors... ...anyway - I guess this is off-topic now - so I won't labour the OOP vs. procedural debate. (Believe me - I've had this type of discussion a lot...!) Link to comment Share on other sites More sharing options...
DDROM Posted October 24, 2007 Share Posted October 24, 2007 Is there any way to adjust the server config to take off the silly green glow , you get when dueling, ....really wrecks the duels................ Link to comment Share on other sites More sharing options...
Wytchking Posted October 24, 2007 Share Posted October 24, 2007 Look at the date before you post. The threads you've posted in are several years old. Link to comment Share on other sites More sharing options...
razorace Posted October 24, 2007 Share Posted October 24, 2007 There isn't a way that I'm aware off that involves server configurations. But you could probably hack the shaders to not display anything for that particular effect thou. Link to comment Share on other sites More sharing options...
Quijohn Posted October 25, 2007 Share Posted October 25, 2007 Here's a link to a pk3 to put in your base folder to get rid of the shield. It works for me. http://jediknight3.filefront.com/files/search/?search_category=all&fields_name=1&fields_filename=1&keyword=no+shield&game=38 Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.