Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / Debug/Message Console for DBP

Author
Message
MonoCoder
18
Years of Service
User Offline
Joined: 4th Dec 2005
Location: england
Posted: 23rd Feb 2007 00:49 Edited at: 23rd Feb 2007 21:04
Somewhat inspired by DB User 2006+'s Console DLL, I've created a series of functions that create a similar kind of console, only inside the DBP program.



The Functions:


The Functions' Code:


Note - console_types is not a function because types don't work in functions.

The console can save the files to a log by providing a filename, a file number, and a saveflag of 1 when calling console_initiate. You can create filenames for the logs like so:



The following is a very simple example of how to use the console. Each change in the frame rate is recorded on the control panel. What you type appears in the bottom right corner, and is logged when you press enter. Each logged item is saved in a log file (ie. "log001.txt").


Update: Here's a second example. Try pressing shift, control, enter and space to add messages. Also click the text buttons for messages.




This code runs on DBP 6.4.

Enjoy.


Uber Tails fan. monocoder.spaces.live.com http://MonoCoder.bebo.com
Aaron Miller
18
Years of Service
User Offline
Joined: 25th Feb 2006
Playing: osu!
Posted: 24th Feb 2007 07:23
Very cool.

If you want, also, I can make that into a DLL, and you can call it your own. (I wont take credit for it, its your functions, and I will send it, and the source code, directly to you).


Cheers,

-db


Enter my forums here.
Mr Kohlenstoff
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Germany
Posted: 24th Feb 2007 12:16
Yes, looks interesting, but it doesn't work if BLUE GUI is installed, I think, because the function "Console_write" includes a variable called "message", what's a command.

I've just changed the name to "_message"..



Good work!

Visit the DBPro - Speed up your game-Thread. http://forum.thegamecreators.com/?m=forum_view&t=88661&b=1

Login to post a reply

Server time is: 2024-11-23 00:33:17
Your offset time is: 2024-11-23 00:33:17