Jump to content
  • Advertisement
  • entries
    707
  • comments
    1173
  • views
    435849

3D audio and logging goodness

Sign in to follow this  
Programmer16

209 views


Ethereal Darkness Interactive Update

I started coding the engine specific a little while ago (about a half an hour.) Its not as tough as I thought it was going to be. Not much of an update for this at the moment.



Dragonfire Games Update

I spent an extensive amout of time on the logging system for DFT. Before I used:
LogDebugOutput(Text, Type, ...)
.
I was restricted to one filename, one file, and one style sheet.

Here is an example from the new system:
dftClientLog.html
dftSeverLog.html

It uses this css:
style.css

And here is the source for the example:
main.cpp

Its pretty simple, you create as many logs as you want, and then before any code you specify which log you want to use:
dft::HtmlLog::SetCurrentLog(&Log);


For example:

dft::HtmlLog ClientLog;
dft::HtmlLog ServerLog;

ClientLog.Create("dftClientLog.html", "Dragonfire Games - Client Debug Log", "style.css");
ServerLog.Create("dftServerLog.html", "Dragonfire Games - Server Debug Log", "style.css");

dft::HtmlLog TextureLog;
TextureLog.Create("dftTextureLog.html", "Dragonfire Games - Texture Debug Log", "style.css\nResourceStyles.css");

dft::HtmlLog::SetCurrentLog(&ClientLog);
dft::HtmlLog::GetCurrentLog()->LogDebugOutput("This is some client output.", dft::DOT_TEXT);

dft::HtmlLog::SetCurrentLog(&TextureLog);
dft::Texture* pTexture = TexManager.AddResource("GuiSkin", "GuiSkin\\FlamingSkin.png");
//assign pTexture somewhere.
pTexture = TexManager.AddResource("Player", "Characters\\Asrion.png");
//assign pTexture somewhere.

dft::HtmlLog::SetCurrentLog(&ServerLog);
dft::HtmlLog::GetCurrentLog()->LogDebugOutput("This is some server output.", dft::DOT_TEXT);








Quote:

Note that \n in the last argument of Create() separates different style sheets.

Also note the you poor I.E. users will not get to see the exciting blinking '!' before and after the error text.


Yes, this causes more typing for me, but it really makes the system better, and I can use it in the future without modifying the code.

Yes, this also has unneeded customization, but I feel that if you can modify the style that the debug log appears in, it'll make it easier for you to read, and thus will make it easier for you to spot stuff.



Discussion





Other news



Sign in to follow this  


2 Comments


Recommended Comments

That's very cool. I can't believe I never thought of using HTML log output to increase readability/cool-factor in my own projects. I'm definitely going to have to 'borrow' this idea. [grin]

Share this comment


Link to comment
Its really easy too. If you want, I can let you use my code. It's fairly extensible, so you could separate client/server messages into different files or different output types.

Just let me know and I'll send you the code.

Share this comment


Link to comment

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
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!