Subscribe to GameFromScratch on YouTube Support GameFromScratch on Patreon
22. June 2015

 

Export to web has been a popular bullet point on most game engine feature lists as of late.  Both Unreal Engine and Unity recently offered native HTML5 export (Unity has had a plugin option for years, but plugins have gone the way of the Dodo).  LibGDX has offered a HTML5 target for ages, Haxe based game engines can all cross compile to HTML or Flash.  GameMaker, Construct, Stencyl and more have HTML5 exporters.   Of course, there are a number of HTML5 native engines (I suppose Construct should be on that list actually…), but they aren’t really what this conversation is about.

 

At the end of the day though… is anyone actually doing it?  Is there a “shipped” title from any of these engines that people are playing in any quantity?  It is my understanding that the vast majority of commercial web and Facebook games are still Flash based, with HTML5 representing perhaps 10-20% of titles.  More importantly, most of these titles are relatively simple, nothing harnessing a fraction of the power of an Unreal or Unity type engine.

 

It leads me to question, is HTML5 a feature everybody wants but nobody uses?

 

What inspired this thought was this interesting article on Godot’s efforts to target the web.  I have been actively monitoring the game development world during the entire timespan Juan described and I witnessed all of these “next big thing” technologies that came and went.  Summarized from the article, they were:

  • Native Plugins
  • Google Native Client
  • Flash
  • ASM.js
  • WebAssembly

 

This is by no means a comprehensive list, LibGDX compiles from Java to JavaScript using Google’s GWT for example, and some of these technologies were certainly successful for a time such as Flash.  Of course too, games written and targeted for HTML5 exist.  It’s this whole HTML5 as an additional target approach that I am beginning to think is just a gimmick.  The funny part is, I love the idea too… I evaluate a lot of game engines and I always see “HTML5 export” and think “ooooh, that’s good”.

 

Games in the browser certainly seemed to have a brilliant future at one point.  The Unity web plugin really did bring Unity to the web.  I used a couple of Unity powered 3D tools, such as Mixamo, and it was very near to native in experience (they have since ported to HTML5 since the Unity plugin was end of life-d).  Google’s Native Client (NaCL) had some promise, with shipped titles such as AirMech leading the way, but a single browser solution was never going to fly.  Ultimately Flash, especially with it’s promising (at the time) 3D API had the most promise, but a combination of Apple’s malevolence and Adobe’s incompetence brought that to an inglorious end.

 

Perhaps it’s just ignorance on my end.  Can anyone out there point me at an HTML5 game (not a tech demo, an actual game) created in either Unity or Unreal Engine?  I realize both are fairly new, so I would also settle for examples that are under development but show promise.  Keep in mind here, I’m not talking about HTML5 game engines, there certainly is a future in HTML5 games and of course they can be wrapped and deployed to a variety of platforms.  No, it’s “HTML5 as an additional target platform” support that seems to be pure gimmick at this point.

Totally Off Topic


14. December 2014

 

So I recently did a complete nuke of my primary daily use Android phone, it’s just one of those things you have to do over time as it gets slower, hotter and your battery life gets worse.  However, the next time I went to debug on Android, ADB couldn’t find it.

 

This is nothing new of course, on Windows you need to do a bit of a device driver dance sometime to get your phone to work with ADB.  This time however it was different.

 

Plugged in my device, waited a few seconds and:

image

 

Hmmm, that’s not good.  USB device not recognized is certainly a common enough answer, let’s just go install the Google Android USB driver.

image

 

Device Descriptor Request Failed… that’s a new one…

 

Ok, lets Update the driver and point to the Google driver…

 

image

 

image

 

Well sh…. er, that didn’t work.  Well it previously worked, maybe I have an old driver kicking around that needs to be purged.  I download the utility USBDeview from here.

 

image

 

I certainly have some old or questionable drivers kicking around.  I am going to clean house in that regard, the nice thing about USB is you can just install the driver again next time you plug the device in, so very little risk here.  Purged the old drivers, scan for hardware changes… nothing.

 

 

Hmmmm…  Google indicates it might be a Windows 8.1 problem due to a driver change they made…

 

Ok, over to my MacBook, let’s see what happens.

 

Plug in the USB cable… BOOM, instant shutdown.

 

WTF?

 

Ok, this is weird.  Let me try a different USB cable.

 

Instant shutdown.

 

Hmmmm…  I’m basically getting the Mac equivalent of a blue screen of death each time I even plug this device in.  Let’s try a different port…

 

Hey, that worked.  Cool.  Try out “./adb devices”  Nothing.

 

Hmmmm, this is confusing as hell.  Doesn’t find the device on Windows 8.1 at all, even worse Crashes if I plug in to the right port of my MacBook Air, it “works” if I plug it into the Left USB port, but for charging only.  The device simply isn’t found.

 

So, at this point I borrow my wife’s identical HTC One phone and plug it in… HTC Manager works, either port, adb devices shows the device.

 

At this point I can only assume something is wrong with my device…  perhaps the connector is broken, but then I can’t explain why it charges successfully, but data doesn’t work.  Generally that is a cable or driver situation, but when I can get an identical phone to work and detect just fine, I am absolutely puzzled at this point.  The two phones have exactly the same versions… I just did a fresh factory install so I am frankly at wits end.

 

If any of you have experienced this before or have ideas, please let me know!  Otherwise I think I’m going to be on the market for a new phone soon.

Totally Off Topic


30. July 2014

 

It’s that time of year… time to put everything on hold for a while, get away for a bit and consume far too much food and drink.  Yes, GameFromScratch is about to go on vacation for a few days.  Bonus points if you can figure out where I am going from the picture below!

 

 

 

… anyways, being a game developer, do we ever really take vacation?  We are seemingly always thinking about how to accomplish something or other in our head.  This trip will no doubt be no different…

 

Actually, it will be different on one level.  I recently acquired a full sized iPad Air ( until now, I’ve only had a Mini ) and I am thinking about doing an entire series of creating games entirely on an iPad.  Let’s see just how much you can accomplish entirely on an iPad.  This means coding, game asset creation, everything on the iPad.

 

I’ve actually already purchased a number of items required.  I purchased a license of Codea back when I first got my iPad Mini, but I found the limited screen size to be a rather big annoyance.  I also have purchased several different drawing programs, including Paper, PhotoShop, ArtRage and iDraw.  I even have a functioning blog packaging, so I can right about the process.  Not really certain how I will tackle audio creation.  Another major downside is asset sharing…  this is one of the major limitations of iOS, sharing data between apps is pretty horrible.  The defacto workaround seems to be DropBox, but that depends entirely on how well the hotel’s Wifi works.  It could end up being a fun little side project.  Or it could be a complete waste of time… I guess we shall see.

 

Fortunately what it will be is a good LUA refresher, which I need for an upcoming and much larger project I am embarking on when I return.  More news on that later.

 

So anyways, that’s what I am about to do… if GameFromScratch.com goes silent until next Wednesday… guess that means the hotel wireless was pretty awful.  In which case, have a great week!

News Totally Off Topic


13. July 2014

 

You may notice over time on GameFromScratch.com the way code is posted changes quite often.  There are a few reasons for this.  First and foremost, I most commonly use Live Writer when writing blog posts on Windows.  Originally I used a plugin that did code formatting like you see in the C++ tutorial series.  It was really flaky though and eventually just stopped working.  Short of a complete OS re-install there wasn’t any way to get it running again.  Obviously this wasn’t an option.  I switched to a different Windows Live Writer plugin for text formatting, but it only supported a couple of languages and I have probably done code samples for over a dozen language, so that was a bit of a deal breaker.

 

Quite often though, I am working on a Mac and that makes Live Writer a complete non-starter.  On Mac I use a program called MarsEdit, which has an OK RTF paste option and I can get code markup via Sublime Text like described here.  On Mac, code samples, such as in this series, were entirely dependant on the application I used.  Meanwhile on Live Writer I used a plugin called VSPaste, which in reality just pastes an RTF file from the clipboard to Live Writer, and generally it works OK.

 

