I'm looking to produce some graphs within the game.
Now the game draws graphs after melee games accessible from the score screens. Simple two axis line graphs. Is it known how this is done?
I don't see anything around in dialogue, or in the editor itself that suggests any built-in way to do this.
If there is nothing, I guess it could be accomplished by creating it in the dialogue, is there anything to draw line sections that could be used? This is of course barring anything from the first question because it would require a pretty funky approach. Something like looking at each consecutive data points and drawing a line at a scale factor dependent on the graph size and amount of points.
You could create a grid using dialog items (images.) Your lowest resolution would be 1x1. You could assign each item to a variable within an array. Something like Grid[x][y]. Then it's all a matter of triggering to get a working grid. Simply change the image of the dialog items.
You could also try using dialog images that are 1-2 pixels wide, and rotate them to create lines. Some mathematics will be needed to calculate the positions at which the images will need to be centered though. This method however may not work well if you plan to have many many points on your graph.
The 3 things you will need to draw the line between 2 points:
Distance between 2 points = Width of dialog image
Angle from point N to N+1 = Angle of rotation of dialog image
Point offset at which the dialog item should be located = Center point of dialog image
3) This will actually depend on the anchor you are using. Since it's a graph, I would suggest Bottom left anchoring.
If this is the case, assuming images are rotated about the bottom left corner of the dialog image, you won't need to worry about offsetting your dialog items to a point in between point N and N+1
Hey, this thread is almost a month old but I think it's possible to draw graphs, and I'm going to give it a try.
The basic idea is to use an alpha-blended line image, and create multiple image dialog items with proper offsets and rotations for the lines to be connected. That should work out fine to trace a line graph, we'll see how that goes.
I'm looking to produce some graphs within the game.
Now the game draws graphs after melee games accessible from the score screens. Simple two axis line graphs. Is it known how this is done?
I don't see anything around in dialogue, or in the editor itself that suggests any built-in way to do this.
If there is nothing, I guess it could be accomplished by creating it in the dialogue, is there anything to draw line sections that could be used? This is of course barring anything from the first question because it would require a pretty funky approach. Something like looking at each consecutive data points and drawing a line at a scale factor dependent on the graph size and amount of points.
@megabuster33: Go
Well, I'm not entirely sure if this would work, but you might be able to use a portrait and connect actors in the portrait with beams...
You could create a grid using dialog items (images.) Your lowest resolution would be 1x1. You could assign each item to a variable within an array. Something like Grid[x][y]. Then it's all a matter of triggering to get a working grid. Simply change the image of the dialog items.
You could also try using dialog images that are 1-2 pixels wide, and rotate them to create lines. Some mathematics will be needed to calculate the positions at which the images will need to be centered though. This method however may not work well if you plan to have many many points on your graph.
The 3 things you will need to draw the line between 2 points:
3) This will actually depend on the anchor you are using. Since it's a graph, I would suggest Bottom left anchoring. If this is the case, assuming images are rotated about the bottom left corner of the dialog image, you won't need to worry about offsetting your dialog items to a point in between point N and N+1
All good ideas, unfortunately it seems there is no pathway to the method Blizzard uses whatsoever in this particular case.
Hey, this thread is almost a month old but I think it's possible to draw graphs, and I'm going to give it a try.
The basic idea is to use an alpha-blended line image, and create multiple image dialog items with proper offsets and rotations for the lines to be connected. That should work out fine to trace a line graph, we'll see how that goes.
@StragusMapster: Go
you can also just use dots and make a dotted line ...... or use make bar graphs .... both are possible.....
Well, making line graphs turned out rather simple.
It's still not perfect, lines don't connect quite perfectly but I'm not sure we can manage a lot better through dialog items...