New SDL article

There’s a new article on the SDL articles page:
http://www.devolution.com/~slouken/SDL/articles.html

It’s titled “Using SDL: The Birth of Pirates Ho!”, and it is the first
in a series of articles documenting the development of our first game. :slight_smile:

See ya!
-Sam Lantinga (slouken at devolution.com)

Lead Programmer, Loki Entertainment Software–
“Any sufficiently advanced bug is indistinguishable from a feature”
– Rich Kulawiec

There is a new SDL article on the article page:
http://www.devolution.com/~slouken/SDL/articles.html

Using SDL, Part 2: Coding “Pirates Ho!”

In this installment of the series on the new game “Pirates Ho!”, we’ll get down to the business of the initial coding of the game, working in C++ and introducing several GNU tools to help create some of the files we’ll need. We’ll then move on to look at error handling, object caching, logging functions, and finish up with a few notes on where to go from there.

Enjoy!
-Sam Lantinga (slouken at devolution.com)

Lead Programmer, Loki Entertainment Software–
“Any sufficiently advanced bug is indistinguishable from a feature”
– Rich Kulawiec

I think it is great that Sam is documenting this stuff. A lot of us are
having trouble finding good sources for autoconf and configure. A lot of
this is really useful. Especially when I am working on a game with some
people myself.

There is a new SDL article on
the article page: > http://www.devolution.com/~slouken/SDL/articles.html>
Using SDL, Part 2: Coding “Pirates Ho!”

In this installment of the series on the new game “Pirates Ho!”, we’ll get down to the business of the initial coding of the game, working in C++ and introducing several GNU tools to help create some of the files we’ll need. We’ll then move on to look at error handling, object caching, logging functions, and finish up with a few notes on where to go from there.

Enjoy!
-Sam Lantinga (slouken at devolution.com)

Lead Programmer, Loki Entertainment Software

“Any sufficiently advanced bug is indistinguishable from a feature”
– Rich Kulawiec

Hey, I don’t know if anyone has looked into this, but the
www.gnu.org site has online versions of all the books about gnu tools
written by the FSF. There is one on autoconf (Docmentation->Manuals
Online). Looks decent (better than a man page anway ;^) ).
Mike

Michael Orion Jackson*
TAMS Class of 96/UT Class of 200?*
Random Quote:*
Chemistry is not for the soft-brained or weak-hearted.********************************************************

There is a new SDL article on the article page:
http://www.devolution.com/~slouken/SDL/articles.html

Using SDL, Part 2: Coding “Pirates Ho!”

In this installment of the series on the new game “Pirates Ho!”, we’ll get
down to the business of the initial coding of the game, working in C++ and
introducing several GNU tools to help create some of the files we’ll need.
We’ll then move on to look at error handling, object caching, logging
functions, and finish up with a few notes on where to go from there.

Most of it (for me, anyways) is old but I am very appreciative of the bits
on autoconf + automake, those fearsome demons of the nether regions. Thanks.

Enjoy!
-Sam Lantinga (slouken at devolution.com)

Nicholas

Nicholas Vining “While you’re out there struggling
vining at pacificcoast.net with your computer, I’m naked,
icq: 20872003 clueless, and feeling good!”
- Ratbert

----- Original Message -----
From: slouken@devolution.com (Sam Lantinga)
To: sdl-announce at lokigames.com
Date: Sunday, March 19, 2000 11:22 AM
Subject: [SDL] New SDL article

There is a new SDL article on the article page:
http://www.devolution.com/~slouken/SDL/articles.html

Ooh-- after supporting 8 billion lines of legacy code over the past
couple of years, this hits on a topic that’s become near and dear to my
heart: elegant and informative handling of errors.

Sam, the “Status” baseclass is an interesting idea, but why not just
throw exceptions and catch them at an appropriate point, rather than
doing “nice guy” error handling and propagating return codes up the call
stack? This is cleaner and more reliable all around.

(As an aside to all, the “C++ FAQs” book by Marshall Cline, ISBN
0-201-30983-1, is fantastic-- by the far the best practical source of C++
programming info I’ve ever seen. This is for experienced C++
programmers, so it is not one of those “Learn C++ in 21 minutes” books.
Among dozens of other invaluable sections, there is a great one on
exception handling, which is where I picked up the expresion “nice guy
error handling”. The biggest problem with this approach to error
handling is that a chain is only as strong as the weakest link, so if you
miss a check of a result anywhere in your call chain, disaster may ensue.)

