C++ sucks for games

K

Kaz Kylheku

Gerry Quinn said:
But there are no *tasks* fitting that description (hello, Turing-
complete).

Hahaha. In these newsgroups related to advanced programming languages,
there is a law in effect very similar to Godwin's. Namely, as the
thread grows longer, the probability approaches one of someone
invoking Turing equivalence as an argument against statements about
different languages having different expressiveness. The associated
tradition is identical.
 
T

Trent Buck

Quoth Philippa Cowderoy on or about 2004-11-12:
Personally I use [Windows] because ... I can't be bothered to
figure out how to duplicate my desktop setup under X.
You shouldn't duplicate you Windows desktop, you should improve upon it:)
Though I guess it'd be nice to be able to drop app windows into
splitter panes - IIRC it's Ion I should play about with for that?

Ion or WMI, or ratpoison or stump (see previous post).

- Ion is the oldest and most featureful, it uses Lua (turing-complete) for
configuration. It is relatively difficult to configure.

- Ratpoison is newer and more minimalist, it uses a simple command set
based on GNU Screen, and it feels a lot like screen / emacs. It
relies on forking to a shell for flow-control.

- WMI is based on Ion and Ratpoison, but it feels like vi rather than
emacs.

- StumpWM is basically ratpoison **written in Common Lisp + CLX**.

I've found ratpoison is quite easy to test new WM ideas in; I wrote a
script to make it do the Exposé thing, for example. Real soon now I'm
going to get StumpWM to load, then it's going to be *really* fun.

-trent
 
G

Gerry Quinn

You seem to have a real problem facing logic. It's true that
well-written programs can produce garbage output (typically when given
bad input). It's also true that this program produces garbage output.

That is rather harsh. As I said earlier, AARON seems to show some
capability in the realm of overall picture composition, which is a
separate issue from the parameterised drawings.

As to whether it is art, my own view is that AARON itself can certainly
be considered a piece of conceptual art, whatever about its works. I
don't think they qualify.

My Brewster screensaver is effectively based on parameterised functions,
and it frequently produces very beautiful images. But I don't consider
them to be art.

Gerry Quinn
http://bindweed.com
Games, Kaleidoscopes, Screensavers
 
G

Gerry Quinn

[...]
But they don't address the point I was making:

"The time it takes to sling together a few algorithms and produce a
basic pre-designed game is insignificant. Even if Lisp were ten times
more productive in this regard, it wouldn't make any difference. [...]
Productivity in messing around with small programs that are not for
general release is not really an advantage."

Tell me, is your point based on:

a) your extensive experience writing large programs,
b) your extensive experience with Lisp, or perhaps
c) your complete lack of experience with either.

It is based on my extensive experience in writing programs that are
large compared to the toy programs being discussed.

Christer, I suggest you back off. I didn't insult you when you made a
fool of yourself on the "Fibonacci Serie : looking for a fast recursive
algorithm" thread on c.g.d.p.algorithms a few weeks ago, even though you
gave the distinct impression of having jumped in simply to seize what
seemed like an opportunity to prove me wrong. [Well, having failed on
algorithmic complexity theory, you DID eventually get me on a spelling
error. Kudos, man.]

If you have something interesting to contribute about the benefits or
otherwise of Lisp for games development, or an argument other than ad
hominem as to why the point I make above is invalid, I am sure we would
all enjoy reading it.

- Gerry Quinn
 
G

Gerry Quinn

whumeniu-delete-this- said:
I took some time and delivered it as a standalone exe for
windows for those who do not have LWW (even the evaluation
version). Delivery means the lisp image is shaken of uneccessary
functionality before being saved.

http://www3.telus.net/public/whumeniu/concentration.zip

It is a 1.6 MB zip file. The delivery file is included. If
any wants to (and can) deliver a Mac or Linux version, be my guest.
I have lost my icon editor somewhere along the way, so I have
just defaulted the icon to the LW icon.

Well, that is certainly small enough to make Lisp viable for shareware
authors. And the program beats Michael's and mine for size.

One minor gameplay consideration - it would be nice if clicking on a new
tile aborted the two-second display, which otherwise is a bit
frustrating. But perhaps that only shows I am a bit too old for this
game...

I used WebDings on a game myself once. It's a handy way to get some
cheap and cheerful graphics.

