Everyone read please!

This was going to be my other suggestion as many people seem to be knocking
down the idea of the SDLu.

Make something smaller than a tutorial. Basically take a question and show
several ways to implement it and show a person how they can go from a->b and
some special cases that may pop-up.

That sounds great. :slight_smile:
Iā€™ll collect these and make them into an SDL ā€œknowledge-baseā€ that we can
add to the website at some point.

See ya,
-Sam Lantinga, Software Engineer, Blizzard Entertainment

And it would be nice to find those tutorials from SDLā€™s web page.

And for those simple trickā€™s and tips it would be nice to have them in
some plain text file.
So people could just copy the necessary prototype and the code to
apropriate place and modify it if necessary
In this way you donā€™t need to include a big library if all you want is
a litle trick function to do bump map or something.
This is good for small tricks, because people can contribute to it more
easily than makeing tutorials. Of course there is many things that will
need tutorials, because the subject doesnā€™t fit in one small function,
but there are thousands of litle tricks that could help newbies and
even those that have coded for ages.

I can volunteer to collect this kind of functions collection, if people
think that they could share some of their litle tricks and tips and are
willing to comment and send those functions to me.

Example

/***************************************************************

  •                                                         *
    
  • Function: niceTrick(Trick, Tip) *
  •                                                         *
    
  • Author: Name, possibly Mail address *
  •                                                         *
    
  • Does: Plah Plah ā€¦ *
  •                                                         *
    
  • Restrictions: Plah Plah ā€¦ *
  •                                                         *
    

***************************************************************/

void niceTrick(struct trick, struct tip); //Function prototype

void niceTrick(struct trick mytrick, struct tip mytip)
{
//The useful litle trick code here
}

/***************************************************************

  •                                                         *
    
  • Function Name *
  •                                                         *
    

***************************************************************/On 2002.01.18 23:23 Sam Lantinga wrote:

Itā€™s probably better to show people the way to do something with
tutorials than to write a utility library to do it for them.

I agree. Tutorials rock. Most people just want the pieces that
interest
them, and usually have half of what they need already anyway.

This was going to be my other suggestion as many people seem to be knocking
down the idea of the SDLu.

I think that everyone has their own SDLu library somewhere, but itā€™ll be
filled with routines that are relevant to them and maintained by them. I
guess that this is an important part as Sam doesnā€™t need to be worried about
updating any helper functions that people may or may not use in production
games.

Make something smaller than a tutorial. Basically take a question and show
several ways to implement it and show a person how they can go from a->b
and some special cases that may pop-up.

I had in mind something like (and forgive me for saying it) the Microsoft
Knowledge base, or simple DirectX SDK examples. On a searchable site

Iā€™d imagine it to be similar to a FAQ but more proactive, I often think of
FAQā€™s as quick places to look when things arenā€™t working as they should.

These could be tips like, Optimisation techniques and different ways of doing
things like timing, threads and so on. Possibly stuff like collision or X
Platform issues that have been encountered, stuff like that.

I know itā€™s not strictly on topic, but if a new developer wants to write a
game, itā€™s all well and good having a cool library to use, but maybe advice
from people who use it all the time could help them to go in the right
direction and not get frustrated when things donā€™t exactly how they thought
they would.

Just my opinion anyway

Cheers

Jason Farmer

mgirard wrote:

Bob Pendleton wrote:

I think that is an important observation. It would be great if
people turned their clever and creative snips of SDL code into
tutorials.

Tell me if itā€™s a good ā€œtutorialā€ idea : a C/C++ Squeletton projects

  • makefile stuff ??
    My makefile donā€™t work yet but Iā€™m reading ā€œGNU autoconf, automake
    and libtoolā€ so
    it 'll work soon :wink: (So iā€™m still compiling with a 1 miles long g++
    commandā€¦)

Yes, Iā€™d love to see that.

I fully agree - that autoconf/automake stuff can scare even experienced
hackers awayā€¦ heh

