Wednesday, July 22, 2020

New Overblown Hero: Boomfist

The second hero to be added to Overblown is Boomfist.  Here he is in action:-



Overblown uses the Bullet physics engine for all its movement and collision.  The main problem I had with Boomfist was hist PowerPunch ability.  I originally tried applying a force to his centre, but due to the damping of the player's avatars (which is there to stop them sliding about too much) the force was initially too fast, andf slowed down too quickly.

My solution was to simply remove the dampening effect until the player's linear velocity dropped below a certain threshold, at which point it was re-applied.  I also used the player's linear velocity to check if they were in the middle of a punch when they hit another player (as opposed to simply walking into them).

I also created a new logo for the game:-


LibGDX 3D Camera lookAt() Problem

If you've ever used the method camera lookAt() method, you may have noticed that afterwards, your view of the (virtual) world is slightly off-kilter. 

For some reason, the methods alters the camera.up value, which should ideally be (0, 1, 0).

What is the solution?  Just manually set the direction yourself like so:-

tmpVector.set(targetPosition).sub(camera.position).nor();
player.camera.direction.set(tmpVector);
player.camera.update();
I've no idea why the lookAt() method does what it does.

Tuesday, July 14, 2020

New Gamedev Project: Overblown

In the interests of trying to get players to actually play my games, I've decided to start with an audience closer to home: my kids.  Their current obsession is Overwatch, so my new project is an Overwatch clone/parody called Overblown.  This will be split-screen multiplayer, and use a proper physics engine.  One of my aims was to have a properly destructive environment, something that even Overwatch doesn't have.

I decide to use LibGDX, basically cos it's pretty good, I know it most out of all the engines I've used, and I've got loads of old code I can re-use.

I've already created several split-screen games (like Chrono Cup), so I started off re-using this code.  The first thing I needed was a decent map, not the usual uninteresting flat space that I come up with.  For some reason, generic 3D map editors seem very rare, so I created my own:-



One of the hardest things about creating a map is getting the textures to look right.  it's very easy to fall into the trap of looking like an old 90's game with overly detailed textures on simple shapes.

Once I had the map, it was onto creating the characters.  I had loads of ideas for parodying the characters, and the first one that seemed ripe for copying was Pharah, or Phartah as she is called in this game:-




Once I came up with the name Phartah, the in-game jokes wrote themselves.

The next character is Boomfist.  I pretty much enjoy coding more than I enjoy playing games, and one of the fun aspects of this project was trying to recreate the Overwatch character's abilities in my own game.  The next challenge was Boomfist's PowerPunch ability....