Thought of something novel, I think. Why not try to integrate the Google Charts API into your next game? In Shade I needed to create some charts to display feedback for how well the player did. In doing so I ended up writing some rudimentary charting logic. While what I needed was simple I can imagine that for many more complex games their needs are much greater. In such cases it may be worth leveraging this API in order to generate some spiffy charts!
The Google Charts API can be thought of as being a RESTful webservice. In this case what this means is you simply perform HTTP GET calls to retrieve charts. What’s especially nice is that while it can be a little complicated the API is relatively easy to get started with and offers a lot of room for customizing your graphs.
So what am I getting at here? Simple, when you want to display some complex data to your user chances are a graph is the way to go. The problem is that making complex graphs is a pretty involved task and where does all the time go? The solution is to have Java or your favorite language perform a simple GET request and fetch the pretty graph for you! I think this would be an especially smart solution for Flash games since the user is almost certainly connected to the internet anyway.
This naturally raises all sorts of questions. What will the performance be like? What happens if the user doesn’t have an internet connection? What are the licensing concerns? All very valid, good questions. Here are my thoughts in rapid fire:
- For slower connections you should cache whenever possible.
- Obviously to solve the problem of no connectivity you need to cache the latest graph.
- Go read the terms of use!
So cache, cache, cache! For a lot of games nowadays we already incur a RPC penalty when we take advantage of global high scores, so in that light I’m not sure that one or two more additional queries would represent a major burden on performance. I also believe that clever use of caching, threading, and other distractions could work around whatever performance issues arise.
This is definitely a new idea and I think it’s a little bit crazy. That said good graphs can be a really strong asset and a real pain to implement. Hopefully I’ll find an opportunity to play around with this idea further in code sometime soon. In the meantime, how do you present your data to the player?
Hello, my name is Alex Schearer. I grew up in New York and currently live in Seattle.
2 Comments
Strange idea :D But you can use charts as game elements? lol :D
Hahaha, no no you don’t use the graphs as game elements. You use them in between levels, say, to give feedback to the player.