Chartific

charts library for GameMaker, by manta ray

Current version: 2024.2 alpha 2

*** Added more examples, but many more are in the way ***

Intro

Have you ever had the need to draw charts and graphs in your games? No? I didn't think so, but anyway, this is a small library that allows you to render charts and graphs of various styles in your GameMaker projects.

No, really, why?

I am supposedly working on a tycoon/management game, and the latest excuse for me to actually *not* work on it, is I needed a way to render charts in the game, to showcase different statistics. Having said that, there are various other real use cases: use it for your sports games, idle games, tools, consoles, or any project where you need to showcase a little chart here or there!

Features

Chart types

Chartific supports the following chart types:

  • Scatter plots, with or without lines
  • Bar charts, either clustered or stacked, horizontal or vertical
  • Line charts, horizontal or vertical
    • Combine bar and line series on the same chart
  • Pie charts
  • Histograms
Data

Data can come from arrays within your project (static or otherwise!) or from delimited flat files you can import.

Customization

You can customize how nearly everything looks! Check the documentation for the full API.

Chartific also integrates a config file (Chartific_Configuration) you can edit, so you can have a consistent base look for all your charts in your project.

Other Features

Some other miscellaneous features are:

  • Fluent interface with getters/setters
  • Tooltips on mouseover for your chart elements
  • Switch between "real-time" (rendered each frame) or "static", which renders to a surface and draws the surface.
  • Save a chart to PNG
  • Export a series to a flat file
  • Static method to calculate a host of different statistics around your series/arrays
  • Static method to compute a function over a grid of points (for plotting purposes)
  • Free, MIT license
    • Use at your own risk :)

Quick Start

  1. Import the Chartific YYMPS file into your project.
  2. Create a new chart, like so:
  3. self.chart = new Chart(20, 20, 500, 400);

  4. Add a series to the chart (by default, a scatterplot series):
  5. var _series = new Series("My first series", [1,4,5], [3,5,9]);
    self.chart.add_series(_series);

  6. Plot your chart:
  7. // Draw GUI event
    self.chart.plot();
  8. Set your properties using the setters/getters.
  9. Make sure you delete your chart on cleanup:
  10. // Cleanup event
    self.chart.destroy();

Documentation and Repo

The full API documentation can be found here.

The source code can be checked after importing the package file (Chartific_Internal script).

Updated 10 days ago
StatusIn development
CategoryTool
PlatformsHTML5
Authormanta ray
Made withGameMaker

Download

Download
Chartific 2024.2.alpha.2.yymps 5 MB