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.

Newcomers DBPro Corner / console output...

Author
Message
fumade
15
Years of Service
User Offline
Joined: 28th Oct 2008
Location:
Posted: 5th Feb 2009 10:53
I not sure whether i am in the correct position or not..But i am here would like to know is that any way to debug the console output to show the time taken for the entities moving from one point to another,the speed and other related data. the debugged output can be in text file or any readable file type.

Hopefully you all can understand my language...

Thanks..
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 5th Feb 2009 14:32
You can always write your traces to a file with the standard DBPro I/O, but they are a little slow.

But I have some alternatives in my plug-in set.

The first is to use an actual console window, but that has the problem of limited history - the help files for that are at http://www.matrix1.demon.co.uk/Matrix1Utils_Help/Matrix1Util_11_index.html

The second is to use the plug-in I wrote specifically for tracing, which can write formatted output to a file, or it can output to a debugger viewer too (such as http://technet.microsoft.com/en-us/sysinternals/bb896647.aspx) - the help files for that are at http://www.matrix1.demon.co.uk/Matrix1Utils_Help/Matrix1Util_10_index.html

fumade
15
Years of Service
User Offline
Joined: 28th Oct 2008
Location:
Posted: 6th Feb 2009 03:53
u meant have to install another plug-in into my dbpro??is that have to purchase?I tried to download the debugview but failed.

how about the Matrix1 Utility Plug-ins??how much it will cost?

If i want to write it on myself, but how?I am using dbpro and dark ai..

Thanks...
Not_Maindric
17
Years of Service
User Offline
Joined: 10th Jul 2007
Location: Omaha, NE
Posted: 6th Feb 2009 04:32
They are free. The link is in Ian's signature.

BatVink
Moderator
21
Years of Service
User Offline
Joined: 4th Apr 2003
Location: Gods own County, UK
Posted: 6th Feb 2009 13:03
Ian's console is perfect for monitoring your program, especially if you have 2 screens.

If you want to do some deeper analysis, I would suggest outputting to a csv format, and using Excel to plot the data. You can add a final column for comments, to help you trace what happened when.

IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 6th Feb 2009 14:16
All free, always will be. And they're updated regularly too.

fumade
15
Years of Service
User Offline
Joined: 28th Oct 2008
Location:
Posted: 6th Feb 2009 20:23
May I know how should i start it? Any short briefing?is that can just add this command onto the command that i do now??Sorry for asking so many newbie and lazy question..i am now really stuck on what i am trying to do now.too many problem to solve.

Hope anyone can helps me..

Thanks for all of your kindly helps...
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 6th Feb 2009 21:29
We'll start with the console commands, as they are very simple (look in that link I've provided).

You open a console, print to it, close it. That's about it for the basics.

However, here's how I'd use it, assuming your application runs in a window and not one of the fullscreen variants:


I've noticed that the help file for the SET CONSOLE ON TOP command is incorrect - I'll fix that for the next release.

fumade
15
Years of Service
User Offline
Joined: 28th Oct 2008
Location:
Posted: 7th Feb 2009 05:19 Edited at: 7th Feb 2009 05:21
u gave me a lot of helps there..but i still don't know where should i start to create my database.i have no idea to do it.

- how to input the data for all my entities into a csv file based on my current command. eg: the starting point, the ending point, entities number, size of entities...

- how should i input the time take for the entities from one point to another.

- how to insert some other data, such as the number of avoidance for each of the entities.

Sorry to keep on disturb u..and thanks for your helps..
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 7th Feb 2009 14:09 Edited at: 7th Feb 2009 14:12
Well, these are all different topics really, but ...

Quote: "how to input the data for all my entities into a csv file"

CSV is quite easy to handle with my plug-ins - in fact there's a command I built especially to accept Excel format CSV lines of data and to split it. It works for OpenOffice calc CSV files too as they use the same standard.

The following code just reads in a csv file with a header line and displays it to the screen and can be used with the attached CSV file as an example:


That's one way. I also have commands that allow you to load INI files into memory and to search them that you could use in a similar way - that's not as good in some ways, because at least with a spreadsheet you have the ability to use formulas and do mass tinkering with your data.

Quote: "how should i input the time take for the entities from one point to another
how to insert some other data, such as the number of avoidance for each of the entities."

Don't implement anything that requires you to store something against your entity/object/whatever (such as start times), unless you are going to also use that data in your game. Instead, use a file and record the start and end times against the object id either in text format (maybe CSV) or a custom binary format and write another program that will pull all of the data together (such as calculating total times from start and end times) - maybe export that into one or more csv format files that you can then load into a spreadsheet to analyse.

If you include a record type field in your output, then you can use the same logging file for lots of things such as avoidance.

Attachments

Login to view attachments
fumade
15
Years of Service
User Offline
Joined: 28th Oct 2008
Location:
Posted: 7th Feb 2009 19:10
this command is used to calculate and analysis the characteristic of the entities. i just started and i'm facing some problems.

-WRITE DATAFILE INTEGER, how should i write?
-how i am going to update the a info without to delete or affect others or duplicate them?



But it jam at the WRITE DATAFILE INTEGER..how should i write? as i used
Quote: "
WRITELN LOG "%d,%d,%d,%d",I,CATEGORIES(I),STARTPOINT(I),ENDPOINT(I)"
it worked.

i only will know the start time, end time and time taken when the command go into loop function, but if i put the WRITE DATAFILE INTEGER in that loop function, it might keep on duplicate the info. so i dunno how and where to WRITE FILE or UPDATE..

Thanks..
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 7th Feb 2009 19:57
The WRITE DATAFILE INTEGER will write one value in binary format to the file. If you want to write 4 values, you'll need to use the command 4 times.

However, from your code, I see that you are writing a CSV file - to do that, you'll need to build up a string containing fields:


fumade
15
Years of Service
User Offline
Joined: 28th Oct 2008
Location:
Posted: 8th Feb 2009 05:39
Thanks..it worked.

In order to perfect my command, i still have some question to ask. However,i have got some "stupid" way to solve my problem, it may not that perfect and nice but it still acceptable.

Thanks for all your kindly helps..
fumade
15
Years of Service
User Offline
Joined: 28th Oct 2008
Location:
Posted: 8th Feb 2009 18:54
Sorry to bother u again. since u creating the plug-in for the console output, is that possible to create different windows for different camera settings??What i meant is i want to set the camera in different point of view, but i worry the space is not enough for that, in order to do so, i'd like to set different windows for different camera view and also my console output.

Thanks...

Best Regards..
IanM
Retired Moderator
22
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 8th Feb 2009 19:50
I'm not sure that what you are asking for can be done - I'll keep it in mind though.

Login to post a reply

Server time is: 2024-09-28 02:33:04
Your offset time is: 2024-09-28 02:33:04