The problem, in both cases, is if the RTF copy didn’t go as smoothly as I hoped.  Sadly this is quite often, posted code from IntelliJ ( with RTF copy plugin or using IDEA 14 which builds it in ) or WordPad for example just don’t work.  The line breaks don’t turn out correctly and it ends up looking like this:

public class DesktopLauncher {    public static void main (String[] arg) {        LwjglApplicationConfiguration config = new 
LwjglApplicationConfiguration();        config.width = 720;        config.height = 1280;        new 
LwjglApplication(new SetCenterIssue(), config);    }}
ïÿiªá€

 

… not exactly ideal.

 

The end result was to write my code in whatever IDE I am using, then paste it into Eclipse or Sublime Text and paste, whichever has the best formatting.  If that sound’s like a bit of a pain in the ass, well, it is.  In the long run I should look at using something like Gist for all code segments.  For now though I’ve found a nice little work around.  It’s still an extra step, but it’s much smoother.

The above example posted as HTML:

public class DesktopLauncher
{
    public static void main (String[] arg)
    {
        LwjglApplicationConfiguration config = new 
        LwjglApplicationConfiguration();
        config.width = 720;
        config.height = 1280;
        new LwjglApplication(new SetCenterIssue(), config);
    }
}

 

Or as RTF:

public class DesktopLauncher
{
    public static void main (String[] arg)
    {
        LwjglApplicationConfiguration config = new 
        LwjglApplicationConfiguration();
        config.width = 720;
        config.height = 1280;
        new LwjglApplication(new SetCenterIssue(), config);
    }
}

As you can see, it’s not perfect, in the case of an RTF paste, the background isn’t copied.  I am used to this already with Visual Studio paste, I manually go in and edit the generated HTML’s background color each time I paste a sample.

 

So, what am I using now?  A wicked little program named Highlight that is available for basically every platform out there.  The program has an amazing amount of versatility, and since it isn’t a plugin, it’s not going to break every time I look at Live Writer funny.  It’s available both as a command line utility or using a GUI and has an amazing amount of functionality.

 

The work flow is pretty simply… either point it at your source file, or copy your file to the clipboard.  Pick the language of choice ( it’s basically got all of them covered ), pick your formatting options, then paste it back to the clipboard.

 

Here is the main screen of Highlight in action:

image

 

The language choices… ( or, at least, some of them ):

image

Let’s just say, every language I could think of needing ( TypeScript, JavaScript, HaXe, C#, C++, etc… ) was there.

Then the code formatting options:

image

 

You can export to a number of different sources:

image

 

And for each output format, you’ve got a number of options, such as below for HTML:

image

 

So, if you need to paste code samples into a blog or other project, you owe it to yourself to check out Highlight.  It’s one of those products I wish I found 4 years ago!  For you command line warriors, there is a disturbing amount of flexibility available.  For example, you could recursively convert all .cpp files in a hierarchy of directories to SVG with a single command.

 

Oh and best of all, it’s completely free!

 

So, if you notice yet another change in the way code is formatted on GameFromScratch, this is why!  Hopefully it will be the last major change in a long time, and code samples should look more consistent across platforms from now on!

Totally Off Topic


10. May 2014

 

Sorry for the quietness in these parts of late, I recently purchased a new place and have been taken off line for most of the last week as a result.  This explains the lack of posts here on GameFromScratch.com.  Fortunately things should get back to normal starting early next week.

 

On the bright side, I have MUCH more space than before and for better or worse, I now have natural light where I work.  Perhaps I will no longer burst into flames when coming into contact with the stuff!

 

Below is ground zero for GameFromScratch, or at least 90% there, still some unpacking to be done.  Although reality is, I still spend the majority of my time on the move.

 

1

 

2

 

3

 

I really need a good solution for cable management.  For now I am just going to use black twist ties, but that always gets annoying.  I am also in the market for a small side table with wheels, as I’ve got a couple machines still wrapped up and unusable for now.  Nice to not be completely cluttered for now though at least.

Totally Off Topic


See More Tutorials on DevGa.me!

Month List