Something Something Systems

I already wasted my “I need to stop coming up with titles title” over a year ago. (I’m assuming I only get one of those, although the person who actually looks at this blog the most is me, so I can do what I want I guess). Nearly every post I want to call that, but instead I have to think of something creative. Bah. Creativity.

I’ve been working on UI stuff recently. I hate UI design. That and level design. Really any design. Programming is the part of this whole thing I actually enjoy, I just do the rest for fun something to do to please the gods of the underworld because I kind of have to to make a game out of my code. I’ve decided (for now, this will change at least 12 times before anyone sees it) that the game should be presented as a screen on a virtual console that commands the player’s ship. This is mainly just because it lets me get away with a much simpler (for simpler, read “less requiring of any level of artistic skill”) interface, but also it might look kind of neat. Maybe? Who knows…

I experimented a bit with that and worked out that it is remarkably easy to do in Unity. Just set a camera to output to a RenderTexture and then make that the material on a quad and boom! You have a virtual screen. Getting inputs to work correctly with it is a bit more complicated and something I haven’t tried yet, but knowing my ideas are actually possible gives me some hope with this whole project.

I’ve also started messing around with a few basic interfaces, such as a panel to tell players what their ship is currently targeting. For the nth time I am running into my old issue of spending a lot of time trying to work out how to make a nice, fancy, generalized system to do something when that is entirely unnecessary. Struggling with this leads me to making some very bizarre notes around my work space:

IMG_0685.jpg
Yes, my design notes really are this much of a mess.

After spending about ten minutes working on problems like that my brain goes “I don’t want to do this anymore” and opens up Hearts of Iron 4, because world conquest is a lot more enjoyable than designing control systems for fictional spaceships apparently. Computer programming really isn’t all that it’s cracked up to be.

Desktop Wallpaper: The Game

Well this is some kind of achievement right here. I’m going to try and avoid my usual rigmarole about timing or not doing work because it has gotten rather boring to write. More importantly, since WordPress is calling this “367” internally, I’ve discovered my last post’s name was, incredibly, a coincidence.

So, did I actually do stuff? Yes, for once I did. I’ve been working on something internally called MLD66, MD66, and MD67 for over a year now without ever really saying what it is in any detail. The project names sprout from the fact that this began as an idea for Mini Ludum Dare 66 (okay apparently almost two years), and then after I restarted it once I dropped the L to make sure the filename was different, then after restarting again I switched over to just incrementing the number. What the game was when it began and where it’s going now are… different, I suppose. I first thought of the idea watching a video by Quill18 of Aurora4x that started with his desktop background of the solar system in an art style that I liked. I looked at that, somehow my thoughts crossed over with what I can only assume to be Mini Metro based on the final outcome, and I said, “Hey, you could have little ships flying between those and moving resources and make a simple little strategy game out of it.”

I tried to make that, and it didn’t work. Then I tried it a different way, and it didn’t work.  It kept getting weirdly complicated, or I would forget what the actual gameplay was supposed to be, or I just wouldn’t like how it looked, but so far the current incarnation is surviving. I’ve started taking notes on my ideas so I don’t lose sight of the goal again, and in its current form MD67 is something like Sid Meier’s Pirates! in space. You are the captain of a spacecraft under the control of a megacorportation that now controls Earth, and it is your job to go around exploring the galaxy and expanding the company’s reach (and profit margins) with you. You can slowly climb your way up the corporate ladder while also upgrading your ship and meeting other interstellar empires (who you will probably end up killing, because video games). It’s basically nothing like the “Quill18 Desktop Wallpaper” idea it began as (that was how I referred to the idea before I started building it) and I may still make that, but for now this is my project.

So far I have a model of a Galaxy split into regions of around one solar system each, but they can contain more, and ships that move around and interact with the planets and starts. Lately I’ve been making it possible for the ships to get into fights, which involved learning how to calculate the collision of polygons, and now they can. The next step is to make it so you can actually control ships in battle, and so the computer will too. Then I just need to make the rest of the game and I’ll be done. I guess. That seems optimistic, but I try to be hopeful. Or I’ll go try and learn Aurora4x again because that game is awesome once you know how to read the interface.

0x16D

So it’s been a year.  That’s a thing that happened.  Nearly two years ago I started this blog with the idea that “if I have something to answer to for work that I didn’t do, I’ll do work.”  We now know how that works on me.  In those two years I have written about 3 games I worked on, and none of which are complete.  I am still programming, and working on the same game I wrote about last January, although I’ve restarted it for the third time since then.  This time may be the one that works, and it may not.  I really would prefer the former, but I have an incredible lack of control over what I create apparently.  As for this blog, I’ve written a total of 21 posts, or 7/8 per month, which is actually a record for me compared to the two previous blogs I’ve had (yes they exist, no you shouldn’t go looking for them).  So that’s something then.

