Game Development Community

dev|Pro Game Development Curriculum

Innovation Friday - From the C's to the Web

by Scott Burns · 08/31/2012 (1:58 pm) · 5 comments

Well now, its been quite a while since I've done a blog so I figured I'd share a little bit about my Innovation Friday project. As more of us begin sharing our Innovation projects you may notice a common theme of working with something unfamiliar. I wouldn't say that it was necessarily planned to be that way, but the spirit of Innovation Fridays definitely lends itself well to that.

The Project

Some of the ideas I had felt a little too ambitious for the inaugural launch of Innovation Fridays and I wasn't quite ready to commit to them. Enter James Dickinson. James and I both share a love of pen and paper games and he had a great idea for a tool for GM's to make managing things at the table a bit easier. We would create a tool that a GM could import in data exported from existing character builder tools. The tool would do things like help sort the turn order after inputting dice rolls for initiative, track actions performed and spit a combat report. None of this replaces dice rolls mind you, just a visual way to help manage your mobs easier, displaying the turn order for your players if you want and reducing the amount shuffling about of index cards.

Oh, Cross Platform?

Recently I became very familiar with WPF for another project and when you've got a shiny new hammer everything looks like a nail. So when James said "...tool that imports xml into a database..." I said "Let's WPF this mother!" Only problem with that was I would have to throw out cross platform support, or spin up a second version that would work on Mac. Qt was briefly considered as a replacement, but the issues we've had with it internally steered me away from it. So we decided to hell with it being a desktop app, this should be a web app!

So here we are, 4 Innovation weeks into the project and I've learned that web programming is best described as a timey-wimey, wibbly-wobbly, ball of stuff. It's a very different mindset to move into when coming from being a C/C++/C# programmer for so many years. What I've found to be the most difficult part of it all was just identifying the tools to get the job done, there are a lot of options out there and certainly confusing for the newbie. Fortunately we have a very patient web team who don't mind, too much, me coming into their office every ten minutes to ask them a web programming 101 question.

The tools I ended up settling on:
  • Eclipse 4.2 - the plain vanilla Eclipse install
  • Apptana Studio - as a plugin for Eclipse
  • Subversive plugin for Eclipse
  • Navicat for MySQL Essentials

Once that initial roadblock was busted through spinning up a web app moves a bit quicker. In the span a couple days I managed to get a website up, create a database and tables and make a couple forms that would add PC's and NPC's to the database via some php. So, not a whole lot really to share just anecdotal stuff about making that switch the C's to web programming. Hopefully I'll have some cool screens to share in a few weeks of the tool in action.

#1
08/31/2012 (3:16 pm)
Are you doing raw PHP?

If so I would recommend a framework such as Code Igniter. Also for javascript use JQuery. Those two combined will save you a LOT of work. One of the nice features is seamless integration of sessions and databases. That way you can store sessions in a database to ensure they are not forged. Really important for web apps and you want to ensure the person is who they say they are. That keeps people from hijacking sessions.
#2
08/31/2012 (4:03 pm)
Quote:...when you've got a shiny new hammer everything looks like a nail.
QFT!

If you want 'wibbly-wobbly timey-wimey' stuff, try doing something serious in Javascript :P. Really makes me want array/object literals and first-class functions in TorqueScript!
#3
08/31/2012 (4:57 pm)
'wibbly-wobbly timey-wimey' stuff just makes me want to want more Dr. Who.
#4
09/02/2012 (1:52 am)
Sounds exciting, Scott! Web tech is full of quirks on both the client and server sides, but finding your way around is part of the fun. :)

Navicat FTW! Can't say that for Eclipse. :)
#5
09/04/2012 (3:51 pm)
Sorry I'm bit slow responding guys. I decided to immerse myself in a pile of games for the holiday weekend, something I haven't done in quite a while.

@Frank
It's actually likely going to be a blend of a little bit of everything in the end. It's going to use HTML5 for the pages/UI, so I started with the HTML5 boilerplate. The scripts that manipulate the database are raw php though. My understanding of it is php is code that runs server side, or at least is intended to be server side only code, so that seemed like the right way to go for the database manipulation. I found it also has some a lot of functionality specifically for this purpose.

Right now everything is built around a general free for all, anyone could use the PC's or NPC in the tables and add to them. Mostly I'm trying to get the basics down first. I have started thinking about tying certain tables to user accounts as that will be needed in the end. I'll definitely check out Code Igniter, it may be something I'll want to start accounting for now rather refactor the crap out of it later.

@Daniel
The service project I'm on here right now involves some heavier Javascript stuff. I have a new found appreciation for the programmers behind web services, the magic stuff that just works just because so don't question it ever.

@Greg
Series 7 started a week or two ago!

@Konrad
It definitely is fun. I forgot how much fun it was to step so far outside my wheelhouse and learn new tech. And yes, Eclipse is nothing but the headaches I remember it being. In fact, Friday I lost half the day to it because it locked up loading the workbench. Had to trash the metadata in the workspace and reimport the project in order to get it going again.