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?
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.
Really for games on the Mac, InputSprocket is the way to go, but since you
define a small number of actions, this might not be compatible with other
platforms. I guess a cross-platform input API which uses InputSprocket on
the Mac and whatever is relevant on other platforms is the ideal.
I keep grabbing SDL, and when I get time, I want to start using it to port
Monkey Shines to linux/BeOS, but most of my work is spent writing Gorilla
Warfare. Maybe this weekend I will get some free time, and familiarise
myself with the API. Then I can see how easy it would be to use SDL with
InputSprocket. I think this would be the best way, but I don’t know if any
event functions are related to other stuff so intimately that this would
not be possible.
I’ve only ever programmed on the Mac, so I don’t know how much of a problem
cooperative multitasking really is, but is it not possible to do stuff
which has to happen outside of your main loop in a TimeManager task ?
I would love MacSDL to be ready, so I could develop for multiple platforms
simultaneously. Unfortunately I can’t see me having time to actually write
code, but please keep posting, and if there is anything specific/Mac
debugging I can help with, I’ll do my best.
Has anyone created a CodeWarrior project for MacSDL ? Is there a list of
what works and what doesn’t ? One thing which puts me off is that the only
way I can see to work out what is broken is to run the demos and then try
to work out what is going wrong.
I’ll try to take a look though.
Mark