Not logged in, Join Here! or Log In Below:  
 
News Articles Search    
 


Submitted by Timothy Barnes, posted on October 29, 2000




Image Description, by Timothy Barnes



This is a recent screenshot of the Captured Reality Engine. The pink thing is a test of my particle engine. There are 1000 particles in that scene. The map is a deathmatch map that I'm still working on.

Anyway, the framerate is still somewhat low since I haven't added a BSP engine and special collision optimizations. The particles aren't much of a slow down though. It dropped about 5 frames using 1000 particles.


[prev]
Image of the Day Gallery
www.flipcode.com

[next]

 
Message Center / Reader Comments: ( To Participate in the Discussion, Join the Community )
 
Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.
 
Mark Friedenbach

October 30, 2000, 02:12 AM

I strongly dislike Mark Friedenbach for dissing up C++...

Heh, I guess you didn't notice the [Sarcasm] blocks..

I was simply countering the "VB-Sucks!!" crowd. I myself am neutral. Every language has it's purpose, and there is no general solution to everything.

BTW: You'll find me coding in pure C/asm 99% of the time. I make these comments because I'm sick and tired of these "language wars", and people claiming one language is "better" than another.

C++ makes code nicer looking

That's opinionated. Ever seen TAL or Pascal? (not to mention VB, of course)

Personally, C++ code disgusts me. But that's not what matters. If it does the job, it does the job. Good documentation will make up for not-so-pretty code.

C++ has been known to IMPROVE application speeds (templates for example)

In comparison to what? I'm sure it's faster than, say, interpreted Perl.

Parameterized code is a fine concept in theory. Templates, however, are a poor implamentation of this idea. But this is not the point of your post, so I'll continue on.

You do NOT have to be intimately familiar with your environment. There is something called ANSI C++, the additional features provided by the compiler are independant of that.

ANSI isn't the only standard. ISO C++ was ratified in '97, and includes such things as namespaces and a new template mechanism. The problem is that not all compilers/development-environments have proper support for all these features, despite the fact that they may be in the standard.

Just because something is in the standard, it doesn't mean that it is automatically supported by compilers. This is without mentioning the various implementation-defined options that exist within the standard.

There are also some things that people need to get done that are not covered by the ANSI/ISO standards. A makeshift C++ ABI, for instance. In such a case, the programmer has no choice but to use compiler-specific features and limit their skill set to that of a specific development environment because of limitations in the language standard.

Even funnier is the fact that there is only ONE VB ENVIRONMENT, there is no such thing as Borland VB, so who is becoming more intimate with their environment?!?!

Huh? I wasn't talking about Visual Basic in my post. I was (sarcastically) comparing C++ to C for all those "C++ RULZ, VB SUCKS" people.

There is not further abstraction from the machine, C++ code compiles into assembly just like C and still supports inline assembly

I don't remember an assembly instruction to instantate a template class, or determine the target of a virtual function call...

So take your thoughts on C++ and bury them

Nice to know we have such an accepting flipcode crowd; eager and open to new ideas.

 
Timothy Barnes

October 30, 2000, 02:17 AM

->Nice picture. I'm assuming a basic particle system (no pun intended there) with one-one src-dst blending, (or something along those lines, doesn't look like it uses an alpha channel).
exactally

->I was mostly just wondering what you're using for the data. You said about implementing HSR and BSP, are you using ID type BSP levels or just some raw format you put together from scratch?
It's based on what I've read on BSP and such. I'm not quite sure on how big name companies do it so I just made my own style. Basically it'll do pre calculated HSR without poly splitting.

Anyways, kool level, can't wait for a demo, look very Escher-eske with the tiled floor and walkways.
Thanks. My artist doesn't really like the textures though. Maybe he can pull out some nice 128x128 textures. :)

 
Mark Friedenbach

October 30, 2000, 02:18 AM

Before this discussion degenerates any more, I'd like to say that this really is a cool shot. Keep up the good work!

 
Timothy Barnes

