Sunday, June 18, 2017

Making The Elementalist, World Building Tool

In the time I have managed to scrounge between work and other life I have been plugging away at creating content for The Elementalist.  I am pretty sure I have bitten off just as much as I could possibly chew but I am excited by the relatively rapid progress I have been making thanks to a couple of updates I added to my content creation tools.  But rather than just typing about it I thought I would put together a short video showing off a little of the tooling I've been working on to help me get this project done.  So without further ado, here's the video on YouTube:  https://youtu.be/SHfahUiFRUk

Hope you enjoy, and thanks for checking it out!
Cheers,
Zack

Monday, May 22, 2017

La Vida Loca

I had forgotten how hectic it is having a newborn in the house and still trying to find time to work full-time and sleep enough to stay alive.  Suffice it to say development for the last couple of months has been pretty limited, but I have managed to pull together a few more improvements to the game play, tools, and the particle engine.

Now when you light the fire in your cabin you get to see the smoke come out the chimney and the fairies trickle glowing fairy dust as they fly if you break their jars!

So I'm not all dead (there's a big difference between mostly dead and all dead; ask Billy Crystal) and the project continues, just a bit slower than before.  As the baby transitions to sleeping more over the coming weeks and months I look forward to digging back in and getting the final content put together for the game. More news to follow.

Peace, Zack

Friday, March 24, 2017

Demo Updates

It has been a crazy month or so since my last post.  My third child came a bit early, just after my last post actually, and pretty much since then I have been scrambling to get enough sleep to be able to spell my own name.  Thankfully we have had a lot of help from a great community of family and friends so I have managed to get a little bit of work done on The Elementalist.

Based on super feedback from some good folks at the Portland Indie Game Squad as well as a friend working down at Blizzard I have refined a few elements of the game play.  Thanks everyone for the detailed thoughts, always greatly appreciated!

Strafe!

The most noticeable new change is the ability for the wizard to "strafe" while moving in a specific direction.  For example if you are holding down the "right" key and then push the "up" or "down" key you will move diagonally as directed while still facing your original direction.  This should hopefully make the movement seem a little more fluid and reduce some WASD fatigue for those using the keyboard.  This works while dragging around objects as well, which brings us to the second update!

Action!

The action formerly known as "Grab" has been superseded by the more generic "Action" command.  The "Action" command is used to interact with NPCs and some objects (switches, beds, the floppy of saving, etc) as well as to attempt to grab things to move.  This should allow players to interact with NPCs and objects only when you desire, rather than simply when you bump into them.  As part of this change I updated the tutorial to cover the added feature and updated the cabin a little.

Talk!

The final changes were to the dialog system.  First up was to add the ability to immediately exit a dialog with the standard "UI Exit" key or button, which can cut things short if you didn't really mean to start talking again (though this should hopefully happen a lot less now that you have to press the "Action" key to start the dialog in the first place).  Second I added a method for highlighting key words and phrases in the dialog to call out important bits and help those who don't like to read lots of expository text get the gist of the conversation and get going.

Just for fun I colored in a sketch I did the other day while hanging out with my kids.  Here is a bit of concept art for the forthcoming enemy "Witchdoctor"!



Alright, that's all I've got for today.  If you have any other great ideas please let me know!

Cheers,
Zack

Tuesday, February 14, 2017

Custom Controller Bindings!

I have finished adding in support for custom controller bindings so even people who are not using an X360 controller on their PC should be able to use their controller to play!

Downlad The Elementalist DEMO

The new UI is accessed from the same location as before but the menu option is now "Controller Config".  If you have a X360 controller connected it should give you the option to use default bindings (to select from one of the 3 default setups as before) or configure custom bindings.  If you don't have an X360 controller plugged in you will go directly to the custom controller bindings menu.

In the custom controller binding menu use your arrow keys or other configured navigation to highlight an empty control element, press ENTER, and then simply enter the desired control on your pad, joystick, or whatever.  Note that this UI does not bind key or mouse events, those can be bound under the keyboard configuration menu.  However it does allow you to use more than one controller as input if you are feeling super creative.  :-)

One thing this does not currently allow is the use of a control button as a "Meta" input (like shift or control on a keyboard) so you do need a controller with a fair number of buttons in order to bind all of the available controls.  This is something I would like to do but it is lower on my list at the moment.

