Monday, May 19, 2014

Real life changes

Since I last posted a lot has happened. I had to quit my job at the Mercedes dealership and as a result I started my own small dealership. I have a lot riding on the outcome so the change of schedule and responsibilities caused me to stop development of the puzzle game.

A few months have gone by and while I have much to do at my dealership, I've also started to get some semblance of schedule back in my life, so I'm carving out some development time again.

This round of effort will probably not be on a game, but on a piece of technology I find interesting.

If you haven't read http://procworld.blogspot.com/ and you have any interest in procedural world generation you should leave this blog and immediately go read his entire site.

Moving on... while his procedural work interests me the more interesting thing to me is his method of triangulation.

He's generating landscape and now 3d models with voxel density fields and then triangulating them via the dual contouring method, although at this point his implementation has to be considered some type of hybrid version of it.

At some point he links to this paper. www.frankpetterson.com/publications/dualcontour/dualcontour.pdf which is the original white paper describing the technique. And after some study I also found this paper: www.cs.rice.edu/~jwarren/papers/techreport02408.pdf which address some of the issues you'll find with the original whitepaper.

After seeing the amazing things Miguel is doing "from his pajamas" I fire up the trusty compiler and start digging into the white papers...

Ugg, brick wall. The concept is somewhat complex, just wrapping your head around the difference between primal and dual methods. What does that really mean exactly?

Then the methods of determining vertex placement, quadratic error methods, f(x,y,z), gradients for normal calculation. Brain-asplode.

This next series of posts will be me deconstructing my efforts to understand the concept and master the math required to implement my own version. I believe I will actually be using a dual marching cubes method instead of dual contouring but I plan on implementing them both to be sure of which I prefer.


Sunday, February 2, 2014

Puzzle RPG

Today is an official slacker day, plus I have a Superbowl party to go to so I'm only spending a couple of hours today to start the overall design of my February project.

The concept is similar to Puzzle Quest but instead of a match 3 game I'm going to try a game where you match the corners of boxes, where each box has up to 4 different corner types.

The reason I'm going to try a different mechanic is that the market is flooded with match 3 type games and I'm looking for something with similar properties but a bit less mindless. I understand the value of a mindless distraction but I'm hoping my solution will raise the bar a tiny notch but still qualify as a very low cognitive load while playing.

While the idea is to have a large game with multiple characters, online play, character persistence and in game purchases this months effort is focused on the actual match game. I'm simply trying to get blocks to populate a field of play, and an algorithm to match the corners and tally the "score" which will consist of how many of each type of symbols did you match.

Later, symbols will be spent to trigger abilities that effect either the board, a specific block, the player, or the player's enemy.

Each symbol will correlate with a role and each characters will have a distribution of what role he or she plays.

The roles and symbols are:


Role  -  Symbol

Tank          - Shield
Controller  - Star
Nuker        - Sword
Healer       -  Cross


Classes

There are different classes and they basically denote how much health per level the character will have and what type of roles they fill.

Some example classes:

Guardian - high natural health, always has 2 tank abilities and 1 control ability.

Mage - low natural health, always has two nuke abilities and 1 control ability.

Assassin - medium natural health, always has three nuke abilities

An example character would be:

Name: Zenos
Class: Guardian
Health: 100 per level

Abilities:

Parry(shield ability)
Use Cost: 5 shield
Effect: The guardian deflects incoming damage aimed at any party member, damage deflected is 10% of the guardian's current health.

Unbeatable(shield ability)
Use Cost: 10 shield
Effect: increases the guardian's maximum health by 10%, stacks up to 3 times.

Taunt:(star ability)
Use Cost: 5 star
Effect: the next enemy attack targets the tank no matter who is targeted.

Shield Wall(passive ability)
Use Cost: none
Effect: Reduces the damage dealt to party members by 15% as long as the guardian lives

Unstoppable(passive ability)
Use Cost: 0
Effect: the Guardian is immune to stuns


As a character levels he gains access to more ability slots.
The above character would start with one slot(probably parry).
Abilities drop from completing events or a player can purchase a number of ability rolls.
Max level is determined by the number of abilities a character has. So you need to farm abilities to level your character up.


Ok, back to reality:

The playing field is an N x N array of cubes. Each cube has 4 corners with a symbol on each corner. You score symbols by matching them with an adjacent corner of another cube. If each corner of the cube is matched at least once then the cube explodes and awards double symbols.

If one corner has 4 matching cubes then all 4 cubes from that corner explode, awarding double points for each symbol.

The corner matching and moving and populating part is what I'm going to tackle for February. I'll have to build it to a "save point" per the concept outlined by the 1 Game A Month Challenge, and perhaps spend additional months on it if I'm enjoying the game.

Friday, January 31, 2014

S.O.B.A. 1.0

Sweet success! With roughly 0 days to go I've wrapped up the 1.0 version of S.O.B.A. It used to stand for:

Single-Player
Offline
Battle
Arena

but I should change the name to Son Of a Bitch Arena.

Definitely an ambitious goal set, but in this case, goal set, goal met. It's a big step up from my last month project. The code is a bit cleaner, the scope of the game is quite a bit larger, the production value is a bit better, even though it could stand a month of just polish and be better for it.

Enough chat, here is a 10 minute playthrough.



I'm going to enjoy a couple of well earned days of slacking and then it's on to the February challenge. For February I'm going to do a puzzle-quest style game, hopefully with some RPG elements. I'm not going to push myself as hard as I did on this one. I want to be more disciplined with the scope and try and get a more polished game out.

Monday, January 27, 2014

5 Days Remaining - 6 Days of work left