October 30, 2000, 02:24 AM

thanks :)

 
Revolver

October 30, 2000, 03:35 AM

AFAIK, you don't have run-time binding of virtual functions thru the vtable - it's all resolved at compile time. The extra "overhead" comes from an extra 4 bytes of memory taken up, which is generally insignificant.

Templates are NOT poorly implemented, nor are they slow. The STL is amazingly fast, and is even used in quite a few games you see on store shelves right now. There were a couple things that Bjarne didn't put into C++ as far as generic programming is concerned, but overall the implementation is pretty good.

C++ is always compiled straight to machine code... it has for quite some time. The only time it wasn't was when Bjarne first created the language, when it was really just a preprocessor sitting on top of standard C. Compilers now compile C++ natively, and can even optimize code in ways that aren't possible with straight C.

Overall, I think VB is fine (though while it's a "general purpose" language, it's real target audience is database/GUI developers). Are you telling me that the VB runtime is no longer needed? That's something new to me... ;)

 
Gunnar Horrigmo

October 30, 2000, 08:36 AM

FYI; "Reality Engine" is a registered trademark of SGI,
but you probably knew that. and if you didn't you do now. :)

cool particle-thingy.

 
kusma

October 30, 2000, 09:22 AM

There is not further abstraction from the machine, C++ code compiles into assembly just like C and still supports inline assembly.

Well, actually I belive that C++ is interpitated into C before compilation... I might be wrong, though...

 
Revolver

October 30, 2000, 11:54 AM

No, C++ is compiled straight to machine code, just like C is. Like I said earlier, when it was first created (aka prototyped), it was a such a thing: a preprocessor that generated C code, which in turn was compiled. For quite a few years now, compilers have had native support for C++ - in fact, most C compilers are really C++ compilers now.

 
Mark Friedenbach

October 30, 2000, 08:56 PM

AFAIK, you don't have run-time binding of virtual functions thru the vtable - it's all resolved at compile time. The extra "overhead" comes from an extra 4 bytes of memory taken up, which is generally insignificant.

With most compilers, that is correct. But there is still the added run-time inefficiency of derefrencing the vptr and indexing into the vtable to retrieve the function pointer.

Templates are NOT poorly implemented, nor are they slow.

In which compiler? Be more specific. Templates are not slow, I never said that.

The STL is amazingly fast

The STL is fast. And it doesn't use the majority of the features that most C++ evangelists here are so fond of. No Polymorphism, no Abstract-Base hierarchies, no Inheritance whatsoever. I wonder why?

C++ is always compiled straight to machine code...

When did I say it wasn't?

What I did say is that many object-oriented programming tools or techniques provided by C++ at the language level have no machine counterpart. Polymorphism. RTTI. None of these exist in machine or assembly code.

Overall, I think VB is fine... [snip] ...Are you telling me that the VB runtime is no longer needed? That's something new to me...

Not once have I stated anything about about Visual Basic! I don't use Visual Basic, and don't have the reason or credentials to make a comment on the state of said language. Read my posts again, please.

 
Revolver

October 30, 2000, 11:42 PM

I wasn't responding to just you, but to previous comments as a whole. Sorry for the confusion I caused. ;)

 
Mark Friedenbach

October 30, 2000, 11:55 PM

Oh, woops. Sorry.

I took quite a bit of flak for my comments (as you can see), and I guess I just assumed you were targetting me like everyone else... :)

 
Thad

October 31, 2000, 08:27 AM


Well, actually I belive that C++ is interpitated into C before compilation... I might be wrong, though...


You are wrong. Early versions of Objective-C compiled to C, which is probably where you got this idea.

There is a C++ compiler that compiles to C, I can't remember what its called, but its purpose is to let developers use C++ to target platforms that only have native C compilers.

Thad

 
This thread contains 42 messages.
First Previous ( To view more messages, select a page: 0 1 ... out of 1) Next Last
 
 
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.