Thursday, August 13, 2015


If you just want to download LAN SMS, check here:

In early 2015, I was working on projects and kept getting annoyed with getting SMS on my phone.  Most of what I do is on a desktop, so always having to check the phone was pretty annoying.  Plus, I always had the sound off, so I never knew when I got messages.  Always love the "I SENT YOU A TEXT 6 HOURS AGO, WTF" scenario.  Of course, sometimes I had to text someone also for whatever, so the quest to find the phone was on regardless.

Initially, I thought, surely there has to be some way to get these text messages on to my computer.  Certainly, I found a couple apps and services out there that did that, but each one did things I definitely didn't like -- had to sign up with another account, had to get a different phone number, had to use Google Hangouts (bleh), or various other things, like use cloud services... I thought, man, why is this so freaking involved, I just want SMS to be forwarded from my freakin` phone to my computer and vice versa.  My phone is right here next to me, but I have to jump through all these hoops to make this happen...

Unhappy with the things out there, I decided to make apps that just did this in a way I wanted, well, with some bells and whistles to make this even more useful, of course.

Enter LAN SMS.  We began Alpha testing it in February of 2015 with some Beta action several months later.  Lots of ideas were implemented and some really great feedback happened, making the product much better than I initially designed it to be.

Below, you can find some of the screencaps over the course of development:

One of the earliest versions of LAN SMS

I insisted we had "tabbed" chats, like how web browsers have tabbed browsing

Our first major UI revamp looked like this.  Some of the connection options were explored, but subsequently dropped from the final product due to various circumstances.

Things started coming together by this point, settings and stuff on the left, major important stuff on the right.

More settings were being added, some tabbed chats were open, things were happening.  We were getting a lot of great feedback from Beta users at this point as well.

Some UI redesign happened and this is what the "final to be released" looked like.  Again, some of the options on the left were dropped before release and may make a come back in the future.

Using the night theme, showing off the settings screen.  What use to be packed on the left side of the screen now gets its own section due to the abundance of options and details.

LAN SMS was released to the public on August 13, 2015.

More information about the product, as well as links to downloads, can be found at:

Friday, February 6, 2015

Tech Support and why Piracy websites are a Good Thing aka "When Tech People call Tech Support"

I hate calling Tech Support, and I get the feeling I am not alone.

This is coming from someone who was a "customer care" agent, tech support shill, and whatever else titles that deal with incoming, angry phone callers.

I just want to start here by saying, I sympathize with most customer service and tech support people, I've been there.  While many times hilarious stories come from this sort of job, most of the time, you go home incredibly frustrated.  Frustrated with customers, your boss, corporate policy, the inability to actually help people that really need or deserve it, the long hours, the insane call time quotas, all sorts of things.

This job usually isn't physically demanding, but you better like people and be ready for your chain of command to throw you out the door when you don't perform up to par as set by their overlords.  Never mind the people factor, we're all robots that read scripts and can't actually help anyone that doesn't fit the pre-fabricated script as presented!

I'd love to say #firstworldproblems here, but ironically, more and more of these jobs are now overseas in less-than-first-world areas... so yea.  Which of course only adds to the layers of fun we get to go through when calling these companies that deploy this "support" strategy.

Today's adventure was to Samsung.  I had high hopes here since I generally like their products... but oh boy.

The problem?

I'm an App Developer developing on the Android platform.  I have to download and install a driver to get my Windows desktop to correctly talk to my Smartphone.

The model in question?  The Samsung Galaxy Note 3 (SM-N900V)

What's the backstory?  Why do I need the driver?  Glad you asked.

As part of the fun with developing for Android, sometimes the drivers bug out and your device stops being able to talk to your desktop; it doesn't happen often, but when it does, it can be... unpleasant to get to work again.  Strangely, the USB connection still works to transfer files around, but the development abilities are crippled and non-functional... joy.

This is what happened, everything was working fine yesterday, then BOOM, my phone *refused* to talk to my computer and its development environment through ADB.  After a bit of troubleshooting myself, I figured the drivers themselves had to be uninstalled and reinstalled... which leads me to today's fun and festivities.