Along that sort of line, I’ve set up an exception class that includes
better information about where it was thrown and why. It seems to me
that the best thing to do is to include some useful information for the
user when the exception is thrown (e.g. "Could not read the image file
for the space-alien sprites-- please ensure the file ‘ALIENS.PNG’ is in
the directory ‘~/games/SpaceZap’ "). As well, it would be nice to log
the technical details of the error to a log file so the programmer can
try to figure out what went wrong later (since the average user won’t be
able to fix a problem no matter how good the error message is, sigh).
And if this were a perfect world, I’d also be able to get a call stack
dumped to the log. And no, I don’t want core files!

Anybody else have any thoughts on the whole topic of error handling? I
know that I spend a significant portion of my code checking on errors, so
this is an important topic.

-Roy

Sam, the “Status” baseclass is an interesting idea, but why not just
throw exceptions and catch them at an appropriate point, rather than
doing “nice guy” error handling and propagating return codes up the call
stack? This is cleaner and more reliable all around.

The gcc implementation of exception handling isn’t pretty, and tends to
increase the size of the excecutable by quite a bit in the current gcc
incarnations.

Other than that, I like it a lot. :slight_smile:

(As an aside to all, the “C++ FAQs” book by Marshall Cline, ISBN
0-201-30983-1, is fantastic-- by the far the best practical source of C++
programming info I’ve ever seen. This is for experienced C++
programmers, so it is not one of those “Learn C++ in 21 minutes” books.
Among dozens of other invaluable sections, there is a great one on
exception handling, which is where I picked up the expresion “nice guy
error handling”. The biggest problem with this approach to error
handling is that a chain is only as strong as the weakest link, so if you
miss a check of a result anywhere in your call chain, disaster may ensue.)

That’s a really good point. One of the most frustrating things in the
CivCTP port was that the code would load files and silently fail and
crash later in some unrelated code.

-Sam Lantinga				(slouken at devolution.com)

Lead Programmer, Loki Entertainment Software–
“Any sufficiently advanced bug is indistinguishable from a feature”
– Rich Kulawiec

There’s a new article on the articles page:
http://www.devolution.com/~slouken/SDL/articles.html

IBM DeveloperWorks - April 2000
Using SDL, Part 2: Graphic design

Sam Lantinga and Lauren MacDonell are now developing the story and graphic
design of “Pirates Ho!” – a swashbuckling, role-playing game for Linux that
they are creating from scratch. In this installment of their diary, the
authors describe the story development process and their sources of
inspiration. They also explain in detail how they design the images used
in the game.

See ya!
-Sam Lantinga, Lead Programmer, Loki Entertainment Software

The crayon drawling (spelling error intentional) really threw me off.
You should have consultatled with the list first Sam, I know how to
remove notebook paper lines from scans. The mock-up interface looked
really nice however, can’t wait for part 4.

Wesley Poole
AKA Phoenix Kokido
Tired of hiding behind a on-line only identity…
members.xoom.com/kokido
@Wes_Poole

Sam Lantinga wrote:

There’s a new article on the articles page:
http://www.devolution.com/~slouken/SDL/articles.html

IBM DeveloperWorks - April 2000
Using SDL, Part 2: Graphic design

Sam Lantinga and Lauren MacDonell are now developing the story and graphic
design of “Pirates Ho!” – a swashbuckling, role-playing game for Linux
that> they are creating from scratch. In this installment of their diary, the
authors describe the story development process and their sources of
inspiration. They also explain in detail how they design the images used
in the game.

See ya!
-Sam Lantinga, Lead Programmer, Loki Entertainment Software

There’s a new article on the articles page:
http://www.devolution.com/~slouken/SDL/articles.html

“Salty Sam”, indeed! Everybody who thinks that Sam is a serious respectable
programmer should take a look at this! (And what’s worse, the beard is
real!)

“Arr! Thar bee pirates in these here parts!”

Nicholas

----- Original Message -----
From: slouken@devolution.com (Sam Lantinga)
To: sdl-announce at lokigames.com
Date: Sunday, April 23, 2000 12:47 PM
Subject: [SDL] New SDL article

“Salty Sam”, indeed! Everybody who thinks that Sam is a serious respectable
programmer should take a look at this! (And what’s worse, the beard is
real!)

“Arr! Thar bee pirates in these here parts!”

How rude. :slight_smile:

grin

See ya,
-Sam Lantinga, Lead Programmer, Loki Entertainment Software

“Salty Sam”, indeed! Everybody who thinks that Sam is a serious respectable
programmer should take a look at this! (And what’s worse, the beard is
real!)
Better a pirate suit than a business suit!:slight_smile:

Long live the confused,
Akawaka.On Sun, 23 Apr 2000, Nicholas Vining wrote:

Bother, said Pooh as he ran out of taglines.

Better far to live and die
Under the brave black flag I fly
Then play a sanctimonious part
With a pirate head and pirate heart…

Away to the cheating world to you,
Where pirates all are well-to-do
I’ll stay true to the song I sing
And live and die a Pirate King…On Sun, Apr 23, 2000 at 09:01:04PM -0700, Nicholas Vining wrote:

There’s a new article on the articles page:
http://www.devolution.com/~slouken/SDL/articles.html

“Salty Sam”, indeed! Everybody who thinks that Sam is a serious respectable
programmer should take a look at this! (And what’s worse, the beard is
real!)


J. Valenzuela – tsaotsao at lokigames.com

“Salty Sam”, indeed! Everybody who thinks that Sam is a serious
respectable

programmer should take a look at this! (And what’s worse, the beard is
real!)
Better a pirate suit than a business suit!:slight_smile:

Alas, I have worn them too :wink:

Nicholas

----- Original Message -----
From: akawaka@skynet.ie (Martin Donlon)
To: sdl at lokigames.com
Date: Monday, April 24, 2000 6:55 AM
Subject: Re: [SDL] New SDL article
On Sun, 23 Apr 2000, Nicholas Vining wrote: