Profiler

I prefer GetKeys(). For games you really shouldn’t be using events, they
are too slow.

WaitNextEvent() is too slow. GetOSEvent is no slower than GetKeys()

Mark

Mark Elliott wrote:

I prefer GetKeys(). For games you really shouldn’t be using events, they
are too slow.

WaitNextEvent() is too slow. GetOSEvent is no slower than GetKeys()

Mark

You’re right. My bad.

Sean

I prefer GetKeys(). For games you really shouldn’t be using events, they
are too slow.

Sean>>I dont know if anyone is really in charge. Kyle seems to have done most of

the work.
I haven’t done much, just startup interface. I think that Max Watson was
working on sound, could be wrong…

I am working on my small part (cd interface) in my free time.
Unfortunately i only have a few free hours a week after school and work and
such. Dive in and help!
To be honest I’m not to sure of the future of Mac SDL, simple because the
Co-operative/non-reenternt nature of the MacOS. Nobody is trying to
support Win 3.1… In some ways it would almost be better to simple recode
a Mac OS X version.

But to keep the ball rolling, I wanted to ask the mac coders how they
prefered to get their keys strokes. Current SDL uses the events stucture
to update the SDLKeys structure. I have code that would use GetKeys. Sam
Lantinga suggested that we leave both methods in, and use a compiler
derective to switch between them. I think the getkeys method should be the
default. Any thoughts?

Also, when will SDL begin to support muliple resolutions? I experimented
with SetDepth function in the SDL_SYS_SetVideoMode subprogram, but SDL
would never request another resolution. (I’ll admit I have’t tried this
code in the past month…)

Kyle

f u cn rd ths thn u cn gt gd jb prgrmmng cmptrs---------
The opinions expressed do not reflect those of my
employer. Mostly because I’m unemployed.
------E4D8 9DE7 C3DC 424A 20F9 79CF 7414 2E99 2E54 6B5C

GetOSEvent is much safer than GetKeys. So many games misuse GetKeys, so
that on international keyboards the game tells you to use one key, but you
actually use a different one which would be in the same place if you had a
US keyboard.
That shouldn’t be such a problem, since in games your not worried about the
keys, instead their geography. The only problem comes in when you
conflicting representations of that key…
Meaning, people will say, hit the ‘Q’ key to key, but in some country they
don’t use the letter Q.
The problem I’m think you refer to, is when people use key codes, but
forget about the character (ASCII) codes. But SDL parses the event message
return looking for the key codes, which are the same numbers returned by
GetKeys.
The difference between the two is that GetKeys returns all the key codes at
the same time (in an array of 128-bits), where as the event message passes
them back one at a time using an unsigned byte. I’ve had problems in the
past where the structure doesn’t report back a keyUp signal, thus leaving
the impression that the user is holding down the key (and causing my space
ship to fly in circles). That in my main reson for suggesting the GeyKeys
alternative (screw speed problems, just go get a G4, I know I need an exuse
to get one).

Has anyone created a CodeWarrior project for MacSDL ? I
I’ve set up a MacSDL page. You can find it at
http://www.geocities.com/SiliconValley/Park/3201/sdl_mac.html. I’m
having some strange problems with my library build file, so I haevn’t
posted it. But I’ve posted some basic instructions on how to make a
project file.
I threw this page togeather in less then half an hour. I’ll go back and
revise it with in the next few days.

Kyle

f u cn rd ths thn u cn gt gd jb prgrmmng cmptrs---------
The opinions expressed do not reflect those of my
employer. Mostly because I’m unemployed.
------E4D8 9DE7 C3DC 424A 20F9 79CF 7414 2E99 2E54 6B5C

That shouldn’t be such a problem, since in games your not worried about the
keys, instead their geography. The only problem comes in when you
conflicting representations of that key…

Meaning, people will say, hit the ‘Q’ key to key, but in some country they
don’t use the letter Q.

Yeah, or you go into the key customisation dialog, hit “y” in a particular
box, and “z” appears on screen (happens in Myth if you have a German
keyboard).

As long as you can use the full Mac toolbox, this is easy to get round (but
Bungie have been aware of this problem since at least Marathon Infinity,
and didn’t bother to fix it).

The problem I’m think you refer to, is when people use key codes, but
forget about the character (ASCII) codes. But SDL parses the event message
return looking for the key codes, which are the same numbers returned by
GetKeys.

I’ll look at how SDL does events. I haven’t checked the API for far too long.

The difference between the two is that GetKeys returns all the key codes at
the same time (in an array of 128-bits), where as the event message passes
them back one at a time using an unsigned byte. I’ve had problems in the
past where the structure doesn’t report back a keyUp signal, thus leaving
the impression that the user is holding down the key (and causing my space
ship to fly in circles). That in my main reson for suggesting the GeyKeys
alternative (screw speed problems, just go get a G4, I know I need an exuse
to get one).

Has anyone created a CodeWarrior project for MacSDL ? I
I’ve set up a MacSDL page. You can find it at
http://www.geocities.com/SiliconValley/Park/3201/sdl_mac.html. I’m
having some strange problems with my library build file, so I haevn’t
posted it. But I’ve posted some basic instructions on how to make a
project file.

Thanks,

Mark

Hi,

I asked before, and didn’t get an answer. Is there a list of what works and
what still needs to be done (on Mac) ? I wouldn’t mind doing a bit of
hacking, if I actually knew what needs fixing.

Mark