Allegro.cc - Online Community

Allegro.cc Forums » Off-Topic Ordeals » Yup... it's the Third Edition

This thread is locked; no one can reply to it. rss feed Print
Yup... it's the Third Edition
Evert
Member #794
November 2000
avatar

of Game Programming All in One.

I'll be fair and say that most programming books ship with buggy code, but I'm rather surprised that this one sneaked through:

   char *s="";
   int n, ax;
   
   //display joystick information
   sprintf(s, "Number of Joysticks: %d", num_joysticks);

Archon
Member #4,195
January 2004
avatar

Awww, and we are just about to release Allegro 5.... Waste of a book! :P

X-G
Member #856
December 2000
avatar

Hello, Buffer Overflow.

--
Since 2008-Jun-18, democracy in Sweden is dead. | 悪霊退散!悪霊退散!怨霊、物の怪、困った時は ドーマン!セーマン!ドーマン!セーマン! 直ぐに呼びましょう陰陽師レッツゴー!

CGamesPlay
Member #2,559
July 2002
avatar

Let me be the first so say, Congratulations on acquiring the book finally, Evert!

--
Tomasu: Every time you read this: hugging!

Ryan Patterson - <http://cgamesplay.com/>

Evert
Member #794
November 2000
avatar

Oh, the book does cover Allegro 4.2, so it is actually a real update. And the code does seem better than what I've seen of the 2nd edition code. Minus the little bugger up there, of course.

EDIT: I don't have the book. I was answering a question on the book's forums (see http://d2337290.u86.mygisol.com/forums/index.php?act=ST&f=7&t=792&s=43c7dc4545e68647de85934380ba2123).

gnolam
Member #2,030
March 2002
avatar

What about conio.h and all that other crap?

--
Move to the Democratic People's Republic of Vivendi Universal (formerly known as Sweden) - officially democracy- and privacy-free since 2008-06-18!

Kris Asick
Member #1,424
July 2001

Funny you brought this up, Evert. I just saw the second edition of that book in my local bookstore today and was surprised to see Allegro as the engine of choice in it! :o

It didn't really cover anything new to me though so I decided not to spend $80 CAD on something I wasn't going to get much out of. But for anyone wanting to learn with Allegro, it does cover a LOT of ground.

--- Kris Asick (Gemini)
--- http://www.pixelships.com

--- Kris Asick (Gemini)
--- http://www.pixelships.com

Kikaru
Member #7,616
August 2006
avatar

I got started with the second edition of that book. I found it quit helpful, and as a result I am actually working with Allegro. :)

HoHo
Member #4,534
April 2004
avatar

It also teaches quite a bit about C if you start fixing all the bugs the code has :)

__________
In theory, there is no difference between theory and practice. But, in practice, there is - Jan L.A. van de Snepscheut
MMORPG's...Many Men Online Role Playing Girls - Radagar
"Is Java REALLY slower? Does STL really bloat your exes? Find out with your friendly host, HoHo, and his benchmarking machine!" - Jakub Wasilewski

James Stanley
Member #7,275
May 2006
avatar

Did he even test that before getting it published?

HoHo
Member #4,534
April 2004
avatar

It probably worked on his PC with his particular setup. We all know that when it works on our own machines it will surely work on every other OS/compiler combination also!

__________
In theory, there is no difference between theory and practice. But, in practice, there is - Jan L.A. van de Snepscheut
MMORPG's...Many Men Online Role Playing Girls - Radagar
"Is Java REALLY slower? Does STL really bloat your exes? Find out with your friendly host, HoHo, and his benchmarking machine!" - Jakub Wasilewski

Kikaru
Member #7,616
August 2006
avatar

Try writing a bug-free coding book on your own, you'll see. ;)

Evert
Member #794
November 2000
avatar

As I said, most books have buggy code. This particular example shouldn't (doesn't) even run though...

Quote:

What about conio.h and all that other crap?

I think it's gone and main now seems to be int main() as it should be. Haven't seen enough code to say for sure though.

ReyBrujo
Moderator
January 2001
avatar

Hmm... oh, look, Evert has an account there, must be fun ;)

A real pity I am starting my holidays this Monday for two weeks, otherwise I may have considered buying it and sending it to you straight from Amazon, if you don't feel like buying it.

--
RB
光子「あたしただ…奪う側に回ろうと思っただけよ」
Mitsuko's last words, Battle Royale

Rash
Member #2,374
May 2002
avatar

X-G said:

Hello, Buffer Overflow.

Not only that, but we also have a non-const C-string pointing to a literal string, something which, off the top of my head, is either bad style or downright illegal, depending on the C/C++ standard used.

Go to: