j_post | 1 Jun 2003 02:05

Re: Software 3D Engine

On Sunday 18 May 2003 12:23 pm, chris wrote:
> If you're interested in writing one yourself, there's a great book out
> by John De Goes called "Cutting-Edge 3D Game Programming with C++".
> Newer editions are all about D3D/OGL I think, but if you can find the
> edition from 1996, the first one I think, it's an entire book dedicated
> to the math behind making an engine similiar to the quality of Descent.
> Pretty fun stuff if you like math. :)
>

Unfortunately the book appears to be out of print. However...

"Mathematics for 3D Game Programming & Computer Graphics", by Eric Lengyel, 
Charles River Media, 2002, appears to be an excellent text. Be forewarned, 
it's not a game programming text, it is a math textbook. If partial 
differentials scare you, or you think "eigenvector" is a mountain in Germany, 
then save your money ($50US). Otherwise, you can really have fun with this 
one. The last three chapters (10-12) are devoted to the physics that apply to 
game play.

Jeff
eDU! | 1 Jun 2003 03:04
Picon

RE: Error of SDL

Hello
            As i have seen, asking to other ppl. This is a very common error
message on SDL, and theres a lot of things that may cause SDL to throw this
error message.

                                               Eduardo Garcia Rajo (h)
------------------------------------------------------------------
Visite: http://www.solucion-digital.com.ar
     SOLUCION DIGITAL
Redes - Software - Servicios

----- Original Message -----
From: Ramos Ariel Silvio (N) <asnramos <at> unsa.edu.ar>
To: <sdl <at> libsdl.org>
Sent: Saturday, May 31, 2003 6:54 PM
Subject: [SDL] Error of SDL

>
John Popplewell | 1 Jun 2003 05:56
Picon
Picon
Favicon

Re: Code error, help pls

Hi,

First thing to do is to temporarily disable the SDL parachute
so that you get a real exception with (hopefully) a traceback:

  if (SDL_Init(SDL_INIT_VIDEO|SDL_INIT_NOPARACHUTE) < 0 )
  {
    cout << "Error iniciando video: "<< SDL_GetError() <<endl;
    return 1;
  }

You aren't testing your return values where you need too e.g.

  // inicamos nuestras clases
  if ( vikingsbase.init("data/vikings") != 0 )
    return 1;

Shouldn't this be an 's' for 'sun'?

  if ( sunbase.init("data/vun") != 0 )
    return 1;
--------------------------^

When I run your original, the code hurtles-on-through these lines
even though they return an error (data files not found) and later
I get an exception here:

SDL_Surface * ImageLoad(char *file)
{
  SDL_Surface *tmp1, *tmp2;
(Continue reading)

Ignacio Castaño | 1 Jun 2003 16:26
Picon
Picon
Favicon

custom cursors

Hi,
I would like to use the default cursors of the operating system, and avoid
SDL custom cursors. That is, I want to manage the cursor on my own using the
interface of the operating system. That will allow me to use the transparent
and animated cursors that the system provides by default, instead of the
boring monochrome cursors that SDL uses. I know that I can draw the cursors
on my own, but that is suboptimal, and I'd like to use the cursors of the
user's theme.

Is there any way to disable SDL cursor management? SDL automatically
replaces the system cursor, and on win32, for example, the SetCursor calls
doesn't seem to have any effect.

Any suggestions would be appreciated,

Ignacio Castaño
castanyo <at> yahoo.es
eDU! | 1 Jun 2003 18:32
Picon

RE: Code error, help pls

Jhon thanks you very much for your help :)

I used "vun" instead of "sun", becouse if i use "char_directory/sun" the
compiler "thinks" that .../sun is a ".../s..." and wont compile.

I will rewrite those parts you told me. I really thought that the error was
about the array of frames, and not deleteing it.

THANKS you again!!

                                                           Eduardo Garcia
Rajo (h)
------------------------------------------------------------------
Visite: http://www.solucion-digital.com.ar
     SOLUCION DIGITAL
Redes - Software - Servicios

