C++ sucks for games

N

nokturnal

how can you say:

" I'm not "misunderestimating" anybody. I mean no offense.
Note how I said "Some C++ users I've known"."

when you agreed with this comment:
 
D

Daniel Haude

["Followup-To:" header set to comp.lang.c++.]
On Tue, 5 Apr 2005 09:55:45 +0100,
in Msg. said:
What irritates some of us is the frequent assertion by Lisp-ers that
they are somehow superior to the common herd, coupled with the somewhat
modest ouevre of games - and other software - actually produced using
what is quite a long-established language with a vociferous crowd of
advocates.

Programming language advocacy is beyond my mental capacities anyway. If
you are happy using some language to solve certain problems, then by all
means continue to do so. And if the majority of people use the wrong
approach you can even commercially exploit your competetive edge you. Why
annoy the errant majority on Usenet?

--Daniel
 
F

Frank Buss

nokturnal said:
secondly - Quake 2 source code downloadable from ftp.idsoftware.com
check it out
if memory serves me correct c++ was the language of choice - if not it
is definately C.

why didn't you load the source? I don't know how it looks like for the
current version, because it needs a Quake2 installation, but in the "old"
directory on the server is a file q2source_12_11.zip, with about 1 mb C
sources and headers and about 500 kb scripts. And the C source has many
inline defined lists, for example the AI code. Looks a bit like if I would
write it in Lisp :)
So since you decided to agree with captain anal about our herd of
neglegent c++ programmers
please enlighten me as to what lisp has to offer that other languages
don't!

one of the main advantages of Lisp, at least for me, is the interactive
environment. Other languages has it, too, like Smalltalk or BeanShell for
Java, but I don't know a C++ implementation, which provides something
similar.

Another nice feature are Lisp macros. A Lisp macro is Lisp code, executed
at compile time to produce Lisp code, for example you can enhance the
language by a "foreach" statement with a macro. This is not possible with C
and complicated with C++.

A buggy example of a Lisp game I'm writing:

http://www.frank-buss.de/lisp/aqueduct.html

This proves at least that it is possible to write games in Lisp. And you
can access the OS from Lisp, like I've done in CL-Canvas, which I've used
in my texture generator:

http://www.frank-buss.de/lisp/texture.html

The version on the website took some minutes to calculate the last texture,
but an optimized version, in Lisp of course, creates and shows the last
texture in 0.4 seconds. So together with ephemeral GCs, like enabled by
default in LispWorks, it should be possible to create modern games with
smooth and flicker free animations in Lisp.
 
N

nokturnal

okay it got the better of me - i downloaded it again
and i have to say - Its C. there are a few java class files
as well but the majority of the files contain C.

Extraction:
void chick_pain (edict_t *self, edict_t *other, float kick, int damage)

{

float r;

if (self->health < (self->max_health / 2))

self->s.skinnum = 1;

if (level.time < self->pain_debounce_time)

return;

self->pain_debounce_time = level.time + 3;

r = random();

if (r < 0.33)

gi.sound (self, CHAN_VOICE, sound_pain1, 1, ATTN_NORM, 0);

else if (r < 0.66)

gi.sound (self, CHAN_VOICE, sound_pain2, 1, ATTN_NORM, 0);

else

gi.sound (self, CHAN_VOICE, sound_pain3, 1, ATTN_NORM, 0);

if (damage <= 10)

self->monsterinfo.currentmove = &chick_move_pain1;

else if (damage <= 25)

self->monsterinfo.currentmove = &chick_move_pain2;

else

self->monsterinfo.currentmove = &chick_move_pain3;

}
 
?

=?ISO-8859-15?Q?Andr=E9_Thieme?=

nokturnal said:
Im sure lisp has its forte - AI but then again my partner asures me that
prolog is a much better.

The funny thing is that you can do logic programming in Lisp. With
around one day of work you can program proglog inside of Lisp.


André
--
 
?

=?ISO-8859-1?Q?Andr=E9_Thieme?=

marcus said:
Are you kidding or what?
Do you actually think games should be written in Lisp???
C++ is slow???
C++ is fast and the speed comes from it beeing non interpreted. The
speed also comes from other things like non-garbage collecting.

OK you do sacrify some flexibility by using a non interpreted
language, but what you gain is speed.

And when it comes to Lisp, have you even considered the huge function
overhead?

Did you know that Lisp code usually gets compiled to native machine
code? During programming you sometimes use an interpreter to do little
tests which speed up programming (because you can see results without
compiling and testing the running program).

Did you also know that you can change compiled code with Lisp *during
runtime*? How would you like it to fix some bugs or change some
algorithms while you are testing the running program without the need to
stop it (and thereby possibly lose a lot of data)?


André
--
 
D

David Steuber

nokturnal said:
how can you say:

" I'm not "misunderestimating" anybody. I mean no offense.
Note how I said "Some C++ users I've known"."

when you agreed with this comment:

The original original post was a parody in the first place. It's
unfortunate that this thread has been resurrected.
 
L

Lionel

CII said:
C++ is not "sacrus selectus" either . I have a Right to dissent and
to be myself. This should be a place for discussions, not for fights,
I believe. You C plusplusmongers make it sound like there's no life
outside of C. Oh brother.

I found the first post with which you agreed, more of an attempt to
fight than the response that you reply to here.

I'm not biased either as C++ isn't a my primary programming language,
nor do I do any games development. The first post was purely a troll and
has no place here.

Lionel.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,578
Members
45,052
Latest member
LucyCarper

Latest Threads

Top