BTW, feel free to steal anything you find useful from the Kobo Deluxe
build scripts. (Thereā€™s ā€œbundleā€ install targets for Mac OS X and
Windows, ā€œhow to find [_]snprintf()ā€, ALSA, OSS and OpenGL detection,
etcā€¦) Iā€™m not (yet :wink: an automake/autoconf wizard myself, but Iā€™ll
help out if I can.

Just to help people to start a new ā€œSDL Object Orientedā€ projectā€¦
no ?

On the other hand, if you just want a simple makefile that will compile
your SDL program let me know and I will send you one that is already
set up to compile SDL programs using G++. I think the guy who invented
Make was the first and only person to actually write a makefile.
Everyone else just copies one they found sitting around on disk some
where and editted it for their own use.

Butā€¦ Iā€™ve actualy written a few from scratch. Am I insane? :wink:

//David Olofson ā€” Programmer, Reologica Instruments AB

.- M A I A -------------------------------------------------.
| Multimedia Application Integration Architecture |
| A Free/Open Source Plugin API for Professional Multimedia |
----------------------------> http://www.linuxdj.com/maia -' .- David Olofson -------------------------------------------. | Audio Hacker - Open Source Advocate - Singer - Songwriter |-------------------------------------> http://olofson.net -'On Saturday 19 January 2002 00:06, Bob Pendleton wrote:

My makefile donā€™t work yet but Iā€™m reading ā€œGNU autoconf, automake
and libtoolā€ so
it 'll work soon :wink: (So iā€™m still compiling with a 1 miles long g++
commandā€¦)

Note that this book is also available online.

I fully agree - that autoconf/automake stuff can scare even experienced
hackers awayā€¦ heh

The secret is to learn automake AND autoconf at the same time, and
ignore all the stuff in the autoconf info files about how to construct
your makefile.inā€™s.

You only need three files; configure.in (get a basic by running autoscan
on your directory), Makefile.am (start with the extremely simple example
in the automake info files), and a file to ā€œbootstrapā€ the build
process. An example bootstrap file follows;

#!/bin/sh

This script can be used to bootstrap thxā€™s autotool setup.

Due to a minor bug in automake version 1.4, the toplevel Makefile.in

will be patched. This is only relevant if you plan on doing a

make dist - I use that, which is why I like it to work.

echo Setting up m4 macros && \

aclocal -I config && \

aclocal &&
echo Creating headers &&
autoheader &&
echo Autogenerating Makefile.ins &&
automake --add-missing --copy &&
echo Patching toplevel Makefile.in &&
cat Makefile.in | sed ā€˜s/cp -pr $$/$/cp -pr $$d/$/ā€™ >
Makefile.in.patch &&
mv -f Makefile.in.patch Makefile.in &&
echo Creating configure script &&
autoconf &&
echo ā€œYou can now run ./configure --help (or ./configure && make)ā€
|| echo Some kind of error happened - you can not run ./configure.

OK, Iā€™ll stop this now, as it is probably of topic, but, really autotools
is a lot simpler than people think, if you ignore all the hairy stuff to
begin with (eventually you will need it, but by that time you will
understand the basics a lot better.

set up to compile SDL programs using G++. I think the guy who invented
Make was the first and only person to actually write a makefile.
Everyone else just copies one they found sitting around on disk some
where and editted it for their own use.

Butā€¦ Iā€™ve actualy written a few from scratch. Am I insane? :wink:

Nah, I have done that as well. It is a skill I am quickly forgetting
though. Only really relevant when you have to do very tricky things,
like crosscompiling with non-gnu tools, and stuff like that.

Mads

P.S. Make no mistake, I am no autotools guru - I have just found it to be
simpler than its rumours. Most guides/tutorials try to do way to many
things at a time.On Wed, 23 Jan 2002, David Olofson wrote:

ā€“
Mads Bondo Dydensborg. @Mads_Bondo_Dydensbor
Each generation has the right to determine its own culture. Culture isnā€™t
just symphony orchestras, movies about dead British royalty and hard-bound
books. For some, culture is now also gaming, websites, chat and messaging
systems, TV shows, music and movies.
- Jon Katz, Slashdot, on youth culture.

My makefile donā€™t work yet but Iā€™m reading ā€œGNU autoconf,
automake and libtoolā€ so
it 'll work soon :wink: (So iā€™m still compiling with a 1 miles long
g++ commandā€¦)

