[bedevtalk] need more help with getting Quake1 going better
Philippe Houdoin
philippe.houdoin at free.fr
Tue Mar 21 13:33:16 BRT 2006
Quoting fredrik <fredrik.moden at telia.com>:
> Hi I need some more help :-)
Let's see if I could provide some...
> The problem with socket and network in Zeta are still there but if I compile
> QuakeWorld client and server in BeOS with Net_server then it works (it did
> work before also).
You mean your "gethostaddr" problem?
Sadly, I didn't find time to try to reproduce it and find a generic code that
works on all beoish net stacks.
> The biggest problem now is that in GLQuake and QuakeWorld Client the engine
> has it own thread but to use OpenGL we need to use GLView and this one has
> it own thread right?
BGLView don't force its own thread for rendering!
In your case, I can't see why you could not do all the rendering opengl calls
from the engine thread. You just need to wrap them with:
your_bglview->LockGL();
world rendering thru opengl calls
your_bglview->UnlockGL();
> To use mouse and keyboard I must use the built-in function in Quake this is
> some what limited (if I havent missed anything) . For axample I was
> thinking of adding support for the wheel button so you can scroll through
> the different weapons but the only function that I can use (what I know) is
> GetMouse() but it can not give me information if the mouse wheel are used.
>
> What I was thinking of is if I can some how sync these threads fully and not
> only when I do some changes?
>
> If they are in sync I would be able to use function that is in the BWindow
> right? So that I can look for the B_WHEEL (dont remember the name)
>
> (I can use BWindow any way but the mouse and keyboard are lagging then)
>
>
>
> If there are other ways of doing this let me know :-)
Another solution is to refer, from main Quake engine "loop", to global variables
like "mouse_x", "mouse_y", "mouse_buttons", "wheel_delta" for example and use
your BWindow looper to keep up-to-date these globals. Obviously, they'll need
to be thread-safe protected thru a benaphore (BLocker is your friend).
Maybe a game "frame" is atomic and any sync should be done on this basis. Dunno.
That way, the changes are limited on the quake engine side.
> (GLQuake are the original quake and QuakeWorld the other release IDSoftware
> did that have better networks control)
>
> So fare this have bean really fun :-)
And it should stay that way for an hobby!
> I have added e second crosshair( like the one in QW)
> Added FPS so one can se how fast/slow GLQuake is.
> Fixed the keyboard problem (QW client didnt have that so I took that)
>
> Added support (or so that it uses) width height bpp or just use mode for
> changing resolution (before it took the same resolution you hade on the
> screen) but now it supposed to change it back as well.
>
> I thought that I hade QWClient with OpenGL but I must have hade a lucky
> day.. Its not working anymore right now
>
Maybe it's time for you to use CVS or SVN. SourceForge, Berlios, your own...
Hey, we could even join us! Or, at least, dive a little bit into code to
understand better how we could help you.
- Philippe.
More information about the bedevtalk
mailing list