Art is for Droids

So I did all my re-structuring (that was actually pretty painless), and I set up source control and Unity Cloud Build (a lot less painless), and now everything works.  Great.  Now I need to work on combat, and that means I need some basic placeholder art to show what is happening enough to respond to it.  As I said in my last post about art, drawing is not my strong suit.  So for three days now I’ve been making variations of a black and white character.  Remember, this is just for basic testing.  And I spent THREE DAYS on it.  The really sad part is that after three days, this is about all I have to show for it:

Screenshot (135)
Three days, and I ended up with seven variations of white dude of various sizes. Well done me.

So, yeah.  I can’t art.  And I need temporary art.  Three more days, here I come!

Moduralizing

I’ve just realized that, for many reasons, much of the code currently written for Gravel needs to be restructured and refactored into a more modular system.  This epiphany came when I started thinking about adding a basic bot script to test having several characters on screen at once.  Currently, the player is controlled by three separate scripts: A central “controller,” one for movement and one for combat-related things.  All three are set up in a way that means they will only work for a player, and couldn’t be easily used for AI controls.  However, if I wrote entirely separate bot scripts for movement and other tasks, I’d be essentially repeating work that was already done.  The obvious solution, and the one that I am about to enact, is to separate the functionality of my scripts from their input mechanisms, so that the same code can be applied to a player-controlled character or one controlled by the computer and act in the same way.  I should do that then.  I was mainly just writing this post to procrastinate.  I hate refactoring code.  Actually, this isn’t technically refactoring, but who really cares?

A Confession

This is a confession.  Not, as usual, to the fact that I have again procrastinated my way through two weeks of my life with nothing to show for it (I did do that, I just feel no need to apologize for it).  Instead I am confessing to this:  I just wrote this code, and I feel ashamed about it. (And also I found out that WordPress has syntax highlighting and I really wanted an excuse to post code.)

for (float i = -(colWidth / 2); i < colWidth * 1.6f; i += colWidth) {
			Debug.Log (i);

			Vector3 u = grabCheck.position;
			u.x += i;

			Vector3 l = grabCheckLower.position;
			l.x += i;
			bool upper = Physics2D.OverlapCircle (u, grabRadius, grabbable);
			bool lower = Physics2D.OverlapCircle (l, grabRadius, grabbable);

			if (upper && lower) {
				wallJump = true;
				return;
			}
		}
}

It’s mainly the for-loop that bothers me here, specifically the conditional statement.  This is by far some of the hackiest code I’ve ever written, and that makes me upset.  (And this is after I removed the colWidth + Mathf.Epsilon part.  That was even worse).  Besides being really hacky this code is also inefficient, and that bothers me.  So why am I complaining about this?  Well, mainly because I needed some way to start this post, and also partially because I really did want to use syntax highlighting.  Anyways, now that the post has been started, I suppose I should actually write something.

I keep having to go back and look at past posts to see what I have mentioned here before and what I haven’t, and now it occurs to me I never explained what my new project is.  Well, there’s no time like the present so here goes.  If you look at the categories and tags on this post you’ll see “Gravel” listed in both.  That’s because I’ve code named my new game Gravel Path.  (No, there really isn’t any reason why, I’m just bad at naming things.)  Gravel Path (or Gravel as I will refer to it from now on) has evolved from an idea I had a couple of months ago that I won’t get into, mainly because it has no connection to the current game whatsoever, and also because I may use that idea in another project someday.  What is has become now is something vaguely-but-not-really related to a fighting game, crossed with a bit of TowerFall Ascension and some Nidhogg.  (I’ve just realized that that sentence is probably useless to someone who isn’t into games at all, in which case I recommend looking up both.  I’ve also realized that I totally overuse brackets.)

Except it really isn’t, at least not yet.  Right now it’s a strange player sight jumping around temporary platforms with basic mechanics, albeit the best jump I’ve ever programmed but still.  A lot more work is needed before it will be anywhere near playable, but it is a start.  So now I’m going to stop talking and actually go do work so I have more to write about next time.  I have been advised that saying “I get nothing done” over and over is bad for viewer retention.

Recombobulating

Writing a blog is difficult when you have nothing to write about.  Which means that writing a dev blog is hard without development.  And there’s been very little of that lately.  Between exams, vacations, the Steam Summer Sale and Hearthstone (which I am terrible at by the way) I have done literally almost nothing in the last month.  I may be really easily distracted.  Actually, I am really easily distracted.  I’m having trouble staying on task even while writing this, I keep tabbing out to write random C++ stuff that I have no use for (I just finished reading the book Think Like a Programmer by V. Anton Spraul, which made me want to learn more C++, since I never really worked in it before).  I did get some basic movement mechanics completed on my newest project, which is some sort of platformy-thing.  And that’s about it.  Seriously, I get nothing done.