Note that this book is also available online.

I fully agree - that autoconf/automake stuff can scare even
experienced hackers awayā€¦ heh

The secret is to learn automake AND autoconf at the same time, and
ignore all the stuff in the autoconf info files about how to construct
your makefile.inā€™s.

Yep, I figured that out after a while. Pretty easy when you get the idea

  • but getting all tests and stuff right is still a bit hairy.

[ā€¦]

set up to compile SDL programs using G++. I think the guy who
invented Make was the first and only person to actually write a
makefile. Everyone else just copies one they found sitting around
on disk some where and editted it for their own use.

Butā€¦ Iā€™ve actualy written a few from scratch. Am I insane? :wink:

Nah, I have done that as well. It is a skill I am quickly forgetting
though. Only really relevant when you have to do very tricky things,
like crosscompiling with non-gnu tools, and stuff like that.

As Iā€™ve switched to autoconf/automake, Iā€™m only using "hand written"
makefiles for managing the source tree of our old DOS application at
work. (Itā€™s still compiled on the old Borland C++, but Iā€™m using some
custom Linux tools to create compact symbol tables and the like, and I
have targets for making boot floppies and release packages and that kind
of stuff.)

Now Iā€™m porting the mess to DJGPP, so soon I can use real tools the
whole way. :slight_smile:

Mads

P.S. Make no mistake, I am no autotools guru - I have just found it to
be simpler than its rumours. Most guides/tutorials try to do way to
many things at a time.

I have to agree. I had some problems finding out where to start (the
included docs are pretty confusing, as they seem to assume that youā€™re
going to start out with automake and then add autoconf on top of it or
something), but Iā€™m not going back to writing makefiles - not even for
very small ā€œprojectsā€.

//David Olofson ā€” Programmer, Reologica Instruments AB

.- M A I A -------------------------------------------------.
| Multimedia Application Integration Architecture |
| A Free/Open Source Plugin API for Professional Multimedia |
----------------------------> http://www.linuxdj.com/maia -' .- David Olofson -------------------------------------------. | Audio Hacker - Open Source Advocate - Singer - Songwriter |-------------------------------------> http://olofson.net -'On Wednesday 23 January 2002 16:14, Mads Bondo Dydensborg wrote:

On Wed, 23 Jan 2002, David Olofson wrote:

David Olofson wrote:

mgirard wrote:

Bob Pendleton wrote:

On the other hand, if you just want a simple makefile that will compile
your SDL program let me know and I will send you one that is already
set up to compile SDL programs using G++. I think the guy who invented
Make was the first and only person to actually write a makefile.
Everyone else just copies one they found sitting around on disk some
where and editted it for their own use.

Butā€¦ Iā€™ve actualy written a few from scratch. Am I insane? :wink:

Yes, David you are insane. Accept that and your life will be much
easierā€¦ :slight_smile:

Honestly, Iā€™m sure Iā€™ve done the same thing at some time in the dim and
distant past. But, it is sort of like getting drunk while high up in the
branches of a tree. It seems fun at the time but it is not something you
are likely to want to do again.

Bob Pendleton> On Saturday 19 January 2002 00:06, Bob Pendleton wrote:

//David Olofson ā€” Programmer, Reologica Instruments AB

.- M A I A -------------------------------------------------.
| Multimedia Application Integration Architecture |
| A Free/Open Source Plugin API for Professional Multimedia |
----------------------------> http://www.linuxdj.com/maia -' .- David Olofson -------------------------------------------. | Audio Hacker - Open Source Advocate - Singer - Songwriter |-------------------------------------> http://olofson.net -ā€™


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

ā€“
Ā±-----------------------------------+

  • Bob Pendleton is seeking contract +
  • and consulting work. Find out more +
  • at http://www.jump.net/~bobp +
    Ā±-----------------------------------+

I have to agree. I had some problems finding out where to start (the
included docs are pretty confusing, as they seem to assume that youā€™re
going to start out with automake and then add autoconf on top of it or
something), but Iā€™m not going back to writing makefiles - not even for
very small ā€œprojectsā€.

Okayā€¦ I feel really behind for writing my own makefilesā€¦ Iā€™ve been
putting off learning automake/autoconf because I havenā€™t had the time to
learn all the test conditions and stuff. Is there a non-overwhelming
tutorial somewhere? If not, do you guys wanna write one? :slight_smile:

Thanks!

-MarkOn Wed, 23 Jan 2002, David Olofson wrote:

ā€“
Mark K. Kim
http://www.cbreak.org/mark/
PGP key available upon request.

Quoting ā€œMark K. Kimā€ :

Okayā€¦ I feel really behind for writing my own makefilesā€¦ Iā€™ve been
putting off learning automake/autoconf because I havenā€™t had the time
to
learn all the test conditions and stuff. Is there a non-overwhelming
tutorial somewhere? If not, do you guys wanna write one? :slight_smile:

Thereā€™s an autoconf/automake/libtool book available, and itā€™s also available
online at http://sources.redhat.com/autobook/

dunno about non-overwhelming, but hopefully itā€™ll be of some help.

ā€œMark K. Kimā€ wrote:

Okayā€¦ I feel really behind for writing my own makefilesā€¦ Iā€™ve been
putting off learning automake/autoconf because I havenā€™t had the time to
learn all the test conditions and stuff. Is there a non-overwhelming
tutorial somewhere? If not, do you guys wanna write one? :slight_smile:

http://sources.redhat.com/autobook/ would probably be a good start.

-Roger

Thereā€™s an autoconf/automake/libtool book available, and itā€™s also available
online at http://sources.redhat.com/autobook/

This is actually a good book, but it will take time to read.

I do not know of any good tutorials. I actually bought that book and read
it. But since then, I have been relying on the info pages and occasionally
looking up stuff in the online version of the book. Also, looking in other
peoples Makefile.am and configure.in is a good way to get started.On Thu, 24 Jan 2002, Andrew Murie wrote:

ā€“
Mads Bondo Dydensborg. @Mads_Bondo_Dydensbor
But the Napster case is not just, or even mainly, about piracy. It is about
business models. The industry wants to stick to its old one - selling
expensive compact discs - and to protect it. But Napsterā€™s success shows
that there is a lot of appetite for a new model. The old model is legal, but
the new one is not, since the industry refuses to endorse it.

Artistsā€™ interests deserve legal protection, within limits; business models
do not.

   - The Economist, 2001.02.24

GLUT is not typically used once you understand how it works except for
examples and portability. SDL is more useful and offers more features, so
many of us prefer it. GLu, on the other hand, contains a pile of routines
that people use all the time. All of them can be implemented in OpenGL
without much trouble, but they really are nicer. gluPerspective is a lot
simpler than glFrustum, for example. Whatā€™s being proposed is analogous
to GLu, not GLUT.

GLU is a set of very useful routines, most of which you will never use in
one given program. I donā€™t link against it myself because I use very
little of what it can provide. What I do use, I happen to have my own
implementations anyway. I still use it for quick things, but then I still
link libGL.so for quick things (Iā€™ve ranted before on this list about why
I donā€™t do that in anything I release, and why nobody else should either
if they value their sanity. SDL_GL_LoadLibrary is your friend.)On Fri, Jan 18, 2002 at 02:23:16PM -0500, Gerard wrote:

He just propose a OpenGLā€™s Glut.h like for SDL.
Wanna get Double-Click ? Itā€™s in SDL_lut.h or something
like that. Itā€™s not a bad ideaā€¦ we can put in somes
function like fade_in, fade_out, etcā€¦ but look what OpenGL
done with his Glut.h ā€¦ they flushed it. (Iā€™m right ??)
All guys I know start with it, and flush it after 1 or 2 weeks
of developmentā€¦

ā€“
Joseph Carter This end upside-down

ā€œNominal feeā€. What an ugly sentence. Itā€™s one of those things that
implies that if you have to ask, you canā€™t afford it.
ā€“ Linus Torvalds

-------------- next part --------------
A non-text attachment was scrubbedā€¦
Name: not available
Type: application/pgp-signature
Size: 273 bytes
Desc: not available
URL: http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20020124/9dd27222/attachment.pgp