Sunday, March 8, 2009

The resolution continues!


Refactoring... complete!


But that's not all. Besides improving the health of my code, I've added a bunch of new features. In no particular order, they are:


Moving platforms



Aside from the tile grid, which provides a very simple mechanism for building a level, I can now add arbitrary platforms and obstacles. They can move around, and the player can even wall jump off the side of them.


Friction



Added moving platforms forced me to look closer at my physics engine. In particular, what happens when the player falls straight down onto a platform that is flying past him at a good rate of knots.


The simple answer was that I need to model friction, and I've since applied it to all surfaces in the game. So when the player picks up speed, and jumps onto a block of ice, he will glide halfway across the screen before coming to a stop, whereas he will stop almost instantaneously on any rough surface.


Surface velocity



I was in the area when adding friction to all surfaces, so I took the opportunity to add a surface velocity too. Ryan suggested doing this ages ago, but I shied away from doing it because I was planning to build a very simple game. But the more I add, the more I want to add, and the more my imagination steers my efforts.


I can now add a surface velocity to any surface, and when the player touches that surface their velocity will be influenced by the surface velocity. This will allow me to build conveyor belts and other similar machines.


Multiple tile grids



Whereas previously there was a single tile grid that the player interacted with, an arbitrary number of tile grids can now be added for decoration. Currently, I'm using this to render a simple background, but this will also allow me to render weather effects such as snow and rain later on.


I'm still refining the appearance of the background. I was going to use a photo-realistic background, but was concerned that it might clash too much with the cartoony appearance of the foreground. I quickly browsed the available Paint.NET effects (mental note: check out the PhotoShop ones too), and am experimenting with an oil painting effect. The result is interesting, without distracting from the foreground.






I'd appreciate if you let me know what you think. I've had a couple of positive reviews and one negative so far, and am interested in broader opinions.


Conversations



It isn't fully cooked yet, but the player can now read signs and have conversations with non-playable characters. I have a big list of features to add to this, such as the exchange of items during a conversation and showing different conversations based on context of what the player has and hasn't done in the game, but the foundation is there.






That's all for now. I'll post a video soon.

3 comments:

  1. Btw, the background picture is Goa, in India.

    ReplyDelete
  2. Wow you have been busy!

    The moving platforms, friction and surface velocity are all pretty cool. Good thing you listened to Ryan. You should know by now he's always right about this stuff :P

    I'm unsure about the background. The oil painting effect is probably better than a standard photo. But I'm not sure that I like the actual feel that this gives the game. Maybe it comes down to choosing really good photos that match the scenes. Particularly in the "conversations" screen shot - I think the background image confuses the game screen.

    Maybe I played too much Bubble Bobble - but I prefer more neutral backgrounds. You could of course take photos of something appropriate I guess. I'm imagining a shot of a circuit board, darkened so that it is less intrusive for a "tech" level... dunno.

    With the conversations thing - do you think people would use this over other messaging systems? I know most 3D shooter type games have built in text messaging (which is good if you don't know the other players at all) - yet the gaming world seem to prefer either msn or Xfire. Rather than or in addition to building you own, maybe you could leverage these existing conversations systems but define an interface for sharing "objects" as files over them. Eg. I can send my friend the "jump pack" object either via your conversation system or as a file via msn. Or even allow users to create their own objects... or levels.. oh the possibilities!

    ReplyDelete
  3. Thanks for the feedback, Jackel. I'm still undecided about the backgrounds, but I'll mark one down for the skeptics. :) I agree that I need to choose backgrounds carefully and appropriately, if I go that way.

    The conversations aren't for communicating between players (there is just one!), but rather to talk to other characters in the game. E.g. a character is crying because his dog has gone missing, but if you find his dog and bring it to him he will give you the key that you need in order to advance.

    ReplyDelete