Rog's world online
Tue
17
Nov '09

What I’m up to on Gameslate

Rog posted in Cult of Me, Gameslate

My reboot / remix of Gameslate was going well until I realized a fallacy (several actually) in the inherent tab-based design, so I plan to reboot again.

I’d rather not leave Gameslate so long in a non-playable state, but the redesign is a bit of a catharsis process for me. It’s not that it’s hugely difficult to recreate, it’s just something where I have to be in the right frame of mind to recapture the original Gates Motel magic. It’ll get there sooner or later and I appreciate the patience of the fanbase that’s still tagging along (especially those who’ve contributed in one form or another).

The recent reboot attempt was entirely new code and a lot of that I’ll leverage into my next design attempt. Once I settle on what works, it shouldn’t take too long to implement.

So the answer to the curious lurkers that I know are reading this: I’ll get it done sooner or later, I’m working on it in spurts. When it’s ready it will probably suddenly appear, just like this reboot did, only hopefully in a more complete state.

Wed
16
Sep '09

More changes coming to Champions

Rog posted in Champions Online

Bill Roper has the latest State of the Game up and it’s a good read. The more notable parts:

  • Skip the Tutorial – Cryptic is implementing a way to allow players to skip the tutorial after they’ve been through it once. Hopefully they allow skipping of the Crisis zones as well.
  • Powerhouse Target Dummies that fight back – This is what they really need IMHO to fully test new powers.
  • Team Questing – They’re changing the group UI so everyone on the team can see the objectives of the current quest, plus all team members will get rewards / exp. Sounds a lot like the way City of Heroes worked for groups and exactly what Champions needs for better group play while leveling.
  • More Content for Monster Island – The description for the new content sounds a lot like instances that WoW players are accustomed to: Dungeon-like places that players will return to.

Most of the changes sound like they’ll be coming in the next few weeks. Things are moving quickly in Champions.

Two things I note that are missing from the State of the Game but have been mentioned by CMs and devs on the forums and again in the recent dev chat:

  • More zones will come later – A Space / Moon zone has been mentioned now and then, but it was also stated that they’ll be first adding more City-based content (by popular demand).
  • Aggro / Threat needs work – Cryptic doesn’t want another “holy trinity” tank-and-spank clone, but they’ve also acknowledged that their threat model is somewhat broken, or at least hasn’t worked out how they’d planned. As it is right now, mobs seem to love healers far too much. I know for me, it’s odd when a mob will run off to chase my healing drones that are stuck two rooms away (my drones are infatuated with healing each other and prefer to lag behind so they can do so privately).

    Obviously the easy fix would be to fall back on tank-and-spank + scripted encounters ala WoW, but I for one am really hoping Cryptic comes up with a more inventive solution to the threat problem.

Fri
31
Jul '09

Double-left-join three-table select query

Rog posted in Gameslate

Warning, SQL geekness ahead.

One of my complaints with a lot of pre-made web software (Wordpress, Drupal, etc.) is that the database overhead is high.

The argument usually goes that scaling makes it a non-issue, but that’s just a fancy cop-out saying “get faster server infrastructure and more RAM” to dismiss any performance issues. I hate it when software dictates higher costs though, it’s supposed to solve problems, not create them. In a large working environment, ease-of-use is cheaper, but in more humble projects like mine, efficiency of code is cost-saving. That’s the threshold between using a pre-made framework / CMS versus DIY.

*ahem* Anyway, getting back on track before I go into a full-on rant:

SQL statements are typically made as small queries like:

select user_id from user_tbl where user_id = $check_id;
select user_name from user_tbl where user_id = $verified_id;

Anyone remotely aware of SQL would put those into one query:

select user_id, user_name from user_tbl where user_id = $check_id;

This isn't meant to be a tutorial tho. Here's a more complex example that illustrates what I work with while creating Gameslate (breaks added for readability):
select item_source_tbl.item_id, item_name
from
(item_source_tbl left join item_earned_tbl on item_source_tbl.item_id = item_earned_tbl.item_id)
left join item_own_tbl on item_source_tbl.item_id = item_own_tbl.item_id
where
(item_points = 0 and item_cost = 0)
or
((act_points >= item_points and item_earned_tbl.user_id = 1) and item_cost = 0)
or
((act_points >= item_points and item_earned_tbl.user_id = 1) and item_own_tbl.user_id = 1);

Crazy eh? Let me break it down a little. There are three tables involved:

  • item_source_tbl stores all the possible items that could be earned and bought.
  • item_earned_tbl stores info about earning items. Items have a count (in points) towards earning which users accumulate into this table.
  • item_owned_tbl simple table storing who owns (purchased) which items.

What the query above does is "select the name and id of all items that are earned (or required no earning) and are paid for (or free)". It could be made easier with different tables, but these tables store a bunch of other info as well for other tasks. It could also be more complex if I added sanity checks, but I'm the only one on my server with database access so I stopgate that at user input (web code).

MySQL is beautifully fast with these kind of queries, but I usually don't see this sort of thing in most code for frameworks, especially not in object-oriented code (which tends to break things down into pieces). Granted, it's hard to read, but it's efficient and plays into the strengths of the SQL server. I sometimes wonder why so many projects use SQL at all when they're going to separate into simpler queries, but I guess the answer is more about convenience than performance.

It's all great until next year I look at the code and wonder WTF it does again, even with comments. =)

It's hard to keep track of this stuff during a heatwave melting my brain.

Tags: · · ·