If you have success or troubles with any specific controllers I would be interested to hear it.  I have not been able to test exhaustively but so far I have had relatively good luck aside from the Xbox ONE controller oddly.

Cheers!
Zack

Sunday, January 29, 2017

The Elementalist for Linux!

The Elementalist DEMO has been built and lightly tested on Ubuntu 16.04 in both 64bit and 32bit versions!

As with adapting to any new platform there were a few wrinkles that had to be ironed out but I think my ironing was relatively successful and should improve the other installations in the future.  Linux is definitely the most restrictive operating system to install into and getting the permissions set up in the file system to allow saving the game required a bit of fiddling but the end result seems like a solid cross-platform solution that should hopefully endure.

I also found a number of minor differences in how Ubuntu's window manager works with setting up windows and screen buffers that forced a few minor alterations but I think everything is once again smooth across all platforms.  Phew!

I have not finished building and testing with Fedora, but I have also put a raw zip file here that contains the executable java as well as the content and launchers (.bat file for Windows and bash shell script for the rest of the world).  It should be identical in function to the versions installed by the more full featured installers but it does not include a JRE so you will have to have Java 8 already in your path.  If that sounds like craziness to you stick with the installer.  :-)

If you know you have Java 8 (or don't mind a little DIY to get it) the zip version here should actually work on any platform.  Feeling lucky, punk?  Give it a try!

Let me know how it goes for you!
Cheers,
Zack

Sunday, January 22, 2017

The Elementalist for Mac!

Phew!  The wait is over for all you fine Mac users out there!

As with the last post this ended up being more than I had initially bargained for, but now is the time to iron out the wrinkles.  What I discovered after getting the installer working was that the Mac was not sending all of the key events that I was expecting through the standard Java keyboard listening interfaces.  When I held down a key I would get a few events but then it would just keep telling me the key was being released...  Argh!!!  Yet another keyboard ruined with my face.

This is due to the "accents" pop-up that Mac enables for users by default.  There is a relatively simple way to disable it via the Terminal (see this post if you are curious: How to disable accents and enable key repeat in OSX), but as before I did not want to have to suggest that users jump through any bonus hoops to try The Elementalist out.  I spent a lot of effort trying to get around this in various ways but the short of it is that native Java just does not get these events from the operating system and there is no way to disable the accents menu programmatically through Java.

Luckily I was able to use the native interface library that I have been using to detect controller inputs to get the keyboard inputs at a lower level, bypassing the accents feature altogether.  So far I am really happy with those results and I hope you will be too!

Tomorrow I'm going to see if I can't get some dual boot action with Ubuntu set up on another machine and get started on the Debian based installer.  But for tonight I'm going to enjoy this small win with a delicious malt beverage and wish you all the best!

Cheers,
Zack

Friday, January 20, 2017

The Elementalist Alpha!

So first, I have really exciting news: The Elementalist Demo for Windows is ready to rock!  I have play tested it fairly extensively on Windows 10 and also done a full play-through on Windows 8 and I am ready to get some reactions from the world beyond my own keyboard.  The demo is packaged as a simple executable file (.exe) that will install the game for the current user in the local user directory (e.g. C:\Users\Zack\AppData\Local\The Elementalist DEMO) and make an entry in the start bar as well as a shortcut on the desktop.  You shouldn't need to do anything other than download, double-click, and (hopefully) enjoy!  It can also be uninstalled from the normal add/remove programs control panel or just deleted directly, though I don't know why you would do that.  ;-)

I was intending to have downloads for Mac and Linux ready to go as well but I ran into a few stumbling blocks along the way.  I am currently hard at work to get the Mac version ready and will then be devoting myself to the raw zip version, the Linux Debian based version and finally the Linux RPM based version.  I think I am pretty close on the Mac front but it ended up being a bit more of a struggle than I anticipated... hold onto your hats people, it's story time!

Last week after I published my last post I sat down to test my Mac installer with my wife's aging Mac Book Pro.  I had done my research about making disk image (.DMG) files using OSX disk tools and had done a trial run so I was pretty confident I could make this thing happen, albeit in a more manual way than I normally prefer.  That is when I discovered that her Mac didn't have a recent Java version, so I couldn't even try my game before I delved deeper into testing the installer.

