Dagon++ Command Questions


Hello everyone, I hope you are doing well. It’s been a while.

I wanted to create this topic to ask about the commands that I need more info about from time to time and keep the information tidy. Also I want to add the scripting changes to Dagon Wiki too, when I have the time. Bear in mind that I’m talking about Dagon++ (the older one), not Dagonity.

I assume, most of the questions can only be answered by Agustin, but I’m sure there are some others that can help too.

My first question is what does “adjustment” boolean in “lookAt” command do exactly?

Also, sometimes when I use “lookAt” function, camera uses the long way around to look at a spot instead of using the short way. For example instead of going 20 degrees to the left, it goes 340 degrees to the right. It’s not that common, but is there a reason for that I’m missing?



The camera movement was really bugged in Dagon++ and could use a full rewrite. I’m afraid that “extra turn” is a random issue that can’t be fixed quickly :-/

The “adjustment” parameter was a rather hacky solution to have the camera subtly zoom-in on a door before triggering its video. So it’s intended to be used on door animations and not really much else. Depending on the screen resolution, sometimes the door animation wouldn’t fill the entire screen space resulting in a broken image – the quick solution was to implement this workaround :slight_smile:


BTW hope the project is coming along nicely! I’m occasionally thinking about it and would love to hear more :smiley:


Ah, good to know. I might find a use for that adjustment.

My project is coming along nicely. It really did get slower at last stages, because I wanted to improve visuals to a higher standard, but I believe it paid off. I think now the game looks a lot better than before. It’s close to beta, so I’m pretty excited :dancing:


This is not exactly a command question, but Agustin, how exactly did you create your videos for Dagon++?

I have hundreds of PNG files and trying to convert them using png2teora, but it isn’t working as I hoped. What was your workflow for this? Converting to a lossless video format first then converting to theora, maybe? Which tools and settings?

Also is there a dimension constraint for video files like multiples of 2 or anything? Some video patches I create play broken and look in a grayish distorted way in game while video itself plays normal in a video player.


BTW, my latest tests revealed going from png to avi to ogm gives a lot better results.


We were using ffmpeg2theora which is the top (at least open source) recommended way of converting Theora videos. There are more practical solutions these days such as Adobe Media Converter, though.

Your workflow sounds solid enough but you might want to use the Huffyuv codec for your AVI container which is lossless. Ideally, your material shouldn’t be compressed in any way before being processed by ffmpeg2theora.

Also, yes, make sure your video patches are power (not multiples) of two to avoid any issues :slight_smile:


I was a little confused, but I got it now. Indeed using Huffyuv was the best way. Theora comes out pretty clean.



Another question. Is there anything I should be considering while creating OGG files? When I do I just convert them through Audacity. But a lot of the times short sounds, like the ones under a second has problems with audio buffering, I think. They play nice once in the engine, after that when replayed they sound different like they were cut or played from wrong point.

I couldn’t see the some problem with short sounds in Asylum teaser, so I wonder if I’m missing something when creating my files. I’m not very familiar with audio stuff, but I remember I needed to add cues to start and end of audio files when I was modding Source engine. Is there something similar here?


It is indeed an audio buffering issue with OpenAL (it’s very finicky, I never quite understood how it works). You can use anything you want to convert the files to OGG, and Audacity is a good choice. What we did with those short audios in Asylum is add one or two seconds of silence. Not the nicest approach but, as you can see, it works perfectly well :slight_smile: