Sign in to follow this  
  • entries
    42
  • comments
    61
  • views
    32746

About this blog

Brotherhood of the Coast

Entries in this blog

jjd

bbox.js

Hi,

This weekend I had an itch that I needed to scratch. I have sporadically been working on a project that uses SVG and javascript. I kept coming up against two problems: (1) getting a reliable bounding box around an SVG path, and (2) being able to properly align SVG paths with one another.

There are other solutions to finding the bounding box of an SVG path. Popular solutions are using the functionality of the SVG API itself, or using the awesome RaphaelJS library.

The SVG API is not pleasant to work with and, from what I understand, focuses more on operating at the level of the SVG node itself (what I would consider the root of the scene graph). I am more interested in working with the paths and composing objects from sets of paths. So, for the bounding information this is a little awkward, but it is really the alignment information that is unavailable. In particular, when you have an anchor point on a shape that is not in the middle or at the edges, it gets fiddly. I don't like fiddly. Especially, when I am working with things like Bezier curves that are really quite nice to work with. The information about the inflection points is really useful for what I am doing.

RaphaeJS is an awesome library but sometimes you just want to a solution to one particular problem. Since I was not intending to use RaphaelJS for anything else, just importing it to calculate a bounding box seemed wasteful.

And finally, I just wanted to solve it! :-) I love this kind of problem so I had a hard time not doing it.

The code is free and open and I hope some of you reading this may find it useful.

https://github.com/jdowner/bbox.js

-Josh
jjd

[BotC] Mesh Viewer

Just a brief update.

We've been busily working on several fronts. There is some new art in the pipeline (Joel) that I will hopefully post next week, a bunch of research into the stories (Amanda) that we want to incorporate into the game, and some work on a couple of prototypes (Justin and Josh) that explore features we'd like to include in the game.

One little bit of progress we've made is getting our mesh viewer working for the prototypes. It is just a wire-frame viewer but we are intentionally not emphasizing rendering at this point in order to focus our efforts on the game features we are prototyping. That, and neither Justin or I are graphics programmers. At some point we are going to need to get a programmer on board with experience in OpenGL, and developing on windows and linux, but for now this will suffice.

So without further ado, translating through a galleon mesh!

-Josh
jjd

Brotherhood of the Coast

Some friends and I have started working on a pirate game with the working title "brotherhood of the coast". BotC wil be a pirate-themed RPG with a sophisticated environmental engine to create an immersive world, with a deep narrative that challenges the player to become a marauding prince of the seas.

One of the things that I want to achieve with this project is a high degree of openness about our process and progress. I believe it is incredibly beneficial to a project to enable people who are interested to provide feedback as early as possible. It is too easy to hide away and develop something in isolation only to discover that your assumptions about what others like or want is totally wrong. Providing regular updates via this journal is one way to show progress and get feedback but we will obviously need to create a website to provide better visibility.

Currently we are in the planning/prototyping stage of the game. The approach we are taking is to record all of the ideas we have and let our imaginations run wild. Then we prototype some of the ideas to investigate the level of risk involved to better understand the technological constraints that are going to influence the game mechanics we want to employ. So initially there is going to be a lot of iteration to actually try ideas out to figure out what works and what doesn't.

BotC is going to be developed and available on windows and linux.

Currently the team consists of:
Amanda (writing)
Joel (art)
Josh (programming)
Justin (programming)

And since no entry would be complete without some pictures, here is Joel's first concept sketch!
pirate1.jpg
jjd

Programmer Art

I know that there are numerous people here who use inkscape, so I wanted to pass this on in case you haven't seen it. It is a set of tutorials on Gamasutra by Chris Hildenbrand for creating 2D scenes and characters using inkscape. Currently there are 3 in the series, but who knows if there will be more. I hope so!
jjd

vim text objects

For the last 18 months or so I have been working predominantly on linux. Most of my development during that time was in vim. Most game development seems to happen on windows so MSVS is the natural choice for most developers. Let me say that I do have frustrations with MSVS but I think it really is a wonderful tool. I've used it a lot and if I was developing on windows I would almost certainly use it. However, I have found that my move back to linux, the command line, and vim has really made development more fun for me.


During that time I learned a lot of vim, and began to understand why it is considered so powerful. Learning vim is like learning to play a game. There is definite leveling up. You learn a new technique or capability and then you incorporate it into your arsenal, making your vim-fu all the more effective. It is tempting to sound like a raving fanboi and go on about all the things that seem so right with vim, but I will spare you that (this time). Instead, and my reason for beginning this entry, is to pass on a tutorial that I came across that does a really fantastic job of explaining vim text objects. So if you do happen to share my love of vim, this tutorial may help you level up.


jjd

I want back in

I've been lurking around GDNet for a little while. It helped me get my first job in game development in a big way. I moved on to other industries, but I always find myself drawn to the game industry and to GDNet. This really is a special little place on the internet. I have learned so much from the very smart, experienced people here. Much more than I learned from the smart people that I've worked with elsewhere. There are lots of cowboy coders in the games -- good on them! -- but there are also a lot of really good software engineers. People who love and care about the craft of coding. But it is not just the software engineers who are like that in the game industry it is everyone: the artists, designers, and producers. These are people who care about what they do. It's pretty hard to find the same kind of dedication in other industries. Mostly it is people who are just punching the metaphorical time-card. I miss the passion.

So I want back in.

If you are looking for a software engineer in Boston MA, please check me out and get in touch.
jjd

Another CppUnitLite

So last night I was working on a project and needed to add some unit tests. I have used CppUnitLite for ages. I really like it because it is very simple to use. I don't care much for complicated test frameworks. To me, unit test should (ideally) be really simple. Having said, that I can't help but want to re-write the code whenever I look at it and so last night I broke down and re-wrote the bits that I disliked.

Read the rest at physicaluncertainty.com
jjd

A cautionary tale...

This post is going to be a little different to my other posts, and hopefully one that I won't revisit. I'm going to talk about a failure of mine. This weekend I booked myself into a hotel with the expressed intention of getting lots of coding done. A geeky indulgence. But, I bailed halfway through. There are several stories out there on the intarwebs of 24 hours game projects and what they produced. I wanted to be one of those. Or something like that. Instead, I did not achieve much and so this post is a postmortem of what happened and how I will do things the next time I try this.

Read the rest at physicaluncertainty.com
jjd

Converting project to CMake

So I have taken a brief hiatus from the DOP project to work on a tiny game engine that I have been kicking around for while. It's pretty bad but it contains a bunch of stuff that I would like to make use of. In particular, I want to sort out the renderer so that I can actually display some of the cool results from the DOP project. But I'm currently working on several computers at the moment and I made the mistake of versioning my .sln and .vcproj files. I say 'mistake' because I think of these files as derived or intermediate files. They are not essential to the project, they are merely a convenience for working on the code, i.e. they allow me to use visual studio. But if I were to work on the project on linux they would be useless, even though the code would be fine. So I decided to learn CMake to break my dependence on these visual studio artifacts, and here I'm going to provide a little direction for anyone else walking down this path.

Read the rest at physicaluncertainty.com.
jjd

Lucky Me!

I am really very lucky to be married to such an wonderful woman. Next weekend I have been booked into a hotel with the sole intention of getting away and coding for the whole weekend! Two whole days of uninterrupted coding! For a married geek with two small children this is about the best holiday imaginable.
jjd

Ah, nice to be back

Hey there journal land! I've returned to gamedev after a wee hiatus. I'm working on a little physics engine project using data-oriented principles. Actually it's more that I'm trying to figure out data-oriented principles. Anyway, you can following along at physicaluncertainty.com. The website needs a little TLC but it suffices for now. I promise I'll spruce it up when I find some more time.
jjd

New beginnings

I don't write too often in this journal so I doubt there are too many of you out there who have followed it. But for the couple of you who do (hi, mom and dad) I thought I'd bring you up to speed on what has been going on in my life since my last entry.

Two major events have defined the last couple of months. The first was the birth of my son, Alexander. He was born on December, 20th, at a healthy 9lbs 11oz (3.49 kg). You don't get much more major than that. The second event is a consequence of the first, but I resigned from Irrational Games so that I could stay at home to raise Alexander. I'm not a fan of paying someone else to raise my child -- it's expensive and I have a moral problem with it. I understand that some people do not have the luxury of staying home to raise their children, but I do have that luxury and I believe that I have an obligation to be there for Alexander.

For a long time now, I have wanted to go into business for myself. Firstly, I don't like working for other people. I have a problem with authority. I really have difficulty reigning in my thoughts when I have a boss who I do not fully respect. That wasn't a problem at Irrational because the people there are simply awesome. Secondly, I want to be financially independent, and I can't achieve that by working for someone else.

For the longest time I despised money and those who sought to acquire it, seeing them as soul-less parasites. Yeah, I admit it was an extreme viewpoint, and probably a naive/immature one. It is only recently that I have begun to see financial independence as something other than accumulating lots of money. Financial independence does not necessarily mean being wealthy, but having enough money to live your life as you want without strong dependence on an employer, government, or some other entity. It is about freedom and independence. In a simplistic way, it sounds like living a cushy life, being able to do what you like and not having to answer to anyone. But it was only recently that I began to understand the power of having freedom and independence.

My wife has a terrible boss. He's an incompetent asshole who blames everyone else for his failings. My wife is really good at what she does. But she's terrified of getting off-side with this guy because she fears for her job. She's the major bread-winner in our household and it would be a big problem for us if she lost her job. It's no surprise that this causes her stress. But if we were financially independent it's a different situation; The job is no longer essential but something she would do for the pleasure she gets from it. Stress would be reduced and the fear of a job transition would be less. She wouldn't have to endure working for this asshole if it detracted too much from the experience. Now that's freedom.

Ok, I've probably ranted enough about that.

The point is that now I want to go into business for myself. For a long time, I've thought that it would be great to become an independent developer. But becoming an independent developer is not a good way of becoming financially independent [smile]. So I'm not set on that plan but I also haven't entirely discarded it because there are areas of game development that are untapped and appealing to me. Maybe they are even profitable. In particular, I am interested in games for children and educational games (Ok, I'm also interested in 'art-house' games but that is definitely unprofitable). And I am so bored of most of the currently available games. It's really sad, there are talented developers out there working on some shitty games. I find it depressing to go into GameStop. There is seldom anything new or interesting. There is no innovation. It is the same tired genres over and over again. But I can't blame the publishers -- if the consumer wants to keep buying Madden each year, why would you not make it?

Ok, started ranting again, didn't I? I think I'll kill this long-winded post here.

In Short:
Had a baby called Alexander. That was cool. Quit my job. Starting pursuit of financial independence. Might take a crack at making games for kiddies!


GOOOOOOOOOOOOOOAAAALLLLLLLL!











jjd

BioShock Demo

The BioShock demo for the xbox360 has been released on xbox live. Try it out. I'm looking forward to hearing what people here think :)
jjd
"Where's my bone?" is going on hold. I can not longer resist the temptation to move onto something else. Forgive me.

What I'm going to turn my attention to is a game I designed a few months ago called "redpoint". It's a rock climbing game and what I'm going to focus on at the moment is the ragdoll system. I've been battling with the ragdoll system at work, and the frustration makes me want to create my own that works how I want it to.
jjd

Untitled

Ok, I've been a bit slack about recording my progress over the christmas period. It was a good time for getting lots done on "where's my bone." I cleaned up the engine a lot and things are starting to fall into place. The main features that I've added are particle effects and better animations. Most of what I did was re-factoring and I won't bore you with the details.

I've been back at work for a week and I can feel the pressure returning after a relaxing vacation. One quality that I've notice about the programmers I work with is that they are extremely patient. They seem to have a high stress threshold. At times when I know I would be getting wound up, they're just ticking along quietly. It's not the first trait that I would have thought of when describing a good games programmer, but now I think it would be. I need to take a leaf out of their book.

I'm getting a little bored with "where's my bone." I'm unsure if it's actually going to be fun. More probably I'm just itching to work on something new. I feel a little torn: should I start something new and refreshing, or keep my head down and plug away at this project until it's finished? I think it's probably the latter, but I don't want to lose interest and get out of the work habits that I've formed over the last couple of months.

Meh, call me emo.

Something really needs to be done about the look of this journal...

Hope you all had a good vacation, and santa put plenty of swag in your stockings!

Apologies if you read this while I'm playing around with colors and suffer momentary blindness.

umpf... I'll deal with the CSS later.
jjd

Don't Panic!

I think that executives should not be allowed to talk to engineers. It's just a bad idea. Don't get me wrong, I think that executives are an important part of any successful business. They have their type of work which is important and they're good at it. But they speak a different language and most of the good-meaning words they use come out as bad-words to engineers. We had an executive from our parent company give us a pep-talk last week, which pretty much depressed everyone. I can see what he was trying to do, but it really sucked the motivation out of the room. He just didn't get that what he was saying was that our importance was worth less than seven ounces of syphilitic whores piss.

Anyhoo, I've been working away on my engine. I've faced up to the fact that I must re-factor the engine now or suffer a fate worse than the Sodomites. Although my initial approach to this game was not efficient, I still think it was the correct way for me to proceed. The unfortunate consequence was that I knew I would have some major cleaning up to do. Nonetheless, I am motivated to work on it because I am getting results, so I think it has been a success.

The problem that I have is that my rendering and engine code are all intertwined. That was fine but now I want to introduce a queuing system that is going to be a significant part of the engine and it's going to be infinitely better to clean house before rather than after.

The new system is basically for queuing effects like animations, sound effect, particle effects, etc. At the moment it is going to be specifically for animations, but I would like to build on it in my next project. It is clear this is going to a big part of the engine, so I want to make sure that it is setup well from the beginning. For one, that means it shouldn't be in the fecking renderer, hence the re-fectoring. Another important part is that some animations have to play on some of the game objects. This is simple enough, but it means that I have to clean up the game objects so that there is a clear hierarchy.

Phew! All I can say is, "Thank God for Subversion!" I had a crack at re-factoring last night, and it didn't work out well. Damn. Revert. W00t! Ok, so I lost a bit of time, it was nice to be able to revert to an earlier version that I knew was stable. Since it seems to be a popular topic at the moment, let me chime in and say that some form of versioning is essential to developing a non-trivial piece of software. Subversion, CVS, perforce - whatever! Get it. Use it. Love it.

I feel bad. I should really have something for you, afterall I may not see you until 2007! I could give you a broken engine, but them you'd probably put me a spam list. Instead, here's a picture of one of my cats.



His name is Hannibal. How many of you thought Hannibal the Cannibal and not Hannibal Barca? His sister is called Cleo, and if you can tell me what the common theme is I'll put you in the "special thanks to" list in my first game.

Hold shit! It's one week until Christmas. Well, to put you in the mood, here is something to listen too... hehe
jjd

Untitled

After my titanic struggle with libpng, I managed to make a small amount of progress. I can load an save images in a variety of ways, but reading and writing unknown chunks presented an insurmountable obstacle. Perhaps, I'll figure them out in the future. For now I'm content with the progress I've made.

I started working on animations. I've never done anything with animations. So in the spirit that I've approach the rest "where's my bone," I hacked the most naive approach I could imagine. So I just read in a text file that lists the images that should be used in a given animation. Something like


Images/Frame1.png
Images/Frame2.png
...

Then, each of the images was concatenated into one big image that shows the entire animation strip. DO NOT DO THIS IF YOU ARE USING OPENGL! I don't know if DirectX has the same restrictions, but this was a mistake in OpenGL because the dimensions, width and height, of the resulting image are not powers of two (except by luck). OpenGL doesn't like that. So with a three frame animation I ended up having white quads where my animations ought to be. That caused me some confusion. Anyway, the animation I made was a little tail wag that is updated each frame, so the little pup wiggles his tail very quickly (unless I maximize the screen... can anyone tell me why maximizing slows things down so much?)

So I got something to work - yay! It's always nice to get visible results [smile] But it was also clear by the end of my hackery that I need to put a better system in place. The three things I need to do now are:

  • incorporate a better way of scheduling and updating the animations
  • overhaul the AnimationManager because it is duplicating a lot of the work done by the TextureManager unnecessarily
  • Animation frames should be smaller. At the moment they are the same size as the whole puppy quad. It should be easy to use smaller frame sizes with an offset to achieve the same effect.



jjd

Sono Pazzi Questi Romani

I really wish I had something to say here, but I don't. We mostly made our milestone last week and so I slept for a large portion of the weekend. But it looks like we're going to continue in lesser crunch mode for the rest of the year. So now I'm looking forward to Christmas for more than just the prezzies.

So, one thing that I've been "working" on for the last week is figuring out how I'm going to work animations into the game. I've been using FreeImage to load up images, and that works really well (I happily recommend it to anyone). But now I want to load up animations strips that contain metadata. I could do this with FreeImage tags. However, since I'm mostly using PNG images anyway I ought to be able to put the metadata into custom chunks in the PNGs. At least, that's what the specs say. So I thought I'd have a look at using libpng to load and save PNGs again.

My last effort with libpng was a failure, and this time didn't fare any better. Why, oh why, can I not load a PNG using libpng!!? This has nothing to do with anything fancy, all I want to do is load a simple freaking texture. I've gone through the documentation and I'm pretty sure that I know roughly what is going on, but apparently not.

I've gotten to the point where I figure it must be something like a conflict between the libpng and zlib libraries and the way I've set up my projects in visual studio, but I'll be damned if I can figure out what. So this is a plea to the GDNet community -- PUHLEEEEASE HELP MEEEE!!! Have you also suffered defeat at the hands of libpng? Or, were you able bend it to your will? Vent your spleen or share you wisdom!

Here's a code snippet to show what I got. It's pretty much what you find in the library docs, but obviously there's something amiss.



static const int PNG_HEADER_LENGTH = 8;

void LoadPNG( const char* filename )
{
unsigned char header[PNG_HEADER_LENGTH];
FILE *fp;

// Open the file and check that it has the expected header
if ( ( fp = fopen( filename, "rb" ) ) == NULL )
throw new std::exception("Unable to open file");

fread( header, 1, PNG_HEADER_LENGTH, fp );

if (png_sig_cmp(header, 0, PNG_HEADER_LENGTH))
{
fclose( fp );
throw new std::exception("This is not a PNG file");
}

// Create and initialize png_struct
png_structp png_ptr = png_create_read_struct(PNG_LIBPNG_VER_STRING, NULL, NULL, NULL );
if ( !png_ptr )
{
fclose( fp );
throw new std::exception("Unable to create png_ptr");
}

// Create and initialize png_info. This contains the image information.
png_infop info_ptr = png_create_info_struct(png_ptr);
if ( !info_ptr )
{
png_destroy_read_struct(&png_ptr, png_infopp_NULL, png_infopp_NULL);
fclose(fp);
throw new std::exception("Unable to create info_ptr");
}

// Something to do with error handling that I don't understand
if ( setjmp( png_jmpbuf( png_ptr ) ) )
{
png_destroy_read_struct(&png_ptr, png_infopp_NULL, png_infopp_NULL);
fclose( fp );
throw new std::exception("Problem occured when calling setjmp()");
}

// Initialize IO
png_init_io(png_ptr, fp);

// Tell the library that we've already read the header
png_set_sig_bytes(png_ptr, PNG_HEADER_LENGTH);

// Read in the whole image. This is where I get an unhandled exception.
png_read_png(png_ptr, info_ptr, PNG_TRANSFORM_IDENTITY, png_voidp_NULL);

// We're done, so close the file.
fclose( fp );

}




Yay! It looks like I might have it working! At least, it isn't crashing at the moment. I don't have time to test it because I have to go to work now, but it seems that the problem was related to using different runtime libraries. Compiling zlib and libpng in the same solution as the project I'm working on seems to be the answer.
jjd
Not much report. Our milestone is on Friday so I've been busily crunching bugs. However, I managed to get a little bit done over the thanks-giving weekend. Speaking of which, a hearty "thanks" to the Welsh for a spirited game.

Anyway, here's a screenie to show where things are at.