I haven’t come up with a title for this yet, but WordPress is internally referring to it as 365, which seems like either an incredibly fitting coincidence, or the auto-naming system just grabs today’s year number for want of something better to use.  365 is an interesting number; it just happened to be the number of times our planet rotates in every revolution through its orbit (roughly at least), it’s semi prime (73 * 5) which has interesting implications in cryptography, although 365 is a bit low to be of much use I would think (I’m going to be honest here, I know almost nothing about cryptography).  When you Google 365, you get a bunch of Microsoft sites selling you some version of Office (hey Microsoft, can we talk about your numbering systems at some point?  I’m seriously concerned that no one in your company knows how to count), and that’s that.

So what have I done in the last year, if I didn’t manage to make a game?  I got a driver’s licence after remarkably little anticipation, not realizing how useful having one would be until I got it.  I spent a month at the University of Toronto being shown a lot of math I don’t have the brain to remember, and learning that yes, quantum physics and relativity really are as bizarre as they seem.  I started my final year of high school, which is still a weird thing to think, after 13 years of school being  the largest institution in my life all of a sudden it’s going to be done, and then I’m supposed to know what to do from there.  I applied to get a Bachelor’s degree in electrical and computer engineering at a few schools.  I built a new computer.  I didn’t buy a Boring hat, sadly.  I finally watched Game of Thrones, and can now rejoin society without worrying about spoilers.  Some of those are even good things.

So that’s the year.  I really need to stop beginning sentences with so.  Oh well.  There are people who don’t understand the idea of midnight setting off fireworks outside, even though as I write this there are several hours to go until 2018.  The concept of New Year’s was always something I love, but an interesting mental game I’ve been playing lately is to mentally stop thinking about years, and start thinking about days, or hours, or seconds.  A different year seems like a huge thing, but its division is arbitrary, and a day is much more understandable.  In this vein, less than 7000 days ago I was born.  I find it possible to imagine winding back 7000 days more so than 17 years (yes, the math is rough).  Nothing seems like it can change in a day, but everything that changes has to on some day.  700000 days ago, Rome was the greatest empire in the world.  40000 days ago powered flight was new.  Somewhere in those 700000 days, Rome fell.  Somewhere in those 40000 days flight went from novel to mundane.  Somewhere in the last 365 days I wrote the last post here.  Somewhere in the next 365 I might even write another one.

Getting Back

So I think about three quarters of posts on this blog fall along the lines of “I did no work.”  So for today’s this week’s this month’s *checks date of last post* holy crap, I haven’t posted since October?  I actually did some work though…

Anyways, the point is that I am starting to try to get work done.  Lately I’ve been working on the system for MD66 to transfer resources between planets.  Resources are going to work on a similar model to the system in Hearts of Iron 4, where instead of representing an existing quantity of material, resource units represent a means to produce that much of a resource.  This makes trade more difficult, as instead of just moving resources from planet A to planet B, you’re telling planet A, “Hey, I’m gonna take up x amount of resource y that you produce” and then going to B and saying, “I’ll give you x amount of y.”  Except what if A gets blown up, or stops producing so much of a resource, or starts producing more and the player wanted to send a percentage to B, or they build a ship on A and that takes up 4 units of iron production for a while so x amount isn’t available to trade to B, or…

You get the idea.  The system I have built to solve this is…complicated at times.  It should (hopefully) accomplish what is needs to, and seems easy enough to change of expand.  Here’s hoping I didn’t forget something somewhere (which I inevitably did, so I don’t really know why I bother.)

Hopefully I will have more news before May, but incase not…I really have nothing else to say.

I Really Need to Stop Trying to Come Up with Titles

So the last post I wrote, nearly two months ago, was about how I haven’t been doing much game dev, and almost forgot I had a blog.  This one could really just be a ditto mark.  Really, I have been working, just extraordinarily slowly.  Mainly I’ve been focusing on MD66, which… is still not really a game.  I have a lot of very random parts of it done (a lot is a bit of an overstatement, some might be more true), but they can’t currently do much.  I’ve been considering going back to work on Gravelpath for a bit, because I think I need a break from complicated strategy games that I haven’t fully envisioned yet.  And also because I’m bored.

I Still Have a Dev Blog?

So I have a blog still.  Right.  Playing Dwarf Fortress nonstop for days makes you forget things like that.  But before I got sucked into that I actually was working on things.  Specifically, I decided to restart MD66 because I didn’t like how the old code was working, and I figured if I was going to redo it all I may as well just restart.  (And also because that way I get to feel productive while all in all not making any sort of actual progress towards anything.)  Mainly I’ve been focusing on getting basic data structures defined so far, and then I set them up to properly tick at an adjustable speed based on real time.  And then I thought, “Hey, I haven’t played Dwarf Fortress in a while!”  And then nothing.  For days.

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.