Monday, July 30, 2012

A bit of functionality, a lot of fluff.

I feel like I'm in a mode where I really want to develop more of the basic game mechanics so that I can get to having something really playable, but I also feel like a lot of the game mechanics won't be exactly that exciting without a bunch of different units.  For example, I just made it so that you can select which units you want to summon, and you can only buy them if you have enough money for them.

But as suspected, when your only units are "tower" and "knight", it's really not particularly exciting.  So I started working on some graphics for more dudes.

I fixed the archer animation.  Now he has a normal idle stance and a combat idle stance, so he doesn't go back to standing straight every time he fires an arrow.


Yes I need to fix the weighting on this mesh it is terrible.  But I also got a lot of work done on the story mode GUI.  And by that I mean "modeling a big ol' book."


Now that I see it laid out like that, I feel way more productive.

Monday, July 23, 2012

Boringest progress!

Well, I spent all weekend doing some work that really needed doing.  I rewrote units and squares and how they reference eachother.  Now, instead of using Unity's built-in move-to script, I just manually adjust the position over time.  This allows me to continually keep a reference in each object to what square it's standing on, which will be really helpful for targeting things and selecting units.  And it means that I can move people without using character controllers, which means that dudes no longer walk into and over towers.  They just walk through them.  I mean, I can decide how I want collisions of friendly units to work later.  I just like that I can choose how they work, and not "it automatically breaks your game."




I also did some work on shaders, and they're still a mystery to me.  I did do some messing around with a selectively transparent shader that let me script "make objects transparent when the mouse cursor is behind them" but I then turned that functionality off because it looked shitty and made me mad.  I need to work on writing my own shaders.  That's just super-de-duper low-priority right now.

In other news, I also made a male mesh.  This one is going to be for my sexually objectified elf archers.  I like it a lot actually.  I simplified the rig, and the features, and the fact that he doesn't have a face makes him way less uncanny valley creepy.  I might just make multiple copies of this guy and edit the mesh for different units.  Then I could really easy put a lot of customization and animation into the face by doing it with paper paste-on cutout-style instead of modeling one.

Also, my foot hurts so I can't deadlift, so elfman is doing it for me.



Thursday, July 19, 2012

Towers!

There is  still a lot to be done with ironing out the way the code is set up, but towers are a thing now.


What you are looking at is a bear walking towards a knight sitting in a tower.  What will happen here is that the bear will pound away at the tower while the knight attacks the bear.  The knight attacks as normal, but doesn't move.

I need to redo movement and the cursor, but with this kind of architecture, I think I could do really neat things.  Like, you could theoretically mount any unit on top of any other unit, and the "top" unit would do the attacking while the "bottom" unit did the defending.  I need to think about how I want this to work.

Saturday, July 14, 2012

STOP... ... ... Pause Menu Time!

I started labeling my images with the date, and then if I had more than one from one day sticking the time on there.  This makes things mildly depressing.

I made this mockup at 9:45.

Aaaaaand this one that's actually in the game says 11:15.


But hey, I've got a PAUSE MENU that WORKS.

Saturdays are pretty much the best.

I got a bunch of real life stuff done today, and still had plenty of time for game work. I don't, however, have time to demonstrate it in an exciting way. But my bears now move and attack properly, they look like bears, and they drop coins in the correct locations, and knights cost money to summon. That's the basic functions of the battle system mostly done. Now I all I need is a GUI, a story mode, a kingdom editor, a system for procedurally generating content, and like a bazillion more models and units!

Also sounds. Lots of sounds.

Thursday, July 12, 2012

I feel like a human!

Instead of locking myself in my room with my computer today, I socialized! And by "socialized" I mean "watched Archer and My Little Pony with my roommate". While doing concept art on my iPad. Good lord I love this thing.






Edit:  ahahahaha  This is totally a bear.


Tuesday, July 10, 2012

I don't know about U, but I have got some stuff done.

Some UI that is.  I started it.

Right now, all it does is display how many coins you have collected from bears, but I'm working on a mockup for the general UI design for the battle screen.
Cropping is for losers.