Most of what I have been working on is under the hood. Tidied up the serialization a little. Refactored a hefty chunk of code and got it all checked into SVN. I was annoyed that I hadn't started out by putting all the code into SVN in the first place. Anyway, you can run around with the little pup (got nice, smooth movement happening), and chomp away on the bones. The bones just respawn once chomped, but in the game you'll just have to collect them before time runs out. So the next thing I need is a timer. I have to admit I held off on the timer because I'm not looking forward to adding a proper GUI. I know it's going to look ugly :-(

OK, so I haven't been working all the time, and I haven't just been coding either. My lovely, thoughtful wife bought me Gears of War last weekend and I've been having a good bit of fun with that. It's a nice game. I think they pretty much nailed the use of cover. I really like playing SWAT4 and I'd've loved to use cover the way I can in Gears. The graphics are good but it's the usual gray, baby-vomit color palette that's standard in military type games. I like the story too: The characters are engaging although the timing on the scripted sequences is off in places. I think they made a dubious decision with the ragdolls. The ragdolls look good until you walk into them. Then they wobble about like jelly/jello; They look especially bad when you slam them into a wall when you take cover - you're hiding behind this wall with this thing jiggling all over the place. Ragdolls can be a pain in the arse to tune, and I think they should not have let the player kick them around given the way the react. Still, none of that detracts from the fun of the game, and it is fun, which is the most important thing.
jjd

Untitled

Progress has been slow lately. With a major milestone approaching we're in crunch mode at work, which leaves little time (or energy) for working on my own projects. Nonetheless, I've made a little progress. I did some work on my bug tracker. It's more like a TODO list than anything, but useful now that I'm going back to "where's my bone?"

The main task at the moment is modifying the serialization of the maps so that it is consistent with the maps created by the map builder. Mostly it involves getting rid of some hard-coded nastiness. It should also make the system a little more flexible... who knows?! It might even become a useful little game engine ;-)))

On the artistic front, it'd be nice to hook up with someone who's interested in helping out with all facets of 2D art stuff. At the moment, I need help with the UI, textures, and animations. Let me know if you're interested in teaming up.
jjd

Farewell, Nova.

Sadly, we had to put one of our dogs, Nova, to sleep this morning. My wife picked her up from a shelter about two years ago. She was an old dog, and the shelter was pretty awful. They tried to convince us that Nova was a golden retriever, german shepard mix. There might have been some shepard in there, but no way was she a golden. It could have been a ploy to get someone to take her, but given that they'd missed the fact she had a broken leg I'm more inclined to blame their incompetence. That and the fact that Nova had a blue tongue. A blue fucking tongue should be pretty hard to miss! But of course there was no mention that she could be part Chow...

We have no idea what Nova's life was like before the shelter. I don't think it was much fun for her though. We reckon she lived with a old person. She was a pretty quiet and docile dog. Sadly, she has absolutely no sense of play. By that, I mean when our other dogs were playing, she'd want to join in, you could see it, but she just didn't seem to know how; She knew she was supposed to do something with the ball, but she wasn't quite sure what. When we first got her, she only walked on the footpath. Walking on grass was bad. So we took her for walks in the mountains every now and then. She loved it. For a brief moment, you could see a puppy trying to break out.

In the end, her old body failed her and I think she may have suffer a stroke too. Life was just too painful.

We'll miss you, Nova.


jjd

MapBuilder Done

I am finished with MapBuilder for the time being. It works well enough to be functional, although there are a few outstanding bugs/features that I'd like to implement. Nonetheless, I want to move back to "where's my bone?"

Has anyone else experience annoying behaviour with Firefox? I have the EXTREMELY annoying problem where I'm browsing through a page and when I click on a link, the page jumps up and I am not taken to my destination of choice. It happens all the time and I'm getting a little sick of it.

IMPORTANT NEWS! The All Blacks beat France 47-3!!! That was a phenomenal result against the team ranked 2nd in the world. The ABs definitely improved on their performance at Twickenham last week, and didn't let the French get a single try. Commiserations to the English on their defeat at the hands of the Argentines; I can't imagine Robinson is going to remain the coach much longer.
jjd

BugTrack

Not making much progress at the moment. BUT! In a burst of creative energy, I did create an elementary bug tracking app.



I have almost done as much as I intend to on MapBuilder for the moment. But the way that I've set up the tiles is bugging me. I deal with tiles as two separate types: special and common. The common tiles are just background images really, although they may or may not block the player. Special tiles are things like the player start, enemies, and bones. Dealing with them separately was a stupid design and has led to annoying issues with serialization. So I'm going to go back and overhaul the tiles. Then I'll be done with MapBuilder for a while, and I can get back to "where's my bone?"
Sign in to follow this