Chuck Game Development

  1. Levels and RagDolls

    The last couple of weeks were awesome! The game has already become what I have been dreaming of years ago, when I started imagining the finished game - back then I clearly could not think any further ;) Here is what we did:

    Maps

    We found an open source tile based map editor called Tiled. With this editor it is much easier for us to create and edit maps. It is quite fun to create and refine new maps and it is really fast, compared to doing it manually in code like we’ve been doing it until now.

    image

    Obviously a new level loader was needed, so we had to adapt our code to it, or actually we extended our old level loader so it could cope with the new format called TMX, which a lot of games are compatible with.

    Gameplay

    For chuck.js to be a real game it needed some kind of gameplay. We have many cool ideas which we will implement over time. The most obvious (and actually original) one is that you throw things on your opponents and they lose health if you hit them. How much health they lose depends on the impact of the object hitting them. The force is a combination of velocity and mass, the higher the velocity and the higher the mass, the more damage they do.

    Because we wanted to see the opponent’s health but didn’t want to see it all the time, we added a small bar over everybody’s head which shows their health, but only for 2 seconds after they’ve been hit by someone.

    After you lost all your health you die, your death count goes one up and the kill count of the player who hit you goes one up. While dead your dead player body is replaced by a rag doll, which you can’t control anymore.

    RagDoll

    It took us one whole day to implement some kind of a rag doll, which still isn’t optimal. Your dead body is converted to an object that you can carry and through at others in the game and be used as a weapon for some time. As long as someone is carrying the rag doll, it is just a normal object, but it disappears some time after the last player has dropped it, right now it is after 25 seconds.

    When even after a day of development, the rag doll did not look great it came to my mind to look for something like a Box2D editor to solve this problems and we found one! Sadly not open source, but quite cheap, it was only €22 and absolutely worth it. It is called R.U.B.E (Really Useful Box2D Editor). This one is even more awesome. You can create whole Box2D worlds in it with objects, images, joints and what not. Basically you create the whole physic world together with the images and background images and can export it to a file which you later on can import to your game. I think it is best explained in this video:

    We didn’t have the time to rewrite the level loader code so it would work with the R.U.B.E files yet. But we’ve been playing with it a bit and made a rag doll, which looks so much better, than the hard-coded one.  We will use it as the dead body, check out this live example:

    (click and drag chuck, to move him around)

    The next steps will be completing a real game play ending with rounds, where we choose a winner after some amount of kills and load the next map and restart the game and so on.

    5 months ago  /  0 notes