Before bothering going to any website, I have to do local troubleshooting, make sure I'm not an idiot and broke my own thing.  Normally, with Samsung devices, I had been using their Kies Software to manage my phone from my computer (including installing drivers for it a year ago or so).  Assuming this was the correct procedure again, I tried to do it again.  Kies3 claimed that reinstalling the driver was successful, but instead, it was unable to download the driver from Samsung's website, but failed to tell me that.  Instead, a NULL driver was installed for my phone.

I ended up going through Control Panel -> System, checking out the unknown devices and looking through the Event Log to see Windows complaining about invalid drivers.  Hurray.

Great, so Kies was broken and it didn't know it was loading bunk drivers.  Time to go to Samsung's website to manually get a driver (I hope).

As a tech guy, my own troubleshooting checklist for "fixing" something software-related usually goes like this:

* Google for answers for similar problems
* Try to fix everything myself first, or at least find the actual problem area
* Go to the manufacturer's website
* Look for my device/product model/software/issue in question
* Scour through their "easy to use" interface for their downloads/support section
* Look for whatever file/answer I need (the driver in this case)
* Download
* Install
* Yes/I Agree/I read the privacy whatever
* Ok
* No, I don't want ads for my convenience
* Yes do what I want
* Eventually things work

In theory, it sounds great.  But this time, things went a tad amiss.

It wasn't long before I came across Samsung's page for my phone, great, this shouldn't be too bad.

To make things better, there is a pretty clear way to snag the driver that I need, cake!

Clicking the download is where things started falling apart.

Naturally, the message of "Samsung has no responsibility blah blah blah" comes up -- Continue.

Well, this is when I was hoping to download a driver or something, but instead was greeted with:

Of course.

Well, my Internet connection seems to be fine, but I can't rule out my DNS settings are messed up or something, so let's check it. says:

Hmm, apparently, I may not be the only one completely unable to get to their download center.  I suppose this is why the Kies software manager thing couldn't get the driver either -- the website was unavailable to download from!  I certainly wish it told me this, rather than having to find this out the hard way, and then having to manually uninstall bogus drivers and all that jazz.

Some quick, frantic googling for my phone's driver didn't turn up much... plus downloading drivers from 3rd party websites really bothers me... so, I can wait this out and hope Samsung fixes their issue... take a risk with possibly getting virused with 3rd party sites... or... the worst option of all -- contacting tech support.

Strolling through their website already indicated I won't be talking to native English speakers.  Some broken English littered their website really didn't help my confidence.  I'm assuming I'll be talking to the Phillipines or Cambodia or something.

(In a major, surprising side note, the last time I called the Philippines to get support for TIME WARNER CABLE -- the phone support was actually pretty damn good; I was really shocked, mostly because the guy on the other end went off his script when he realized I knew what I was doing with networking tech, and actually listened to me and we actually worked together to resolve the problem, wow!).

Oh, the website also offers live chat on their website - great, anything but phone support.  Oh, that doesn't work either... of course, it must be hosted by their offline download center which is broken.

So, here we are, I have to be productive today and get some new App code loaded on my phone.  I seemingly have little choice but to bite the bullet and... call tech support.

I'll give Samsung some credit here, at least finding a way to Contact them wasn't too cryptic.  God knows this alone can be almost impossible for some companies.

So, I called the help line for Mobile Phones (I'm assuming this was the correct number, since I'm not sure if this is a website specific issue).  I certainly hate being stuck in a call queue for an hour, only to be transferred around in to phone support hell.  Thankfully, the phone I'm calling on is the phone I need support for and it has speakerphone.  So, we're prepared for the long battle ahead.

The standard litany of a dozen automated phone options comes up -- first, wait (for English), 1, 1, 1, 1, 1, 1, 3... uhh, don't know how to answer that, so I guess that one sounds good, I think that will get me to a person.

I hear the phone system click over and complete silence for a couple seconds... great, here we go.  Time to get snacks and some water, we're digging in for the... oh wait, someone answered the phone already?!  This can't be right.

So far, you're winning Samsung.  Though, as expected, we have someone with a heavy Asian accent.  I don't necessarily mind this, but they need to slow down when they talk and enunciate a tad better... and apparently listen better.

I explain to the guy that I need to download the USB driver for my phone to load Apps on to it from my computer, but the website is broken and it cannot be downloaded.

In good tech support fashion, he tried to verify my problem:

"Ok, you want to download USB Drive to your phone".