- Gerry Quinn
 
G

Gerry Quinn

Gerry Quinn said:
Hahaha. In these newsgroups related to advanced programming languages,
there is a law in effect very similar to Godwin's. Namely, as the
thread grows longer, the probability approaches one of someone
invoking Turing equivalence as an argument against statements about
different languages having different expressiveness. The associated
tradition is identical.

But the point I am making is that Turing-completeness implies that all
*tasks* can in fact be expressed without using any singular
expressiveness feature of Lisp. The issue is whether a large proportion
of tasks can be 'naturally' expressed in a form unique to Lisp, and in
no other way. In other words, what tasks 'naturally' require Lisp'd
unique features, and are much harder to express without them?

I don't see why many games should have such a property.

- Gerry Quinn
 
T

Trent Buck

Quoth Gerry Quinn on or about 2004-11-13:
The issue is whether a large proportion
of tasks can be 'naturally' expressed in a form unique to Lisp, and in
no other way. In other words, what tasks 'naturally' require Lisp'd
unique features, and are much harder to express without them?

s/require/leverage/. There is a significant difference between X
`requiring' Y and X being able to take advantage of Y. Whether
deliberately or accidentally, you seem to be conflating these two
distinct relations.

I haven't enough experience with lisp to give good examples of tasks
that leverage Lisp extras. I will give some poor examples instead.

I earlier mentioned specialization of flow control structure[0], which
cannot be written correctly in C or C++. Another is return-from, which
can only be approximated in C / C++ with the goto operator.

From any perspective, which is easier to read?:

dotimes (i, 10)
printf ("%d", i);

for (i=0; i<10; ++i)
printf ("%d", i);

-trent
[0] See doseq() in http://144.132.79.25/~twb/src/common/augment.h
 
J

John Thingstad

But the point I am making is that Turing-completeness implies that all
*tasks* can in fact be expressed without using any singular
expressiveness feature of Lisp. The issue is whether a large proportion
of tasks can be 'naturally' expressed in a form unique to Lisp, and in
no other way. In other words, what tasks 'naturally' require Lisp'd
unique features, and are much harder to express without them?

I don't see why many games should have such a property.

- Gerry Quinn

Ever seen repetitive code.
Lisp macro facility can automate much of this.
Ever spent half the time writing code to
check values and return values?
There reason you can't see it probably lack of experience
and that you don't know what to look for..

Paul Graham's "On Lisp" might give you some ideas.
http://www.paulgraham.com/onlisp.html
similarly
http://www.gigamonkeys.com/book/
shows you some practical examples on applying Lisp to a problem.

Lisp is more than the sum of it's parts.
You have to use it for a while to get the picture.
 
J

Jerry Coffin

[ ... ]
It depends in what universe.

There are: (expt (expt 2 24) (expt 2 22)) 4-Mpixel 24-bit color
pictures. That's about (expt 10 30000000) Since there's only about
(expt 10 17) seconds in the universe (or at most (expt 10 19)), you
just DON'T have sufficient time. That's why you need to be scient
to produce something worth looking at.

While you're math is correct, it's only distantly related to the right
math to do. Basically, your math would be right IF you were talking
about randomly producing one specific output. The problem is that
there are MANY possible 4 megapixel pictures worth looking at. As
such, the correct question has little to do with the total number of
possiblities, and a great deal to do with the _percentage_ that are
worth looking at -- if 90% of the possible outputs qualified as art,
then random generation would typically do the job in a few seconds.
If, OTOH, only one in 2^256 arrangements is worth looking at, then the
chances of producing something interesting before the second law of
thermodynamics has its ultimate triumph are slim indeed.

The fact remains, that regardless of how unlikely it is (and I'll
openly grant that it's extremely unlikely), even the most remote
possibility is still better than none at all.
 
J

Jerry Coffin

[ ... ]
Well, Harold Cohen was a pretty eminent artist before he
started working on AARON. He's a professor at UCSD. It's
possible that he's "incapable of recognizing art when he
sees it", but it doesn't seem very plausible.

Rather the contrary. IMO, being recognized as an "eminent artist"
among academia (at least at the presnt time) is nearly a guarantee of
exactly the opposite.

The fact is that if my preschool nephew had painted one of these, I'd
consider it fair -- but I definitely expect (and see) better out of
his 9 year-old brother.
 
P

Pascal Bourguignon

[ ... ]
It depends in what universe.

There are: (expt (expt 2 24) (expt 2 22)) 4-Mpixel 24-bit color
pictures. That's about (expt 10 30000000) Since there's only about
(expt 10 17) seconds in the universe (or at most (expt 10 19)), you
just DON'T have sufficient time. That's why you need to be scient
to produce something worth looking at.

While you're math is correct, it's only distantly related to the right
math to do. Basically, your math would be right IF you were talking
about randomly producing one specific output. The problem is that
there are MANY possible 4 megapixel pictures worth looking at. As
such, the correct question has little to do with the total number of
possiblities, and a great deal to do with the _percentage_ that are
worth looking at -- if 90% of the possible outputs qualified as art,
then random generation would typically do the job in a few seconds.
If, OTOH, only one in 2^256 arrangements is worth looking at, then the
chances of producing something interesting before the second law of
thermodynamics has its ultimate triumph are slim indeed.

The fact remains, that regardless of how unlikely it is (and I'll
openly grant that it's extremely unlikely), even the most remote
possibility is still better than none at all.

The number of pictures retained in museums is closer to 1 than to any
number that would invalidate my "math".
 
R

Rahul Jain

Sorry for the delayed followup, but it seems that no one has brought up
a point I consider very important in OOP and have been frustrated by
non-observance of it numerous times.

Svein Ove Aas said:
On the subject of Lisp, though, I'd hope that most Lispers *don't* think
having closing parantheses a long way from their opener is a good thing.
Personally I always try to keep functions below a screenful, so I can see
all of it at once.

I keep telling friends not to do that in C, though, and they keep not
listening to me - even adding vertical whitespace where none is needed - so
I wouldn't be surprised at all if I someday see a 200-line Lisp function.
They probably have better memory than I do.

This is actually bad object-oriented design. Functional decomposition is
essential to having a good, extensible class where you can override just
the functionality you need to override instead of having to
copy-and-paste a massive block of code or an entire class-and-methods
definition just to tweak the way one specific bit of it works.
 
W

Wade Humeniuk

Gerry said:
Well, that is certainly small enough to make Lisp viable for shareware
authors. And the program beats Michael's and mine for size.

One minor gameplay consideration - it would be nice if clicking on a new
tile aborted the two-second display, which otherwise is a bit
frustrating. But perhaps that only shows I am a bit too old for this
game...

I have taken your suggestion and modified it slightly. Guessing is
now a button-1 press. Aborting a line of guessing is pressing button-2
or button-3 anywhere on the board.
(center and right clicks on a right-handed three button mouse).

The concentration game is written such that one can create a game
where one has to match any n tiles (where n >= 2). Its strange playing
match 3 on a 9x6 board. Makes my head hurt. The way the
game is written if 3 tiles need to match one has to get the first
two to match before one is even allowed to select a third tile. Is
this the proper rule for Concentration? (are their official rules?).

(Note: It would be fairly simple to create a delivered game where one
could change to other sized boards in the game, CAPI would allow this to happen
dynamically in the current window.)

I have made the changes and the new zip file is at the same place.

http://www3.telus.net/public/whumeniu/concentration.zip

I used WebDings on a game myself once. It's a handy way to get some
cheap and cheerful graphics.

Seemed like the easiest way to get enough variety in the game.

Wade
 
G

Gareth McCaughan

Jerry Coffin wrote:

[I said:]
Rather the contrary. IMO, being recognized as an "eminent artist"
among academia (at least at the presnt time) is nearly a guarantee of
exactly the opposite.

Not only among academia; also among practising artists.
The fact is that if my preschool nephew had painted one of these, I'd
consider it fair -- but I definitely expect (and see) better out of
his 9 year-old brother.

Clearly you don't care for AARON's alleged art. Neither,
for what it's worth, do I. But I'm not going to claim on
that ground that Cohen is incompetent; in so far as artistic
ability is assessable on any basis other than "well, I
don't like *that*", Cohen is someone whose judgement is
worth respecting.
 
V

Vladimir Sedach

[ ... ]
Well, Harold Cohen was a pretty eminent artist before he
started working on AARON. He's a professor at UCSD. It's
possible that he's "incapable of recognizing art when he
sees it", but it doesn't seem very plausible.

Rather the contrary. IMO, being recognized as an "eminent artist"
among academia (at least at the presnt time) is nearly a guarantee of
exactly the opposite.

The fact is that if my preschool nephew had painted one of these, I'd
consider it fair -- but I definitely expect (and see) better out of
his 9 year-old brother.

Where the current Aaron excels is in the area of color, which is not
unexpected as that is what Harold Cohen was famous for in the 1960s
(in fact, in one incident a curator who had lost track of Cohen after
he moved to the States recognized a drawing of Aaron's as Cohen's
before the painter was revealed to her). Cohen has never been too
concerned about representation in his work (all it would do is clutter
Aaron's knowledge base with irrelevant details) but with more
fundamental problems of composition (most of his paintings are
actually far less representational than what Aaron does).

I think you (and most other people in this thread, too) could really
benefit from a remedial art class or two.

Vladimir
 
V

Vladimir Sedach

Gerry Quinn said:
As to how long it took (and presumably according to the Lisp boosters
his thirty years of work are equivalent to about 150 years of C++), I
don't see that it matters much.

Note that it's almost 40 years now, and for most of those Aaron has
been written in C. Cohen began the current version of Aaron in 1988 (I
think), partly because a colleauge strongly recommended Lisp to him,
and partly because TI gave him an Explorer Lisp machine that he wanted
to get some use out of. Not long after, he was raving about how Lisp
enabled him to finally tackle color, something that he had been
putting off for more than a decade because of the complexity. He was
still finding opportunities for plugging Lisp in a recent talk he gave
at the Tate:

http://www.tate.org.uk/onlineevents/live/cohen.jsp

If you want to learn more about Aaron's history (if for nothing else
than finding something to criticize about Aaron that hasn't been done
to death 20 years ago) pick up a copy of Pamela McCorduck's _Aaron's
Code_.

Vladimir
 
S

Stefan Ram

Vladimir said:
Where the current Aaron excels is in the area of color, which
is not unexpected as that is what Harold Cohen was famous for
in the 1960s

I do not long to see the creativity of a human painter through
a computer program as a mere medium for the artist, but rather
to see the creativity of the computer program itself. - At
least when a connection to A.I. is claimed.

To write a good chess program, I suppose, one does not have to
be a good chess player, more a good programmer. An AI chess
program is "opaque", it does not play chess like its author
would do, so one can not see the chess-playing style of its
author "trough it".
(in fact, in one incident a curator who had lost track of Cohen
after he moved to the States recognized a drawing of Aaron's as
Cohen's before the painter was revealed to her).

Possibly, because the program was not capable to develope
something new.
I think you (and most other people in this thread, too) could
really benefit from a remedial art class or two.

Possibly one would learn there that the liberation of art from
merely representing objects has to do with an art work not
being entirely "transparant" - i.e., only representing a part
of the world that can be seen through it -, but being somewhat
"opaque", partially creating a world of its own.

In the same sense, an A.I. program will not just be an
implementation of the style, ideas or thoughts of his creator,
but rather be an open system with an own memory, being able to
interact, evolve and to create something new.
 
J

Jerry Coffin

[ ... ]
The number of pictures retained in museums is closer to 1 than to any
number that would invalidate my "math".

So you figure if it's not already in a museum, it can't be art?

By that theory, you've just proven that that program in question can't
possibly create art.

The bottom line is that your math is wrong and your conclusion is
wrong. A positive number, no matter how infinitesimal, is still, by
definition, greater than zero. IOW, no matter how tiny the improvement
might be, it's an improvement nonetheless.
 
C

Christopher C. Stacy

[ ... ]
The number of pictures retained in museums is closer to 1 than to any
number that would invalidate my "math".

So you figure if it's not already in a museum, it can't be art?

Approximately.

(This begs the question of whether a computer can produce art.)
 
J

Jeff

Christopher said:
Approximately.

(This begs the question of whether a computer can produce art.)

Sounds more like the question is "what is art?", which is much harder
to define :) Given a narrow view of what art is, certainly a computer
could produce it.

Jeff M.
 

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
474,202
Messages
2,571,057
Members
47,666
Latest member
selsetu

Latest Threads

Top