Ok, no sweat, I've installed hundreds of versions of Java on countless machines over the years.  So I head over to Oracle, download the Java Runtime Environment (JRE) and install.  Everything appears to go smooth, no errors, but it doesn't work... at all.  So I head to the Internets and start digging... in a couple minutes it is clear what the problem is, her Mac is so far out of date that it won't install modern Java.  Alright fine, I'll just back up all her content (just in case) and upgrade to the latest and greatest version of OSX.

Believe it or not, the OSX update goes smooth and the backup remains just that.  Now we're cooking.  I re-run the JRE installer and it appears to work, huzzah!  I try to run my java based installer again, but I get this cute pop-up that says I need to install a Java Development Kit (JDK) in order to run Java command line tools.  At this point I begin to get annoyed...  I don't want to be explaining to all you good people that you need to install a JDK even though you aren't actually developing software because you want to run "java" outside of the browser.  Ok, a few deep breaths and some searching on the Internets says this happens all the time because Apple stopped packaging their Java versions but there are some vestigial linkages left or something; whatever, it's something that Adobe is telling their users about on their site, I guess it's fine...

I start writing a blog-post explaining the process I am going through in case someone else has to go through something similar.  No big deal, there are a few references to the fact that you can make this go away by downloading the legacy Java 6 version for Mac, then updating to a modern version.  Ok, bait swallowed, I get the legacy version installed and the error goes away.  I re-install the current Java 8 JRE and launch my installer.  It starts up but immediately exits with an error that says I need a Java 8 version installed and I have Java 1.6 something....

I immediately karate my keyboard in half with my face.  Oh, well, actually it's a split keyboard so it was already in half... Phew!  No need to buy a new keyboard today.

Deep breaths, deep breaths....  I open up terminal and type "java -version" and by golly it really does say 1.6 something.  So the JRE is not being picked up by the system, neat.  More internet digging and a relatively steady stream of cursing leads me to the overwhelming conclusion that if one wishes to use "java" for anything that doesn't launch out of a browser on a Mac one had better darn well install the JDK, not the JRE (here's a good read about how to make the JRE work for you if you really, really want it: https://oliverdowling.com.au/2015/10/09/oracles-jdk-8-on-mac-os-x-el-capitan/).

My post about how to make the game work on a Mac is getting a bit longer than I would like...  This is not the kind of task-list I want to set up for people I probably like.  Ok, a few more deep breaths, I've got the JDK install taken care of now and the terminal happily reports the correct version of Java is installed.  What else could possibly go wrong?

I double click my installer again and I get the message that I have a Java 1.6 version installed and it just isn't going to cut it.  This is probably the moment to turn away and cover your ears.  DIRTY M#($&*  F(&*@## S((#$$&&  H@*&&$) F(*#@@)(  F*&@& S*@*!  Ok.  The Mac and I agree we can no longer be friends but we are going to figure out why my children can now make a sailor blush.

After digging through the source code for the installer that I have been trying to use I see that it is looking for the "Current JDK" link where Mac installs it's JDK instances.  Ok, so why doesn't that work... well, the current version of Java just puts it's link in as "Current", the old link (symlink) for "Current JDK" points at the version of Java from Apple (1.6) instead of the 1.8 version which is for some reason in a directory named "A".  Ok, fine.  I will just un-link and re-link the [EXPLETIVES DELETED FOR THE FAINT OF HEART] "Current JDK" to point at "Current".

