Updates: May 2016

May 15, 2016 at 7:03 pm (Computer Science, Java, memory palace, Programming, Rant, Thinking) (, , , , , , , )


It’s been a while since I’ve posted about my recent endeavors outside of painting (this is by design). There’s been a fair amount of things keeping me busy and stressed. That being said, I’ve started putting together and working on my goals for the next several months. A large part of this will be getting my full-stack technical skills back up to a competitive level. I’m going to be focusing mostly on my Java skills as well as commonly-used libraries, since it’s been a while.

As part of this, I spent a bit of time building a small app to back up my development files. Mostly because I needed a good, automated process and didn’t want to go shopping for an app. I needed something that can backup different sets of files at different times, so I could selectively backup specific projects and images, but also my full dev repository. It seems to be working according to my tests, but I’ll be trying it out soon to find out.

I also plan on picking up Python. I think I will use Python 3, although I want to be knowledgeable of the differences from 2 to 3 as well so I can read/port existing code. It shouldn’t take long to pick it up, but I have to learn the specific syntax and rules such as scoping, etc. Some sort of project would help, so I’ll be trying to think of more home automation tasks I could fulfill with Python apps.

Lastly (for this post), I plan on giving my memory palace an upgrade. I need some more rooms, and I need to finish storing algorithms in it. I’m missing tree and graph algorithms (which are pretty important), and I wouldn’t mind adding some more details for implementation as well. This should ensure that I don’t have to review algorithms, data structures, and design patterns when I need to use them; I’ll have them permanently stored.

Advertisements

Permalink Leave a Comment

Ant + Processing = Grief

July 4, 2014 at 8:20 am (Computer Science, Game Development, Java, Processing, Programming) (, , , , , , , , )


This will be a humorous post coming right after the article about how great automation is. After I finished writing my Ant scripts for automating my Java project, I ran into a wall; Ant can’t update a Processing library while the Processing Development Environment is running. For some reason, Eclipse is able to deploy JAR files and have them overwrite the existing library while the PDE is running though!

So now I have to figure out a way to make this work, or else I have to ignore all of the automation I put in. I may still use Ant to back up my code projects to an external hard drive, but that’s about it right now.

And then there was sadness.

Permalink Leave a Comment

Automation 4 U

June 28, 2014 at 2:29 pm (Computer Science, Game Development, Games, Graphics, Java, JavaScript, Processing, Programming, Rant, Teaching) (, , , , , , , )


So, this will be nothing new for some of you. This isn’t even something new to me; I have a day job where I’m a professional software engineer and we do this at my job all the time. I’m talking about automation and automated processes. This could be anything in your project development process where you have the computer automatically do something for you. An example could be a script that backs up your files to a different drive that you can just run when you want. It could be as complex as a build step that automatically deploys your binaries or runs unit tests.

My disclaimer: A lot of this is technical stuff and directed towards programmers, but even if you’re a graph artist, you can still benefit from this. Everybody that uses computers for projects will need to back up their files for instance.

I’ve only recently realized just how important this all is for regular, personal projects. I’ve always known that it saves time, but my initial mindset was that I’d rather get my project up and running and THEN waste time implementing the time-saving stuff after I get it together. I’ve been reading this book I bought from Amazon that talks about indie gaming from a business, “get your act together” perspective. The book can be found here. I’m still reading it, and some may or may not agree that it’s a good book, but it provides some good ideas for how to take your hobby projects to the next level and keep your process renewable. This means saving time and money on mundane processes, etc.

I am still in the process of automating many aspects of my project, but it really crept up on me just how much time I was wasting on manual things. Here are some of the processes I perform just for my Zombie Mansion project:

  • Backing up files from two areas on my system to my external hard drive
  • Deploying JAR files from my Eclipse solution to my Processing solution to use in my game
  • Removing alpha channels from sprite sets (I built a tool to do this, but it’s still manual)
  • Putting together standalone builds of the game software
  • Packing and compressing image resources for game builds
  • Merging animation sequences together for access by the game engine

These are just things I thought of off the top of my head this morning. Some of them will be easier to do than others, and some of them are specific to my project. All of them eat up time though and are tedious things. Here are a few tips and ideas for how I plan on solving some of these issues though. Please read through just in the off chance that it inspires something or gives you an idea or two.

Deploying JAR files to another solution

For this, I intend on using ANT with Eclipse. This is pretty much a standard for serious Java projects, but it’s taken me a long time to start to improve my processes (usually I want to work on the fun stuff or the stuff that has a visual out-come). Visual Studio has its own build steps and things you can run. Alternatively, you could write a script/BAT file that will grab the files from your output directory and deploy them. This doesn’t require a full set-up of a 3rd party tool and it should be quick to do. It just might break and won’t be as robust.

Backing up project files

This is something I’m already part way through implementing. I’ve written most of a BAT script that will grab the project files from specific directories and dump them in one area so I can back them up (it will optionally zip them as well). To make it a bit easier, I’ve started using virtual drives, but this isn’t necessary. If you’re interested in what virtual drives are or how to set them up easily, email me or post a comment. I can give you some resources or just write an article. Here is a snippet of what I have so far (I’ve been taking bits and pieces from the interwebs, so most of it is borrowed code anyway).

I wanted to dump the files into a folder that would be timestamped so I wouldn’t have to worry about overwriting anything. This is one way of how you’d accomplish it using a BAT script in Windows:

set hour=%time:~0,2%
if "%hour:~0,1%" == " " set hour=0%hour:~1,1%
set min=%time:~3,2%
if "%min:~0,1%" == " " set min=0%min:~1,1%
set secs=%time:~6,2%
if "%secs:~0,1%" == " " set secs=0%secs:~1,1%
set year=%date:~-4%
set month=%date:~3,2%
if "%month:~0,1%" == " " set month=0%month:~1,1%
set day=%date:~0,2%
if "%day:~0,1%" == " " set day=0%day:~1,1%
set datetimef=%day%-%month%-%year%_%hour%-%min%
echo %datetimef%
xcopy "C:\Test\A" "C:\Test\B\Backup\%datetimef%" /E /I

This will copy everything in your source directory (the first argument) and store them in a custom folder with a timestamp. You can use multiple source directories as well if you have things spread out like I do by just putting in an extra line. The last two arguments are switches to tell XCOPY to use the full source directory (and children) and to assume I mean the destination should be a folder.

Removing alpha channels from image resources

This one will be a bit more complicated. I have a tool I wrote to do this, but I want to streamline this. Now, I wrote up a full project plan with a product backlog, but then I realized even that was too ambitious. I plan on taking some items from the list, but I also plan on it being a purely script-based tool. It will run on the command prompt and will use my engine’s scripting engine for customization (as opposed to using config files). At this point in time, it’s cheaper for me to use scripts than config files since I don’t have a streamlined approach to reading them yet. ANYWAY, I will be writing this as a project in my game engine solution and it’ll have a unit test project to go with it. I’m still working out what tests I will need for it since it works with images, but it’ll be centered on testing the RGB values of generated images before and after the script runs. It’ll also test image sizes for when I add the feature to compile multiple animation sequences together.

Anyway! To summarize this; automation is good. It saves a HUGE amount of money (time is money). If you ever have dreamed of selling a game, you NEED to get in the habit of doing this. The more you do it, the easier it will become and the more effective you will be with your time. Be as lazy as possible with your projects; that’s why we’re programmers! (Although you don’t need to be a programmer to benefit from this).

 

 

Permalink Leave a Comment