The ambition of this project given the deadline is wearing me thin. I spent another 12 hours yesterday and still have a long way to go.

This is going to come down to the wire.

I'm getting close to being feature complete. The remaining features I have read like this:

Sound and Music
Finish Game State Manager
Add a Third AI State, some type of defense to mitigate the kamikaze-style AI I have now.
Implement the ability to replay a match.

The bug list, however, is growing:

Bots respawn when they shoouldn't or respawn multiple times.
Player respawns when he shouldn't or respawn multiple times.
Bots don't always face their target and sometimes get stuck looking at a dead target.
Bot's and Creeps sometimes get stuck running but never attack their target.

Thursday, January 23, 2014

75% through the deadline, 75-ish % done

One week to go and I'm roughly on schedule. I spent the night putting some cheap art in(cheap as in price, no offense to the artist)

None of it is exactly what I want but it always amazes me how big a difference even decent placeholder art makes.

From a code standpoint I corrected the healthbars that follow the actors around. Now they're green if the actor is on your team and red otherwise. A very simple feedback mechanism but it was a soup without it. You couldn't quite tell what to click on.

I also got the player death and respawn part in.

Must DO

Next up is the Bot respawn and then a lot of GUI work.

I need a health and mana bar on the HUD for the player.
I need an opening screen.
I need a victory or defeat screen.
I need sound effects and music.

I can call it a game after that.

Nice to Haves

The nice to haves list is crazy but there are a few I may be able to get.

The major one is a couple of skills to cast so the mana bar is for more than show.

I'd love some type of experience concept so I can start the player out weaker and then give him more punch and health as he levels.

I'd like to give the player and bots some effects that follow them around, they're hard to pick out from the creeps right now.

I'd like to incorporate an attack attack on the player so you don't have to pick out individual creeps each time. This is a creature comfort on DOTA2 and I miss it when playing my game.

I plan on buying an effect library and juicing up the special effects because they're really rough.

Lots more to be honest.

I've been really tempted to spend a second month on this game and the format for the 1 game a month challenge allows it but this will only be my second game I've finished in Unity...

In order to give myself permission to do that I feel like I need to do a different game in February, and then if I still feel like coming back to this one in March I can do it with a clear conscious and a good sense of purpose.

Having to trick and negotiate with yourself to be prolific is a beating but is a beating worth taking for the end result.

Thursday, January 16, 2014

Enemy AI

I've wrestled with how I'm going to implement the AI for the bot players for several days. I've studied Behavior Trees, Goal Oriented Action Planners, Simple Hierarchical Finite State Machines, and Hierarchical Task Networks.

I've varied from one to the next, always circling around Behavior Trees as my most likely implementation. Then something interesting happened. I remembered what my actual goal was. I have to finish an ambitious game design inside of 30 days and I'm more than halfway through my deadline.

I pulled out the razor and cut my ambition in half and the scope of my game AI into thirds. This game doesn't have to be a world beater, it has to be finished in 13 days. Having made my decision,(I'm going with old fashioned Finite State Machines, they don't scale for crap and the implementation is almost guaranteed to be sloppy, but I understand them and can code them up quickly.) I'm breathing a sigh of relief.

I thought about all of the half finished projects on my hard drive and all of the excitement of exploring new concepts and new technologies. The truth is I can explore those parts of programming at will. Goal-less, ill-formed dalliances into whatever catches my eye will always be available to me.

Right now I need to practice finishing. And finishing means not rolling the dice on a technology I'd have to learn from scratch. I've already integrated a new GUI library into this project and it set me back several days. I've overcome that with a lot of hard work and focus but I'm not sure the project can stand another adventure.

With that settled I started rolling the Bot AI this evening. My other work on the creep and tower AI served me well and I knocked out over half of the basic implementation in just a few hours. I'm going to make a bold prediction and state that the Bots in this game are not going to be exceptionally smart.

The first pass, which I'm only halfway through will allow the bots to hunt whatever is nearest them and go back to base to heal when they get below some health threshold. Additionally I'm going to give them access to the node network I built for the creeps and they'll use that to switch lanes if I get that far.

Otherwise they'll just be super tough creeps with some extra will to live and an extra trick up their sleeve. A bit boring, but ultimately achievable.

I still have to implement so many things. Major systems untouched include the entire game state manager, an introduction GUI to start the game, a respawn ability for the players and the bots, sound effects, music, and a victory/defeat screen for the end of the game.

That doesn't even include skinning the game if I get time, animation, a lot of feedback systems that are important to understand the nuances of the game, and the player controller is still the hacky version I rolled initially just to test the game.

Good times. 13 days remaining and I'll need all 13 to hit the mark but I'm enjoying the hell out of this experience. I think back to my last serious game attempt before I started the 1 Game a Month Challenge and the time I spent on it. It was a rather simple space shooter with randomly spawning enemies and a simple level manager. Depending on whether I roll another month with this game after hitting the challenge I may go back and re-make that game. What took me 80 days last time to make a game that's maybe 80% complete would probably take me 20 or 25 days now. It would be a good test of how far I've developed in the last 45 days.


More later...

Tuesday, January 14, 2014

Prequel to the halfway point

It's a bit too late to make a video and post it but I have made a good deal of progress this evening. Creeps are working for the most part as are towers. When the game plays itself with no interference from me they fight back and forth and given enough time one will destroy the others base.

Barracks spawn creeps at a steady rate and they do their thing. Still a long ling way to go but I started the day truly concerned if I'd be able to accomplish what you could technically call a game by the deadline.

I still have to create the player death and respawn functionality as well as create an enemy AI for the anti-hero bots. That said, I'm not quite halfway through the deadline and it's starting to feel like an actual game.


More later.