Except I can't.  When I attempt to escalate my privileges to re-write the link with sudo (it's a Linux utility that tries to run a single command as an admin user) it asks for my (well, technically my wife's) password.  But she doesn't have a password... sigh.  Mac won't let you run sudo without having a password for the admin account.  OK!  FINE!  I make my wife pick a password and write it down myself because I know if I don't it's my head that will later roll for all of this.

GREAT!  FINE!  NEAT!  I run the sudo command again in a new terminal window with the correct user password and all the escalated privileges I should have.  But it refuses to change the link.  You have got to be $*#(@* kidding me.  The Internets abound with information telling me that SIP (System Integrity Protection), a newly added feature of OSX, prevents users from accidentally causing their computers harm by disallowing some actions it deems dangerous, which apparently includes renaming the link between my installed Java versions.  All I have to do is reboot, hold down a couple of special keys, get to the terminal, enter the secret "disable" command, reboot again, and I should be able to change that link.  Nothing to it!

I stare at this for a long time with my forehead bleeding profusely and dripping broken pieces of keyboard in my lap.

I honestly can't imagine making someone who wants to try to play a game go through this kind of punitive slap-stick computer hazing.  It is time to start looking for other solutions once the head-ache dulls a bit....

Fortunately after a moderate hunt I discover a better solution: packaging the required Java Runtime Environment along with the code it runs and the application data it uses.  A tool that does this (javapackager) was relatively recently added to the Java Development Kit and promises an end to problematic installations... once I can figure out how to use it.  This takes longer than expected considering my relatively intimate acquaintance with Java because the documentation is sorely lacking (and in some places outright lies) and the actual implementations require different arguments from machine to machine.  The other major draw-back to this solution is that it requires actually packaging all of the contents on a machine of the same type, which means building Windows installers on Windows (using x86 and x64 libraries), building OSX installs on OSX, as well as the two major packagers for Linux: Debian and RPM, both with x86 and x64 architectures.  So I have essentially shifted the burden from the user onto me, which is definitely the right trade-off, but it comes at a cost to release speed.

And that mostly brings us up to the present.  I have been working to refine my build processes to produce painless installers that "Just Work".  As it should be.  Even though this is an demo release I feel like it is important that it be as smooth as possible given my own limited ability to test on every possible platform.  So non-Windows users please bear with me just a few more days while I sort out the details for each platform and give it a whirl.  OSX is almost ready to go and then I will be moving on to Ubuntu (Debian) and finally Fedora (RPM) packagers.  Keep your eyes on this space if you are in those camps.  If you are a Windows user get with the downloading and let me know what you think!

Cheers,
Zack

Friday, January 6, 2017

Holidaze

Hard to believe it has been a month since my last post here!  Somehow I always expect there to be time for catching up on sleep and getting some extra work in on my personal projects when I have time off from work but I don't know if that has ever actually happened.  It certainly didn't over the most recent holiday break but I did still manage to make some really great progress towards the Alpha release.


Over the last month I have nailed down almost all of the content to be included in the Alpha; I decided to expand it just slightly to include a few more secrets and side quests and I am really excited about the current state of it.  I have also been spending a lot of time (much more than I really want to actually) packaging it all up into something that should be easy to install and play.  While it is a breeze for me to play from my IDE (Integrated Development Environment, aka the thing I type in to make the program) getting it to install and run from a couple simple clicks takes a bit more work.

Currently I have a Windows executable (.exe) and installer (.exe) that both seem to work (yay!) as well as a plain zip file with Windows .bat file and *nix shell script.  I also have the start of the Mac OSX .app and possibly something that might install on a Linux desktop.  This week I am planning to finish the Mac and Linux installers if I can so that hopefully next week's post will contain links to the actual goods.

For those who are interested in the nuts and bolts, The Elementalist is written in Java and requires a Java 8 runtime.  The Gradle build tool does a great job of assembling .tar files and .zip files that system admins and those familiar with Java can be relatively comfortable working with but for most folks this packaging really isn't user friendly.
  • Windows users typically expect an executable installer that can be double clicked to start an installation program that will guide them through a program installation with another executable being added to the start menu and possibly the desktop upon completion.
  • Mac OSX users mostly expect a disk image (.dmg) that contains an application (.app) that can either be an installed by double clicking or simply dragged to the Applications folder and launched.
  • Linux desktop users expect to have to compile the binaries themselves after searching out the dependencies on internet forums and tweaking a number of build files for their specific system environments (mostly kidding, sorry *nix folks!).
Making all of those things happen with software from the Java ecosystem that plugs into build tools is unfortunately like assembling a tiny ship in a bottle.  It can be done but you'll probably be old and angry when it's finished (or older and angrier in the case of us already old people).  Anyway, I think I have most of those dogs licked (or however that goes) but I want to get all of the installers tested at least once before I go foisting them onto you good people, so bear with me just a few more days.

We are almost ready to kick this party off!
Cheers,
Zack