Post navigation

I’m going to be honest, I really should be doing this more often. Basically, this post will show what has been done up until now. I’ll go over the tiles and their purpose as well as code sources. I’ll go into more detail of each section in later posts.

Source Tile

The source tile is the life-blood of this game: it sends out ‘power’ by pulsing at a set amount (0.5 seconds while debugging; 1 second most likely in the real product). Any tiles that can receive power and are turned on will receive power and pass on to other tiles.

Each source pulse has a unique signature (as unique as a 5 digit number can give) so that each tile can only receive power once from each signature. Basically, if a level becomes really large, I wanted to make sure that activatable/goal tiles don’t become self-powered without use of the source tile.

Activatable Tiles

Activatable tiles have been split into two parts: ActivatableTile and Powerable.

ActivatableTile

There are a few things that ActivatableTile handles: Material changes, audio, and collision with the player. There are 3 states for Activatables: off, unpowered, and powered.

Material Changes

All the materials are set using the Inspector. The two scenarios that cause a tile to change material are collision and power state changes. However, technically, both scenarios are routed through the Powerable script to allow a single point of change (“Change it once, change it everywhere” mantra).

Audio

The logic that handles tile audio is similar to the material change. If a material is changed, a sound effect will play. There are four sounds that can happen instead of the three material changes (off -> unpowered; unpowered -> powered; powered -> unpowered; and ANY -> off). I plan on using some kind of audio manager later in development, but I like to make things work first.

Collision with Player

Collision with the player will cause a state change in power, toggling between off and unpowered. There is also a timer associated with the collision to make sure the player doesn’t activate the OnCollisionEnter function more than once within that period.

Powerable

I split this class out from the functionality of the activatable tiles so that I could use it for other tiles later, and also to keep my sanity because it was getting to be very intertwined and convoluted code.

Powerable keeps a current state and last state for its power state, as well as a flag for if the current state was changed. This helps other tile classes react to state changes better. There’s also timers, last power signature received information, and the ability to detect neighbor tiles with Powerable scripts attached.

Goal Tile

The goal tile is relatively simple. It receives power, adds it to a total, drains at a certain rate, and declares victory when its power goal has been met. Right now, the only visual indicator of power is a light source whose intensity is changed according to current power levels.

I’ll be introducing two new, important tiles to the game: the source and the goal tiles. This won’t have code, but will be more about the thought process behind the two tiles.

Source Tile

This tile pulses with power and sends the signal to activatable tiles, disseminating the signal to other activatable tiles, and finally to the goal tile, if they’re all connected.

Goal Tile

The goal tile will end the level when it has reached 100% power. This is achieved through connecting it to activatable tiles back to the source tile. Every pulse from one of the goal tile’s neighbors will give it a certain amount of power, while the goal tile will have power burn away at a certain rate (again, set in the editor).

So, that’s it for now. I’ll try to get some code after my self-goal to get the prototype done by Monday

So, I’ve been working on a new prototype: a rolling ball maze where you connect a power source to an end goal. The point will be to connect the two points and power the end goal to 100% to clear the level. Each level will be a small part in a larger map to power a certain object (I haven’t decided what the grand scheme will be, whether powering on objects in a room, or something more thrilling). My current deadline for finishing the prototype is this Monday, June 23. I have most of it worked out besides the power portion, but I already have an idea of how to do that!

Here’s a pretty picture (because I am the best at art).

Rolling ball on the source tile

Leave a comment below so I can possibly incorporate your idea into something.

So, I’m terrible about updating this, seeing as how it’s been almost a year. Small update on life, I guess: still working at the same IT job, still looking for a game company. I don’t have the capital right now to go full time with game development, so I might start saving up so I can quit for an amount of time without sending my wife and I to the poor-house.

Regardless, I’ve got a new prototype I’m working on.

Vertical Space Shooter

What I’ve done so far:

Player movement, also restricted to screen space

Extensible firing positions placed on ship

Not a ton, but it is just a prototype. I plan on changing up the way the player is clamped to the screen so that enemies can spawn. Right now, it’s physical bumpers keeping it on screen.

Whew! It’s been pretty crazy working on this tower defense so far. It’s been almost two weeks since I’ve gotten a post up here. Work has been stupid busy, along with real life and looking for an actual development job. So, here’s the progress update!

Towers can now be selected with the mouse. A window will pop up on the left side and show its stats.

Towers can change targeting priority through the tower selection window.

Enemy Pathfinding

I am using Astar pathfinding (a plugin) to move the Drifters. I’m using a Point graph where I set waypoints using an empty Game Object with cubes. I had to set the distance between getting the next waypoint at 0.1 because the Drifters were cutting corners. The Drifters will look for the waypoint tagged “End Zone”. This modular design will allow me to create any number of levels with predetermined paths.

Cash, Lives, Waves, and Tower Cost

Currently, the player starts out with $100. This value is kind of arbitrary because there is no cost structure to the towers. Right now, Missile towers are $30, Laser are $10, and Flamethrower are $20. The player collects money by destroying enemies. Each enemy is worth $2, so it is really easy to get lots of towers quickly.

The player starts out with a standard 10 lives. There are 5 waves in this current iteration. Not much to talk about with these points.

Other than that, I think that’s all I’ve done during the week! I’m definitely getting closer to wanting art assets and possibly (gasp) an artist.