|
Post by rob on May 16, 2013 8:41:55 GMT -5
Hey all! I have released the Grid12 data at grid12.com/grid12staticdata.sql . This contains most of Grid12's art, plus most stats about damage, speed, turn rate, drop rates, etc. Just feed the file to mysql and you'll have a nicely queryable database. Some things (eg, triggers, certain older forts like GCT) are hardcoded in the server. But many of the numbers behind Grid12 are in the file. Licensing details are in the file, but I can summarize by saying that this data can be used freely for noncommercial purposes as long as attribution is made to Jetbolt/Grid12. The idea behind this release is for people to dig into the data and find imbalances and build wikis, DPS calculators, drop-optimization plans, etc. My sincere hope is that someday someone will make a vehicle editor that we can use at Jetbolt. Have fun! Rob (with counseling from Amit)
|
|
|
Post by rob on May 16, 2013 8:42:15 GMT -5
|
|
|
Post by Ood on May 16, 2013 8:54:13 GMT -5
Hurray, wiki update can continue! I had been at a sort of roadblock.
That's a lot of numbers... lol
|
|
|
Post by amitp on May 16, 2013 9:27:20 GMT -5
My notes about drawing tanks, which might come in handy if someone is going to build a wiki from this data: - Look in the tankdef table. Find the shapelistid. Draw these shapes.
- Look in the tankdef_turretdef table to find turret ids associated with the tank. Then look in turretdef to find shapelistid. Draw these shapes, offset from the tank by x and y found in tankdef_turretdef.
- Look in the turretdef_gundef table to find gun ids associated with the turret(s). Then look in gundef to find shapelistid. Draw these shapes, offset from the turret by x and y found in turretdef_gundef.
To draw a shapelist, look in the shape table to find all shapes associated with the given shapelistid. Each shape will have points, which is a list of X 1,Y 1,X 2,Y 2,…,X n,Y n that forms a path. In addition, if symmetrical is set, then you need to join that path with X n,-Y n,X n-1,-Y n-1…,X 1,-Y 1. In addition, if open is not set, you need to join the path back with X 1,Y 1. The color is an int, but it's really an html color hex value, like 9900CC == 10027212. So you can recover the R,G,B components with color >> 16, (color >> 8) & 0xff, color & 0xff. When drawing the shapes, there's a priority, which I don't remember how to use. I drew each shape with a black polygon fill, then drew on top of it with a 2.5-pixel thick stroke line (no fill) with a blur filter, then drew on top of it with a 2.5-pixel thick stroke line (no fill) without a blur filter. It's not exactly the effect in Grid12 so this will need some fine tuning. Also, I used SVG filters which are implemented differently than Flash's filters. For the blur filter look at the source; I haven't found one I really like. I know, this is a lot and I figure some of us will produce working code soon that we can all share and learn from. Things that could be useful: code to convert mysql to json, or code to draw a shapelist, or code to calculate dps. Also while looking at gundef and turretdef there are some useful numbers for the wiki.
|
|
|
Post by gingerbear on May 16, 2013 13:56:56 GMT -5
I see the towers have a "faction" property. Does this mean you plan on bringing in multiple sides to the war? Or is it to allow players to build towers too? Or is it for that "color coded" concept you hinted at some builds ago (different base color for different effects)?
|
|
|
Post by tarbomb on May 16, 2013 22:25:53 GMT -5
Thanks very much, Rob!
Time to add some new features to Tarbot.
|
|
|
Post by amitp on May 17, 2013 19:03:39 GMT -5
If you don't want to run your own mysql server, I have a script to convert into sqlite3: www.redblobgames.com/x/jetbolt/viewer/import_sql.pyCSV and JSON are other good choices but given how linked all the data is, sqlite3 was the obvious first step. With CSV, I'm guessing we would just export each table to a separate CSV file, but then you have to write all the join code (eww) every time you read the data. With JSON, I'm guessing we'd perform all the joins in the conversion step. I'm guessing they're obvious but if any shapes or other records are shared we'll just duplicate them.
|
|
|
Post by rob on May 17, 2013 19:42:47 GMT -5
Faction would correspond to color, if I'd implemented it. But I didn't yet, and may not.
|
|
|
Post by amitp on May 25, 2013 22:48:31 GMT -5
I now have all the player tanks drawn on www.redblobgames.com/x/jetbolt/viewer/ with shields. When you mouseover the shield it'll show you the corresponding entry in the table with shield stats. I haven't implemented anything to show weapon range. For ease of implementation I converted the relevant parts of the database to json format: www.redblobgames.com/x/jetbolt/viewer/grid12-static.jsRob, how should we interpret the priority fields? Also, I haven't quite figured out how to make the glow exactly match the game but that's a minor problem. And "f" is facing = angle in degrees multiplied by 10, right? So df and ddf are angular velocity and angular acceleration? How should we interpret clipsize, and cooldown vs reloadms?
|
|
|
Post by Ood on May 26, 2013 0:00:33 GMT -5
Cool Amit. Your shield descriptions are a bit... weird. Most shields regen in 5-10 seconds (500-1000 in the table) And angles seem to be in 'deci' form 180 degrees not 1800.
The way I've interpreted clipsize is like a real gun. The only tank with this is the viking. It shoots 8 shots with cooldown (fire rate) of 400 (0.4seconds/shot ) then has a reload (in milliseconds) of 2000 (2 s), where it reloads its clip and doesn't fire. To figure DPS on the viking, I took the total time it takes to for 8 shots and reload (8*400+2000=5200) And then treated it as normal (8 shots / 5.2 s * damage per shot). All other tanks have clip 1, reload 0, meaning they just shoot the same rate all the time (easy). I get the viking to have 68.82 base dps (all 3 guns added), not the 93.34 that you get (when added).
The others, I have no idea.
|
|
|
Post by rob on May 26, 2013 16:21:27 GMT -5
Priority for shapes is z ordering and tells the order in which to draw the shapes in a shapelist. Shapes are never shared between shapelists.
For shields, draw them in inverse priority order, increasing the radius when a shield would collide with another shield. Phantom is a good example which I believe you have drawn correctly.
For tankdef_turredefs, install the turrets in priority order. Sometimes they overlap, and priority tells you which one is drawn on top. Viking has a good example; the main turret goes on top.
Ood is correct on clipsize. Angle units are indeed decipixels. f is facing, df is max turn rate, and ddf is max angular acceleration.
|
|
|
Post by rob on May 27, 2013 6:29:48 GMT -5
#define DROP_GRIDSHARDS 1 #define DROP_LOWPRISM 2 #define DROP_MEDPRISM 3 #define DROP_HIGHPRISM 4 #define DROP_CRYSTALSPLINTER 5 #define DROP_PROTOMODULE 6 #define DROP_STORAGESPACE 7 #define DROP_TANKUNLOCK 8 #define DROP_COINS 9 #define DROP_AUGMENT 10
Low prisms are level 1-3, mediums are 4-6, high are 7-8.
In the lootdrop table, quantity means quantity for gridshards, prisms, splinters and coins. However, for items (protomods, storage, tanks, augments), quantity is the base level of the item, and quantity is always 1. 50% of item drops are at the base level; 25% are at base level+1; 12.5% are at base level +2, etc. A max of 10 extra levels can be added.
|
|
|
Post by amitp on May 29, 2013 17:35:33 GMT -5
All the tankdefs are drawn on: www.redblobgames.com/x/jetbolt/viewer/Tools that others may find useful: - grid12-static.db3 is the MySQL data converted into SQLite3. The main advantage of SQLite is that you don't need to install and run a server; it's just a file, access with libraries that are available for lots of libraries.
- import_sql.py is a program to read the mysqldump file into sqlite format
- export_json.py reads from the sqlite database and exports some tankdef json
- grid12-static.js is the json; note that it only has tank-related stuff and not the entire db
- index.js has the javascript to read the json and convert it into svg format for viewing
The code is under the Apache v2 open source license; I suppose I should mark the data files as creative commons with the same license Rob uses but I haven't done this yet.
|
|
|
Post by amitp on Aug 26, 2013 11:53:31 GMT -5
BTW I just discovered that Guild Wars 2 has been adding an API over the last few months: wiki.guildwars2.com/wiki/API:Main — it's a different style of game but it might be interesting to see what players have done there. Their API returns relatively static things like all the guilds, items, dyes, recipes, maps, but also dynamic things like all the current events and battles. For example, visit this page to see a list of the current events. There's a list of things people have built with the APIs.
|
|
|
Post by rob on Aug 27, 2013 11:29:23 GMT -5
This is cool!
One way that we could get started doing this is to dump a sql file containing the dynamic data (minus passwords, emails, etc) once a week. It won't be up to date, but it could perhaps be useful...
|
|