"No, I want to download the driver to MY COMPUTER so it can talk to my phone."

"Ok, so, you want to download USB Drive to your phone"

"No, I need to get the USB driver FROM YOUR WEBSITE, WHICH DOESN'T WORK".

"Ok, so you are having trouble downloading the drive?".

"YES". (well, the driver, but hey, whatever).

He verified my phone number, my name, it was my first time calling Samsung, etc.  Apparently, he claimed to "have checked to website, it was fine".  Well, that's nice that HE can get it, but the fact is, *I* certainly couldn't.

As tech support would go, he decided (probably by a script) to walk me through traversing Samsung's website to get to the driver.  Great, I don't think I had the heart to reiterate to him that I've already done this, hence why I'm calling him... but hell, who knows, maybe he has a different way of getting this.  Sure enough, he had me type in my model in to the search, which brought up my phone model eventually (I had a lost-in-translation error as he was spelling out what to type in, leading to garbage search results for a little while, so yea, I messed up too).

He had me click on things, etc, then told me "It should be downloading now!".  Well, it would have been if I didn't get the same error I already told you.  Of course, as a tech guy, we can't assume the customer actually knows what they are talking about, so we have to assume their internet might not be working or there are other issues (certainly it can't be the company's problem, that's absurd!).

At this point, I'm getting a tad annoyed, but hey, this guy is doing ok so far.  But THIS is where things went really south, really quick.  First, he claimed he could download it, and so it has to be my problem -- ok, fine, I get you don't trust me, that's fine... but then he insisted that he could remotely control my computer to fix things for me.  Wait, what the hell?!  He talked about how he can log in to my system, control everything and fix it.

Whoah buddy, I don't want you remote controlling my computer (especially when I know nothing is wrong with my system!).  Now, mind you, I do this EXACT thing for my friends and family for their tech support needs.  I certainly don't want a company in who-the-hell-knows-where to just jump on my system to fix "my problem".  Aside from the security standpoint, I'm not sure this guy knows that I have a fairly hardened network connection to the Internet, it wouldn't be completely trivial to allow him on my system to just fix a problem (that isn't even mine, from what I can tell).

I was a tad insulted, shocked, and I'll be honest, kind of angry that he would even suggest this.  I can understand that if you don't want to deal with customers and walking them through tripe things (click on the X in your window) it is much faster and easier to just do it for them -- fine, I get it.

BUT this is somebody I don't know, I don't know if they have to install some sort of remote control software or what -- in fact, this raises more questions than it answers in and of itself -- does some sort of software from Samsung need to be installed to allow this remote control access?? Is this already enabled in other software in my system?!  Now, I'm actually fairly curious.  Maybe I'll set up a virtual machine and feign another problem to call them back just to see what would happen here.  Maybe it was just windows remote assistance or something else; who knows.

I suggested that he download the driver and possibly email it to me instead?  He said he couldn't do that -- of course.

So, I told him I wasn't comfortable with him doing the remote control shenanigan, he said he understood and that it was possibly my Internet browser was at fault -- right, Chrome didn't like your download center's website; nevermind my ping tests or other things I've done to isolate the problem to Samsung's services.  So, while the guy was going on and on about things I should do, I saw that the URL from the [broken] download center's URL had the file name of the driver I was looking for -- finally, I could google for that directly and just find it somewhere else.

Boom, sure enough, file sharing/piracy sites have the file in question.  At this point, it was pretty clear Samsung would be unable to help me with their problem, much less even know about their own problem, or care to know, apparently.

I don't blame the tech guy, he was following his scripts, and he was probably quite frustrated with me, so I told him he couldn't  help me and that I will be going to 3rd party websites to get the file in question.  He verified that was to be our resolution and then bid farewell.  Thank god for piracy websites hosting this file somewhere else... now to hopefully not virus myself and this will be another fine tech support issue solved in clearly the most efficient way possible.

Samsung's final tech support experience tally?

Tech support guy: 6 / 10
He followed his scripts, was generally nice, spoke way too fast, didn't listen to what I had to say most of the time and probably wasn't super technical himself as he clearly didn't understand what I was telling him most of the time -- granted, I was probably unlike most people calling him, having problems with their apps or whatever, so I'll give him the benefit of the doubt.

Tech Support Policy: -10 / 10
You want to remotely control my computer to overcome issues of communication?  There's no other way to get your file?  Do you not care that your downloadcenter is broken to external customers?  I have to make assumptions that the internal support policy... needs work.

Website Design/Coder People: 9 / 10
Surprising I know, but overall, their site was laid out well enough to where I could get where I wanted to go fairly easily.  I wanted support, it was fairly straightforward to get there.  Oh, and the filename of the driver I needed being in the URL, excellent.  You saved me from having to deal with your own internal issues!

Information Systems Team: 1 / 10
A major portion of your website is possibly broken and nobody at Samsung apparently knows about it?  I guess it is like your Kies software, seemingly works well, but when a something goes wrong, it does you the favor of not letting you know about it!

Overall Tech Support Experience: 3 / 10
Not the worst I've experienced, but a far cry from where I would hope to be from a company like Samsung.

I have no idea if anyone at Samsung will ever find this blog, but if anyone needs the information:

As of 2/6/2015: was resolving to, using Google's DNS - which seems to be correct and be pointing to South Korea (where Samsung resides, right?)

I'm under the assumption a firewall rule was potentially blocking external traffic -- possibly specific to the United States, maybe everywhere else, Kim Jong Un under the hood?  Who knows... now let's hope I don't get virused and actually get back to work.

Tuesday, June 24, 2014

It is dangerous to go alone, take this!

While creating a game engine, or just programming in general, lots of things can go wrong! Certainly, tools can also prove some immensely useful aid in the task at hand as well.  That said, here is a listing of tools and software we're using while making our own game engine.  They won't get the job done for me, but they certainly alleviate problems and make things more productive in the long run.

[Programming IDE]
The defacto standard is seemingly Visual Studio for developers on Windows.  For my game engine, being cross-platform, I don't really have a luxury of sticking with any one specific IDE.  On Windows, I've found that Code::Blocks works just fine.  For OSX and iOS, XCode is the standard.  For Android, Eclipse seems to be the way to go (in combination with cygwin), and last, but certainly not least, for Linux, I generally use KATE, or whatever text editor is loaded on that flavor of XWindows that supports syntax highlighting... in a pinch I do use vim as well.

Well, can't really get too far in programming without these.  On Windows I use MingGW, Android and Linux use GCC, and OSX/iOS are using Clang/LLVM.

Let's face it, even the best of us crazy programmer people make a mistake every now and again.  Probably more if you listen to other people, but why do we listen to other people anyways?!  So, this neat tool that helps find errors in logic and what not here is with CppCheck.  Using this in addition to the compiler's analysis and warnings should at least find a large portion of issues and bugs before they become too problematic.

My hex editor of choice.  If you'll be doing data file editing, checking little or big endian, or doing any sort of binary things, looking at the raw bytes is immensely useful sooner or later, especially in files on the file system.  XVI32 is free and fantastic.  It might be useful for other things than programming, but I will leave that as an exercise for you to figure out.

Version control is a necessity with software development (and likely other things NOT software-related!).  I converted from subversion a while ago and I'm pretty happy with the switch.  I highly recommend checking for help learning the commands to use this really neat version control system.  Mercurial is decentralized and robust.  Naturally, a more visual way of dealing with the tool could be useful...

In my personal quest to rule the world, this was one of the latter additions to my growing arsenal of tools to help with development.  I was doing things on the command line with Mercurial when finally I bit the bullet and tried this new GUI approach to things.  I was skeptical at first, but honestly, this thing really helps see things and speed things along with managing version control.  I'll still drop down to command line and use hg directly, but for the most part, SourceTree covers my day to day version control interfacing.

Editing text files happens.  This fantastic editor is my default editor on Windows.  It does syntax highlighting for tons of languages, it's zippy and responsive, supports massive files, and all sorts of good things.  I even use this to edit source code outside of IDEs when necessary.  Yea, it is that good.  Get Notepad++ and live a better life on a computer; well, at least when you're editing text.

The premiere tool to watch network traffic.  Wireshark is essential when figuring out what in the world is happening with your network and the software you may or may not be having issues with.  Ideally, you can troubleshoot your network code that is giving you guff.  I suppose it could be used for other interesting things as well, but hey, that's on you.

SSH shell on Windows?  Yes please.  Essential with a multiple system set up across multiple Operating Systems.  Putty has captured the hearts of many over the years.

It copies files over SSH, really convenient to transfer files to computers only listening for SSH traffic.  WinSCP is particularly nice sending/receiving files to/from linux hosts, especially if Samba is acting up or not working right for whatever reason.

Good `ole FTP.  Can't go wrong with either the client or server version of Filezilla.  I don't find myself using FTP too much anymore, but every now and again with webhosts this is still useful.  With cloud computing and what not, this is seemingly less popular these days, but hey, it is still kicking for now.

[Word Processor]
I'm using the excellent LibreOffice.  It replaces MS Office.  It can make PDF files.  It is free.  Get it.

[Web Browser]
Lots of choices here.  If you're a developer, and I hope you are if you've read this far, you won't go far without looking stuff up anymore on the internet... I'm generally a Chrome guy, but as a developer, get used to using all of them, especially if you do web dev at any point.  In order of personal preference, I choose:
Chrome, Firefox, SeaMonkey, Opera, Internet Explorer, Safari, everything else I didn't mention

Hey, part of developing games incurs the necessity for graphics.  Gimp is the forefront winner in the free graphics category.  It can take a while to get used to, but it isn't so bad once you get over the learning curve.  It can be quite picky with drawing tablets (GTK+ fault most likely), so if/when you get that to work, it's a pretty well rounded raster art image editor.  The commercial alternative is, of course, Photoshop.

Not really a downloadable product, this web service is a great way to apply some sanity to organizing all sorts of complex tasks.  I don't think I can do it justice by explaining it, but it is a system where you put cards together in to lists, assign them to people, give them due dates, color code them, etc.  It is very visual.  Things can be dragged around and prioritized and stuff.  Trello is a nice way to keep yourself organized with what you have to do or facilitate communication with team members so everyone know what needs to be done!  Less forgetting the small stuff, give yourself todo notes!

There are probably more tools that I use, but those are the more frequently used ones in my quest to make software.

Monday, June 23, 2014

Remember, our game engine is a learning experience...

So, when I first started the adventure of making a game engine, I had some grandiose ideas of what it would do.  Quite a few of my initial goals have actually been met (almost suprisingly); but that isn't to say I had quite a few bumps in the road with some faulty goals.  Most of the time these misbegotten ideas were crafted up because I didn't understand something or know enough about the topic to begin with (like 3d data formats with animation!).

Here, I will showcase some of my mistakes and talk about my troubles.  For your time, I will offer my lessons learned and elaborate on why what I was doing was good/bad/indifferent.

So, here we go, some of the times where I really messed up.  For fun, I'm going to rate how bad I messed something up on a scale of 1-10, with 1 being a minor lapse in judgement to 10 being evidence for logical absurdity and possibly insanity.

Floating point precision (Score: 9 / 10, I will regret this later in life once I figured out what happened).

So, you're playing a game, and lo and behold we fall through the floor.  Sheesh, these programmers must be lousy, they can't even tell where the ground is!  As it turns out, figuring out where the ground is located is actually not a trivial task!

Other neat things include objects moving through each other, falling out of a game level through arbitrary walls, the game camera clips though walls, things get stuck in the floor, and of course falling through the floor.

I can't speak for all engines, but in all likelyness, floating point precision is a likely culprit of at least some of these problems.

Early in my engine code, I had things like:

void someFunction(float x, float y)
	if (x == y)

While this looks innocent enough, it is a very, very bad idea.  Not only is this a bad idea, it is a stupendously, compoundingly bad idea with cross-platform development and bad for your general sanity when you use this code and get unexpected results in ways you have no idea yet.

Bruce Dawson has two really good articles about floating point comparisons that you really need to read that will hopefully enlighten you enough to realize a couple things.  One, computers suck at math, just like us, and two, you need to know what they are doing to use fractional numbers correctly (like, just where is that floor in 3d space anyways).  Sort of summing up what Bruce talks about (you should read it all anyways)...

There is no 100% awesome way of solving the floating point issue, but you, the engine developer, need to figure out the "best" way forward with some strategy and stick with it.  If you want a 100% accurate way of always having 100% accurate real number representation, you may wish to look in to scientific computing as opposed to game engine development as you will need a decent set of math understanding (and raw CPU power) to figure all that out.

Some caveats to watch out for are constant Epsilons and always thinking straight equality comparisons of floats are bad.

Example of a straight equality that is a Good Thing (tm).

float x = 1.0f;
if (x == 1.0f)

or even

double x = 1.0;
if (x == 1.0)

With no math involved after the initial assignment, this conditional should be fine. However, notice that I use the character 'f' on my number in the first example.  This forces single point precision, as opposed to double representation.  Depending on the system this is running on, if you leave the 'f' off, this comparison may or may not be equivalent!!!!  Do NOT mix having an 'f' on a float constant and then comparing it to one without! Example of messing up:

float x = 1.0f;
if (x == 1.0)

What about Epsilon? This is a reasonable strategy, albeit not very accurate, sometimes.  Epsilon is some margin of error.  The trick is that this margin of error grows as each float gets further away from 0 and sadly shrinks as they get closer to true 0.

It is a tad tricky to pin down exactly how much Epsilon should be given as it depends on the magnitude of the float number in question.  There is seemingly no tried and true solution here - or at least a provable superior solution given program execution performance as a requirement. For our engine, we combined an absolute Epsilon (for numbers near 0) and relative Epsilons (for numbers not near 0).

If you're making your own engine, this is a topic worthy of extensive research and testing because all games made on top of the engine will suffer from your failings to deal with this issue "in the most correct way".
Oh, and if you think this is fun now, just wait, there are more woes to talk about with floating point issues with game engine development, not just precision, but we'll get to those soon enough!

Sunday, June 22, 2014

How the cross-platform, custom game engine integrates in the big picture

While designing and developing the game engine, it became somewhat necessary to start drawing some pictures to help get a bit of visualization going on.  This picture here shows, hopefully, that the engine itself is merely a component in the "bigger picture" of how a bunch of code and logic fit together to finally and actually be able to make a real game product.

Because the engine is C (read here for the reasons why it is C), the source code should be written such that we can take the C files over to platform x, compile it, and it just works.  In theory that sounds great, but in practice it isn't quite that simple.  As long as I can separate out the cross-platform code from the platform specific code, then all will be [mostly] well.  Fortunately, this design also lends flexibility in how we go about implementing those platform specific things while allowing the vast majority of the engine to be compiled, more or less, as is across multiple platforms.

The top part of the this picture shows the various Operating Systems we plan to support.  Each, of course, has their own considerations that don't play well with other OS's though -- so we had to split those "platform specifics" away from the "core" of the game engine.  By decoupling them, we can make lots of upgrades, fixes, and what not to the core and have it be fixed instantly across all platforms.  We can also write the platform specific parts once and never really need to change it once it works.

The Platform Specifics are:
  • compiled 3rd party libraries (static or dynamic, depending on the platform/license)
  • windowing code (hey, they all speak differently with their host OS!)
  • device data gathering about hardware capacities
  • core input handling
  • opengl setup
  • utility things, like figuring out storage paths, how to talk to file system
  • platform specific scripts, batch files for windows, bash for the others
The Game Engine then is:
  • Lots of header files for 3rd party libraries
  • Lots of loading data routines
  • Lots of math, geometry, collision detection routines
  • Random number generator
  • Lots of graphics functions
  • Lots of utility functions (think buffering files, writing strings in binary, delay functions, etc)
  • Generalized/abstracted input handling
  • Generalized/abstracted sound output handling
  • Logging functions
  • Networking code
  • Physics
  • Vector stuff
  • Matrix stuff
  • Time/Date handling
  • String handling
  • Memory handling
  • Specialized data support for game data files
  • Embedded Lua script engine
  • Everything else not platform specific
The Game Core is:
  • Art, sound, data loading/destroying
  • Game objects
  • Actors
  • Artificial Intelligence
  • Player input response
  • Game networking
  • Game physics (in addition or by compliment to the game engine's)
  • Everything else that makes the game
Once all of these things are combined and compiled/linked together, the actual game can be spit out and run on any of the supported platforms!  It is quite exciting to see our Windows version work near flawlessly on iOS or OSX just by pulling down the game core code, compiling, and it works... yea, sometimes there are hitches, but these are usually quick to fix as they are general oversights.

It was also quite breath-taking to see a "windows game" work on Linux almost without a hitch also.