Basic Graphing

Get help using Construct 2

Post » Mon Jan 06, 2014 10:55 pm

I'm new to Construct 2, but have done quite a bit of programming with VBA.     I've figured out a lot things by searching the forums and from the manual itself, but I can't seem to find much (anything) on how to plot data in a basic line graph. I've searched for "Graphing", and may need to search for something else. Sorry if I've missed a previous post on this.

I'm working on a Stock Market type simulation game, and would appreciate it if someone could point me in the right direction. I've considered making some custom graphics that I could piece together in a tile set type format, but that seems quite drastic. There must be an easier way.
B
17
S
5
Posts: 9
Reputation: 1,222

Post » Tue Jan 07, 2014 4:12 am

it is possible to create a line graph (or any curved line, really) by creating a ton of 1x1 sprites that are automatically stretched and angled correctly with a loop

But I think it'll be be wiser if you download the 'canvas' plugin from here

http://www.scirra.com/forum/plugin-canvas_topic46006.html

it lets you draw stuff onto an areakeepee2014-01-07 04:20:50
B
28
S
8
G
1
Posts: 469
Reputation: 4,683

Post » Tue Jan 07, 2014 9:52 am

I read your post earlier because I'm currently working on a pie chart idea in my head for a game. (by rotating half circles)

Then I just happened across a game example in the arcade with a sample capx for bar charts:
http://www.scirra.com/arcade/example/10017/automatic-bar-graph-system

Which links to his Line graph example:
http://www.scirra.com/arcade/example/11248/automatic-line-graph-system

hmm, looking again, his line chart might need some tweaking, it connects the line to the base line between values.Paradox2014-01-07 09:57:15
B
226
S
60
G
33
Posts: 902
Reputation: 39,989

Post » Tue Jan 07, 2014 1:48 pm

Thanks to both of you! I'll have to play around with the plugin to see exactly what it does, and the code from bar-graph-system looks very promising for what I had in mind.

I knew there had to be a better way than with custom sprites!
B
17
S
5
Posts: 9
Reputation: 1,222


Return to How do I....?

Who is online

Users browsing this forum: Sparkz and 1 guest