----- Original Message -----
From: John Popplewell <john <at> johnnypops.demon.co.uk>
To: <sdl <at> libsdl.org>
Sent: Sunday, June 01, 2003 12:56 AM
Subject: Re: [SDL] Code error, help pls

>
Atrix Wolfe | 1 Jun 2003 18:47
Picon

Re: Code error, help pls

hey eDU,

/sun should be fine, \sun is what might give you troubles.  You can try
\\sun if you want cause \\ turns into \ inside a string so that you dont
have problems like you are experiencing.

-Atrix

----- Original Message -----
From: "eDU!" <quaker <at> advancedsl.com.ar>
To: <sdl <at> libsdl.org>
Sent: Sunday, June 01, 2003 9:32 AM
Subject: RE: [SDL] Code error, help pls

> Jhon thanks you very much for your help :)
>
> I used "vun" instead of "sun", becouse if i use "char_directory/sun" the
> compiler "thinks" that .../sun is a ".../s..." and wont compile.
>
> I will rewrite those parts you told me. I really thought that the error
was
> about the array of frames, and not deleteing it.
>
> THANKS you again!!
>
>                                                            Eduardo Garcia
> Rajo (h)
> ------------------------------------------------------------------
> Visite: http://www.solucion-digital.com.ar
>      SOLUCION DIGITAL
(Continue reading)

Ryan C. Gordon | 1 Jun 2003 23:25

Re: Any written some widgets and controls via SDL ?


> Any written some widgets and controls via SDL ?
>
> Like for a simple text entry dialog, yes-no dialog, alert dialog, etc ?
>
> free for re-distribute ?

http://www.libsdl.org/libraries.php

Look for "GUI" on that page for several options.

I like ParaGUI, but it might be too heavyweight for what you are
describing.

--ryan.
Ryan C. Gordon | 1 Jun 2003 23:34

RE: Code error, help pls


> I will rewrite those parts you told me. I really thought that the error was
> about the array of frames, and not deleteing it.

Not freeing allocated memory will not cause a segmentation fault. You get
a segmentation fault when you write to memory you don't own (or a NULL
pointer).

John's review of your code was very detailed, but I just wanted to throw
this in there: The sooner you learn to use the debugger, the easier the
job becomes.

Get the "GDB" manual, learn how to interpret a "backtrace" when the
program crashes with a Segmentation Fault. Frequently, this is all you
need to diagnose a problem within seconds. Following that, learn how to
examine data with the debugger, which will help with the rest of the
crashes.

Other development tools, like Visual C on Windows, look different, but
follow the same principles when debugging.

Being an effective debugger is more important than being a competent
programmer, trust me. Pick up this skill as quickly as you can.

--ryan.
Bill Kendrick | 1 Jun 2003 23:58
Favicon

Re: Any written some widgets and controls via SDL ?

On Sun, Jun 01, 2003 at 05:25:29PM -0400, Ryan C. Gordon wrote:
> 
> > Any written some widgets and controls via SDL ?
> >
> > Like for a simple text entry dialog, yes-no dialog, alert dialog, etc ?
> >
> > free for re-distribute ?
> 
> http://www.libsdl.org/libraries.php
> 
> Look for "GUI" on that page for several options.

I wonder if it might be good to categorize the libraries page somehow.
Like:

  Data File Support & Playback/Display
    SDL_image
    SDL_mixer
    SMPEG

  Primitives and Sprites
    SDL_prim
    ...

  GUI Widget Libraries
    SDL_gui
    ParaGUI
    ...

etc.
(Continue reading)

Bill Kendrick | 2 Jun 2003 00:26
Favicon

Re: Code error, help pls

On Sun, Jun 01, 2003 at 05:34:59PM -0400, Ryan C. Gordon wrote:
> Being an effective debugger is more important than being a competent
> programmer, trust me. Pick up this skill as quickly as you can.

Hehe...  printf() can be pretty 'effective' ;^)

-bill!
(who obviously doesn't play with GDB enough; recommend any good tutorials?)

Gmane