I also did a lot of behind-the-scenes fixing.  I spent a lot of time bashing my head against Unity's physics engine.  It's kind of hard to be like "No, I don't want any of these features, I just want these guys to move left and right and do shit when you click on them or if they smash into eachother.  I don't care about realistic physics in any way shape or form."  Also coroutines were sent by the devil to torment me.

Dear whoever wrote the Unity documentation,
The following is really difficult to understand:


using UnityEngine;
using System.Collections;
public class example : MonoBehaviour {
 IEnumerator Do() {
 print("Do now");
 yield return new WaitForSeconds(2);
 print("Do 2 seconds later");
 }


 IEnumerator Example() {
 yield return StartCoroutine("Do");
 print("Also after 2 seconds");
 print("This is after the Do coroutine has finished execution"); } }

The following is not:
using UnityEngine;
using System.Collections;


public class SelfDestroyingObject : MonoBehaviour{


void Start(){
 Debug.Log ("Object Created");
 transform.position = new Vector3 (0,0,0);
 StartCoroutine(WaitThenDestroySelf());
}


 IEnumerator WaitThenDestroySelf(){
   yield return new WaitForSeconds(2);
   Debug.Log ("Object Destroyed");
   Destroy (gameObject); 
 }


If you run this code, it will Debug the phrase "Object Created", move the object to (0,0,0), wait 2 seconds, Debug the phrase "Object Destroyed", then destroy itself!




Oh hey! Look! I just wrote up a freaking example that in some basic way describes a thing that a game object might do, then afterwards I SAID WHAT THE CODE DID. WOW THAT WAS REALLY HARD. WAY HARDER THAN WALKING MY BRAIN THROUGH SEVERAL LINES OF METHODS NAMED "Do Stuff".

Sorry... I get mad when techy people make simple things totally indecipherable.

Sunday, July 8, 2012

Very important update.

You know, I think I'm just going to leave this here, and instead of explaining what I've been up to for the past few days, just let you wonder what on earth it is trying to indicate about my progress on this game.



Wednesday, July 4, 2012

Things move!

I am so excited that things move that I am posting a video of moving things.



It definitely has its problems.  I need to implement a cursor object, rather than putting OnMouseOver code on all the squares, and I need to pretty much implement everything as a finite state machine, rather than plopping everything in the update function, but I just want to get things moving and doing things!  And they move and do things!

Monday, July 2, 2012

IT'S ALIIIIIVVEEE!!!!

Well, not really, but the pieces move!

Yesterday I spent a ton of time scripting a bear that walks to the right and attacks and dies, and a knight that walks to the left and attacks and dies, and then I realized how stupid that was and that it's actually possible to make something inherit from a monobehaviour and still function as a monobehaviour.  So I refactored my code so that "MovableUnit" is a class, and Bear and Knight both inherit from it.  Now it works exactly as it did yesterday except it's organized better.  Yeah, welcome to the glamorous world of indie game development.  Today my Bear cubes look exactly the same, but they're WAY BETTER.  Trust me.  And this means that adding a lumberjack cube that chops down trees, and adding functionality to the bear so that he sleeps until someone tries to chop down a nearby tree etc. etc. will all be SUPER EASY.

No pictures.  Just imagine the old one but with a teal cube and a white cube next to eachother, occasionally Debug.Logging "Knight Attacks Bear!" or "Bear attacks Knight!" until one disappears, and the other moves off the screen and says "I WIN!"

Sunday, July 1, 2012

GRASS!

One of the best things about doing an entire game by yourself is that you can switch between different tasks when one gets frustrating.  All of yesterday's behind-the-scenes work was getting grating, so I started playing around with borders.

I think I want territories next to you but that you aren't actively currently interacting with to really obviously look like what kind of area they are, but not actually render every thing that exists there.  Both for hiding the Goblins' secret battle plans from the player, and saving processing power.  So I think I'm going to have a 3-deep cutout border that pops up from the edges every time you switch from map view to kingdom view.

I know that probably means nothing to anyone but me, but trust me it will be super-adorable when the textures/meshes don't look like shit.  I extruded a zig-zaggy line and called it a grassland.