Sunday, October 13, 2013

Your anti-virus hates me

Ugh. So maybe Java wasn't the way to go. (Although I do enjoy it as a programming language.) And if I do want to publish a game, I don't want to publish it from my own website. The anti-virus messages will deter most people from downloading my stuff! Self-publishing a novel doesn't have that problem. E-books aren't seen as dangerous to people's e-readers. At least not with current technology.

It's like this: I decided to start with my simplest game concept and see it through all the way to "completion" (getting it out there to people). The basic code wasn't too bad. (Sort of like a short, geeky version of NaNoWriMo... just get it typed in). I got a decently working game, all the parts working, just lacking polish in the art and music. Ok, maybe it won't work on Macs. (I don't have a Mac, nor have I ever used one, hence it's harder for me to test my program on one.) I suspect issues with the save files. So much for the vaunted cross-platform bit of the Java PR! Never mind that, I tell myself, I hate Apple anyway. So. Everything seems fine on my computer. Next I needed to get people (aka my kids) to test it.

Right. Time to make a simple minded install script: I just need it to copy the program into the right directory and make some shortcuts, along with an uninstall program to reverse this. After a bit of googling (and squinting at online tutorials), I go with NSIS, which is free and flexible. Again, it works fine on my computer. Except for the uninstall: I can't figure out how to delete the (now empty) folder from the Start Menu. It said it deleted it. And it's not in my appdata anymore. Why is it still showing up? Grrrr.

Moving on... My daughter attempts to download my setup file from my website. BZZT! Alert! Alert! A zillion warning messages start popping up from her antivirus (my site is unknown! it could be a nest of viruses!). She bravely downloads the file anyway. Then she tries to execute it. MORE warnings, even more hysterical in tone, try to stop her from such a dangerous step. Oh dear. At this point, the delay makes her spam-click on the setup file. Which makes her computer lag even more. So she clicks some more. After five minutes of clearing warning messages off the screen, we finally manage to run the setup program. Look! There's a little icon of my program on her desktop! Isn't it cuuuute? Click on it!

...

Oops. Nothing happened.

...

"Maybe you don't have Java installed?"

...

"Let me install..."

"Mommy, go away!"

...

Right. So my install script should check to see if the user has Java installed...and if it's not, it should prompt them to install it. Should I make my setup program automatically install Java for them? It's not good to secretly install things on people's computers! Well, fine, I'll notify them so they can cancel setup if they want.

Time to try again... with my son's computer. Now Java is popping up warnings about untrusted publishers. My son looks nervous. He complains. ("It's dangerous! It's a virus! Run it in the sandbox! Sandbox!")

He has Java installed. Everything works fine. I uninstall and look for another victim... err, "tester".

It installs correctly on my older daughter's computer. But when we try to run the game, we get an error message! She has an OLD version of Java, and my game won't work. (And I do know which bit of it is causing problems, but...) Damn. People will have out-of-date installations of Java. And some of them will have it that way ON PURPOSE (for compatibility with some program they use, or whatever).

So... what to do, what to do? Do I bundle the Java (JRE) along with my game program, so it can run on its own private copy of Java? That's nearly 30 MB! All to go with my dinky little game. And imagine if every Java program did that. Talk about bloat! Ugh. But I can't force everyone to install/update their JRE willy-nilly. Apparently Java is not as universal on people's computers as they would like to have you think. I guess I will need to compile the Java program and turn it into a Windows exe that can run on its own. So what if it's against the "spirit of Java"?! I just want something that will work.

Ok, so not really worth it for my dinky starter game.

It was made to be a Flash game. That's obvious. One of those casual free affairs that people play in their browsers. Way more people have the right plug-ins installed to play a browser game than would be willing to download, install, update Java. Even if I did write it as a Java web-applet thingy, people don't like having to give permission to strange programs to run. It might crash their browser. It might be infected with pr0n or adware or worse. Ha. No. Flash it is. Time to learn ActionScript.

So... phase 2 of my "Indie Game Development Month/Year/Whatever" (IGDMYW?): convert my game to Flash. Yeah... ugh... learning curve time again. I'm not giving up on Java (I think it'll be better for the longer, more complicated games) but I'm taking a detour.

I don't get "writer's block" nearly as often when coding as when trying to write a novel. So let's see if I can have this done before NaNo starts! Otherwise the procrastination possibilities in November are dreadful.

No comments:

Post a Comment