Phil Hassey - game dev blog
Phil Hassey as Snidely Whiplash
"You can't buy awesomeness.
You're born that way."

Archive for September, 2010

Dynamite: Day 4 – Visual Effects

Thursday, September 30th, 2010

First off, I did a bit of bug fixing. I improved my panning by mouse drag code a bit by using gluUnProject (the same code I’m using to pick a tile with the mouse.) Before I was just kinda guessing how to pan so it wasn’t very accurate.

Next off I noticed in yesterday’s screenshot that all the tiles had lines between them. I found that this was because I’m using a 256×256 texture which I’ve now added to a texture atlas. So when GL mipmaps it down to a smaller size, the blank area between textures is getting used a bit. This forum thread seems to cover a number of options I have. The simplest solution for right now was to move the “wall” texture out of the atlas, and just leave the sprites in the atlas.

Updated screenshot. I have the walls set at 0.5 height for the moment, but it shows the fixed textures. I also added variation in the darkness of the tiles to give it all a dirtier look.

DynamiteScreenSnapz003

Due to high demand, I decided to work on the textures a bit more. I found that www.cgtextures.com provides a huge library of textures! I’m using a few of these to give the game some pizzaz. Here’s an updated screen shot:

DynamiteScreenSnapz004

And with wall textures and ceiling textures ..

DynamiteScreenSnapz006

And now with windows!

DynamiteScreenSnapz007

And now with a guy trapped in a box! This is actually the cursor, so when you are trying to walk to some destination this shows you where your mouse or finger is hovering.

DynamiteScreenSnapz008

And now with some always-on shadows for the pillars so they look attached to the floor. I considered having dynamic shadows for everything all the time based on the other in-room lighting, but that would get more complex than I care to deal with and doesn’t seem overly necessary.

DynamiteScreenSnapz009

And NOW with multiple lighting sources! I turned off some of the shadow features for the moment, but I’ll probably try and figure out how to re-enable those later.

DynamiteScreenSnapz011

.. and that’s about all I can manage for one day! Thanks everyone for the feedback, the encouragement to go after the visuals a bit seems to have paid off nicely!

-Phil

Dynamite: Day 3 – JSON Texture Atlas & Lighting Effects

Wednesday, September 29th, 2010

I’ve done a bit of further improvement of the lighting code. I think the lighting will end up relating to the game mechanics somehow.

DynamiteScreenSnapz001

Next up – to finish up the idea I was talking about yesterday, having a proper texture atlas system. I ended up using jsoncpp for my json loading in C++. This worked very well. This is a vast improvement over how I did it in Galcon / Galcon Fusion. In those games, I generated C++ code with defined values for each image / texture. And I had generated C++ code with the structures for all these things, so everything ended up getting baked into the binary, and was very “undynamic” (it also added a considerable amount to the compile time, and in certain compilers – MSVC, I had to change some oddball stack settings for it to even work.) By using JSON I’m avoiding all kinds of nonsense and loading everything is just as quick as ever.

To show off this milestone, here’s an updated screenshot. I adjusted the lighting a bit more, to make the basic level of lighting a bit more 3D looking.

DynamiteScreenSnapz002

Tomorrow I want to have a basic editor up and running so I can save and load levels. The editor might end up being available in-game, so I figure I’ve got to get that feature in from the start. Then on Friday I’ll try and get actual gameplay happening. Thus leaving the entire month of October for the last 10% 😉

-Phil

Bockini Tournament Oct. 3 & New game development blog!

Tuesday, September 28th, 2010

Bockini Tournament Oct. 3

bockini_1This iPhone / Android tournament will be an individual tournament, broken down into two game modes – 2v2 and FFA.

We will be organizing groups of 4 for the FFA round, you will play 5 games total. For each win, you receive 3 points to your grand total.

The next round is a 2v2 game-mode with randomized partners. You will play first to 15. For each win, you will receive 1 point.

For more information and to join the tournament, click here.

New game development blog!

dynamitedev-03As of yesterday, I began work on a new game! This is going to be a crazy month as my deadline for completion of the game is OCTOBER 31st. As you can see from the picture, I’ve already made a handful of progress for just 2 days of work.

You can read more about it here, and watch as I do daily blogs all this month covering my progress. I definitely want feedback as I progress, so be sure to tell me what you think.

-Phil

Dynamite: Day 2

Tuesday, September 28th, 2010

So I stayed up late last night getting the lighting working. Turns out I was doing my gluPerspective and gluLookat against my MODELVIEW instead of against my PROJECTION matrix. Here’s the result:

dynamitedev-04

Now I think I’m going to try and get a bit more texture variety, windows, height variety, thinner walls, some torches, and some shadows. Didn’t get all this just now, but here’s an update:

dynamitedev-05

Now I’m working on switching from dev under linux to dev under OS/X and XCode. The Linux dev has been tough because with VMWare Fusion I don’t get GL under linux, so the framerate is pretty bad. I had an old SSH -Y trick that tunneled the GL back out to OS/X, but that seems to be even slower than software rendering today. Maybe it’s just time I embraced XCode and tweaked the key bindings a bit to suit myself.

Having done that, and tweaked a few settings, it’s time to start loading up data from files instead of inlining all my level data, etc. I think I’m going to give JSON a whirl for this project, since it should make handling all this pretty straight-forward. It also is supported in just about every language, so I can use my python scripts for generating texture atlases and fonts and have them just spit out some JSON for my code to load up. I had also considered sqlite for this purpose, but I think in this case, a database isn’t quite the right fit.

I think sqlite is a good fit for when you need to store CSV type data, except you want it packed. It’s particularly useful if you’re going to be storing a larger amount of data. In this game, the largest data store will be the level itself, which I can’t imagine will be much larger than 200k or so. sqlite can handle huge amounts of data and it’s quite efficient for that, but it’s also a database so you have to access everything using queries, which can be cumbersome if they aren’t needed.

Using python to generate the atlas does give me an excuse to pop back into linux for a while though!

-Phil

Dynamite: Day 1

Monday, September 27th, 2010

dynamitedev-01

10:30am – I have achieved the classic black screen. This is a good start. I’m using this opportunity to take all the various cross-platform code I’ve written and clean it up a touch and put it in files that are totally separate from my game code. So, thus far, I’ve got my “initialize a black screen” code in a separate file. As well as my event handling. So far just desktop support, iOS will come later.

I’m also using a Makefile with automatic dependency generation this time around. I got a snippet from Mike Kasprzak to do this about a year ago, and it seems to work pretty well. Clutters up all my folders with .o and .o.d files, but I can cope with that. (His version did something smarter like sticking all those files in a separate folder, but I broke it.) I only use this Makefile for my linux development, which is where I’ll be doing all my dev.

10:45am – Slight distraction, Unity 3 has been released, though there is still an extra day to buy it on the pre-order price. I must admit, coding this whole game myself does sound a bit like work, and using Unity might be a ton easier. I’m downloading it so I can give it a quick eval to see how much has changed since Unity 2.x.

11:15am – I now have textures loading and being displayed on the screen.

11:30am – Unity 3 download complete, checking it out.

12:00pm – Got intimidated by how fancy it all seems. I’m just looking to make something pretty simple here.

12:30pm – Working on setting up the basic state engine. Trying to do something that won’t require the use of reference counting.

Upgrading the game to isometric was pretty straightforward. I just had to render the sides to all the boxes and do some gluPerspective / gluLookAt stuff to get the game view happening.

dynamitedev-022:00pm – Got a basic 3D isometric view displaying.

Now with soldiers! And box picking! And scrolling!

dynamitedev-03

Spent some time later on fiddling to get the perspective just right, still need to work on that s’more.

-Phil

PoV’s Challenge: Make a game, sell 1 copy

Friday, September 24th, 2010

A friend of mine (and co-host of the Ludum Dare 48 hour game development site) has issued a challenge. The challenge is to make a game (by the end of October) and sell at least 1 copy.

I accept this challenge.

I’ve been peddling Galcon for almost 4 years now, and though I’ve had a few side games I’ve also sold, it’s been a good 18 months since I’ve launched anything that wasn’t a Galcon derivative. I love short-term challenges like this, because they are fun, exciting, and don’t take a year of my life away. I’ve got a game I developed before called Dynamite that I want to remaster and launch on the iOS platforms.

I begin my journey on Monday.

-Phil

Google AI Challenge featuring Galcon!!

Friday, September 10th, 2010

Hey, it’s been a long time in coming, but finally we’re having a battle of programming prowess for Galcon!!

googleai

Go rev up your coding skills and let’s do this!

.. You might be interested to know that I ported the iPhone bot from C code over to python code for the contest. It is currently hanging out in the upper portion of the ranks as “galcon”. Making a bot is a ton of fun! And I’m highly pleased that they have a kit available for python devs :) So get started and have fun!

-Phil