Jump to content

VariGraph (Debugging Graph)


Road Kill Kenny
 Share

Recommended Posts

Hi all,

 

I've been working on creating a a runtime, debugging graph generator for the physics in my game. However, the graph class that I have created is very flexible and can be used in any Leadwerks application and it is very easy to use. I plan on releasing it as soon as I'm finished with it and hopefully it will come in handy for debugging things like physics interactions etc. in your games.

 

Some of you saw my first video but I have improved it a lot since then. Take a look at the new video. Enjoy

>>>

<<<

STS - Scarlet Thread Studios

AKA: Engineer Ken

 

Fact: Game Development is hard... very bloody hard.. If you are not prepared to accept that.. Please give up now!

Link to comment
Share on other sites

- Currently it can only draw 1 graph, however, before I release it you will be able to make multiple in a single instance. (you don't need more than one instance)

-Yes you will be able to stack more than 1 line in the first release. I th

-In release version 1.0 you will only be able to have 1 big primary graph and 2-3 secondary graphs. However, in later versions you will be able to make as many as you want.

 

-In even later versions I plan to make them window-able so that you can drag them around expand them just like a window.... However, I can't spend so much time on that right now. I need to put some work into my actual game once I get VariGraph 1.0 outheheheh. XD

 

BTW Glad you like it :) thanks

 

Edit: Oh I almost forgot. This is how easy it is to make and instance and use it

 

//These are only called once
#include "VariGraph.h"
VariGraph Graph();   //Create an instance of VariGraph
Graph.CreateDebugGraph(Title, x-label, y-label, x-exageration, y-exageration); //Call this once for each graph you want to craete

//These 2 can be called every frame. The class itself will ensure that it is actually not updated every frame but rather 20times per second. It is important that a graph be created before these are called. Each additional graph will need a new update and draw call depending on its Graph Number... i.e. 1st graph Graph number=0, 2nd graph Graph number = 1 etc.
UpdateGraph(GraphNumber, YVariable, 0) ;//Updates a graph with the YVariable. This gets called every frame but only executes 20 times a second
DrawGraph(GraphNumber); //Draws the speciffied graph. Called every frame or your graph wont't draw

 

So yeh as you can see it is very easy to implement... And you should also do something like this.

 

#define DEBUG_BUILD //at the beggining of ur document.

 

and

 

#ifdef DEBUG BUILD

//calls go here

#endif

 

That way you can just comment out #define DEBUG_BUILD in your release and not worry about removing the graphs when it comes to the release version

STS - Scarlet Thread Studios

AKA: Engineer Ken

 

Fact: Game Development is hard... very bloody hard.. If you are not prepared to accept that.. Please give up now!

Link to comment
Share on other sites

This is more than great; very useful; elegant; clean.

It's like JFK announcing the moon mission. He had no expertise in space travel, and no way of knowing if it would work. He just announced "we're going to the moon" and then they made it happen because everyone was on the same page and working towards the same goal. If he had said "well, let's get some people in space, and we'll see how far out we can get, and if I find someone to make a rocket strong enough, we could possibly approach the moon's orbit and maybe land" it wouldn't have happened.
Link to comment
Share on other sites

This is more than great; very useful; elegant; clean.

 

Thanks ;)

 

Check this out guys. I've been trying to get semi-realistic acceleration of a car with gears in my game. Using my graph I was able to get a good acceleration curve going. It still needs a lot of tweaking but its starting to take the general shape that an acceleration curve should. XD anyway heres a screen dump of the graph. This is accelerating on the flat in a straight line to max speed and then letting go of the accelerator: (You should be able to see where the gear changes are its pretty obvious XD)

 

AccelerationCurveGears-1.png

 

PS..... Yes its a beetle that goes from 0-100 km/h in 6 secons :o.. as I said, my vehicle still needs tweeking

STS - Scarlet Thread Studios

AKA: Engineer Ken

 

Fact: Game Development is hard... very bloody hard.. If you are not prepared to accept that.. Please give up now!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...