Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
Sign in to follow this  
Blastfrog

Problems with OpenAL and GZDoom

Recommended Posts

I've got some crappy jump/jetpack code I wrote for my project in Eternity, but as I'm moving over to GZDoom I've run into problems.

In its current state, the intended flow is all screwed up, can't control my jump height and the jetpack seems to only work when it wants to. It worked fine in Eternity, though.

I'm too exhausted from doing stuff today and don't have the energy to debug it myself, can any of you check out the code and see what I'm doing wrong?

Search for "jumpStage" to see where my changes are.

Here's the GZDoom version: http://pastebin.com/LdHw2rTh
Here's the original for comparison: http://pastebin.com/mxCd2Hyi

Share this post


Link to post

I've managed to work out most of the kinks myself, but I've got a problem with the comparison operators. I want to check when the player is not holding the jump key, but it keeps screwing up when other keys are held down.

Which operator should I use? Currently I'm using != which worked fine in the Eternity version of my code, but here it only works as long as the jump key is the only key I touch.

Share this post


Link to post

Do you mean this statement?

cmd->actions != AC_JUMP
If "cmd->actions" is a variable holding a flag list, and "AC_JUMP" is a flag identifier, try to replace the above statement with this one:
!(cmd->actions & AC_JUMP)

Share this post


Link to post

Thanks, it works fine now! :)

Is there a low gravity flag I can set on the player? I see a few references to one, but I'd rather not use the deprecated one. There's A_LowGravity, how can I set that inside the source and not in DECORATE?

Share this post


Link to post

In ZDoom, gravity is a property. You'll want to change the player mobj's gravity setting instead of setting or unsetting a flag.

Share this post


Link to post
Sodaholic said:

Trying to build GZDoom-GPL with OpenAL enabled gets me this:
http://pastebin.com/N5H292cn

I wonder what I'm doing wrong.




The import library that comes with OpenAL Soft is broken and unusable on modern Microsoft compilers. The /SAFESEH error is just one manifestation, but this import library also generates somewhat inefficient code due to its brokenness.

Get the official OpenAL SDK which contains a proper one.

Share this post


Link to post

Strangely, it fails and falls back to nosound mode. I am using the official OpenAL SDK. It compiles without error, just doesn't work in practice.

Share this post


Link to post

Yeah, I was wondering what the whole no sound thing was about. I assumed it was just there were no sounds included to save space.

And I've had some nasty issues myself in trying to compile a GZDoom with OpenAL. I've done it in the past with just plain GZ+FMOD but toying with GLOOME has only led to an executable that commits seppuku. The sad thing is, I didn't even plan on editing anything on the code side of things, I just wanted to change the stupid icon for a derpy thrown together Solek game and now I wonder why I bothered in the first place since no would really even care.

Share this post


Link to post
Graf Zahl said:

What's the precise message you get?

"Sound init failed. Using nosound." when I try the restart sound option. I don't see anything upon starting up the game.

Share this post


Link to post
Gez said:

http://stackoverflow.com/questions/14710577/error-lnk2026-module-unsafe-for-safeseh-image
http://stackoverflow.com/questions/10599940/module-unsafe-for-safeseh-image-c
https://msdn.microsoft.com/en-us/library/100ezk17.aspx

The ZDoom codebase doesn't make much use of exceptions anyway (haven't seen much try/catch constructions in it) so I don't see a reason to build with /SAFESEH.

Actually the purpose of SAFESEH is nothing to do with C++ exception handling but to do with preventing injection of SEH handlers into your application by malware. It's best practice to have it enabled, but when linking, all static libraries must have been compiled with it enabled for it to work. We recently ran into this same issue while test-migrating Turok to VC2015.

Is Creative ever going to upload their OpenAL library again? It has a date of 2009 on it. That's fucking ancient.

Share this post


Link to post
Sodaholic said:

"Sound init failed. Using nosound." when I try the restart sound option. I don't see anything upon starting up the game.




Have you installed OpenAL? Or do you have OALĂ–-Soft in your game directory?

Share this post


Link to post
Graf Zahl said:

Have you installed OpenAL?

I didn't know that was a requirement, I thought it would've worked fine as-is.

After installing, it partially works, but not fully. It will only play Doom format sounds. No WAVs, no OGGs, etc.

Share this post


Link to post

For that you need libsndfile.dll and libmpg123.dll. You can find those in any devbuild package of GZDoom. OpenAL does not have any decoding facilities.

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  
×