The Last E8 postmortem (LD39) and some Unity vs UE4 thoughts

Presenting, the crappy game title I made! Akiko’s comment was “I didn’t know you were going to show my model up close, ugh”

The Last E8 Postmortem

Last weekend was the triannual Ludumdare game jam.  If you don’t know what that is, it’s a masochistic ritual where you voluntarily force yourself to create a new game over a weekend and publish it for all to see.

Akiko pressured me into it as she wanted to Blender up some things for practice.  I acquiesced to be her programming partner if we could come up with something to match the theme.

The LD theme announced was “Running out of power”. This was 10 AM our time.

The Idea Phase

We agreed to think up some ideas and exchange them at lunch.  So in a Kyoto thai place Akiko showed me her idea:

Hmm.  I don’t know what to say about that except, I like it.  Something about being an employee who has to manage his drug use to stay productive.  (for the record, RTsoft does not endorse the use of illegal narcotics.  I do however, endorse the world’s favorite stimulant, coffee.)

As for myself, I didn’t have much except a vague concept of celebrating the Tesla Model 3’s release with a game based on it somehow.  3D flying game?

So we starting working on Akiko’s idea – resolutely requiring that we completely nail down the game mechanics in photoshop or on paper before even starting.

I figured there were two possible ways to take this:

  • Lemonade Stand style: Strategic choices made, some kind of turns system. Mostly buttons and clicks.
  • Cookie Clicker style: Also buttons and clicks, no real strategy but slowly building up your empire. (I’m playing as I write this article.  Whee!)

I was appalled to find Akiko wasn’t aware of either game. You think you know somebody.

I decided “Cocaine Clicker” was the way to go simply because I liked the name and according to google it wasn’t taken.

Side note: I always google names because if I don’t, people will think I copied something else.  I sort of miss pre-internet days where you could just be original without caring if people thought you weren’t original.

Theme problems

I did some photoshop mockups of the buttons and tried to map out some gameplay.

Unfortunately “Running out of power” didn’t really match what I’d designed; the concept of running an office, buying more employees and managing their illicit substance needs just didn’t work with it.

A fundamental problem is you never run out of anything in a classical clicker game, you only gain.

I did like her idea of a split screen, half being the office, and half being the drug farm/factory. Sort of two games in one with a symbiotic relationship between them required for survival.

Engine problems

As I mulled this over I fired up my game engine for the first time.  I decided to use UE4 as that’s what I’ve had in my head in recently for some VR tests.  (If you have a Vive, please try my tech demo later!)

Lo and behold, UE4 was cursed.  I had setup a basic C++ UE4 project but was plagued by crashes and bugs.  I mean, I hadn’t even written any real code yet.

The worst of it was the silent errors.  Sometimes something internally was broken that caused a setting to be grayed out that shouldn’t be.  I feel like the only way to be safe is basically restart the editor after every C++ class is added or a blueprint is reparented. Slow.

Those issues are WORSE than a simple crash, because until it occurs to you to restart, your progress is entirely obstructed for unknown reasons.  I thought I had done something wrong, when I hadn’t.

Knowing I probably had less than a day of total time to throw at this, I said screw it and used this jam as a chance to try out Unity 2017.  (I’d used Unity 5 last year but forgot everything)

I have to admit, Unity is nice.  The MS Visual Studio 2017 integration is fantastic these days. Zero crashes.  Breakpoint debugging worked immediately with no hoops to hop. Goodbye forever, MonoDevelop.

I’m constantly switching back and forth between these two engines (plus my own homegrown one for 2D and simple 3D)  so I’m going to pause for a second and show my current engine scorecard in this middleware battle royale.

Seth’s Unity VS UE4 scorecard:

Unreal Engine 4:

  • Allows real C++ so the last twenty years of code doesn’t feel wasted
  • Actually using that C++ causes editor glitches non-stop and longish compile times
  • I think it’s faster overall and easier for me to replace the networking code with my own
  • I don’t like the royalty scheme.  Being legally required to calculate royalties for eternity (assuming your game makes anything) is awful
  • Blueprints may seem ok at first, but they are actually the spawn of satan as soon as you need to do anything slightly tricky.  Go ahead, write Vector3 vFinal = (vDir +vOffset).Normalize()*speed*dragMod); in BP, see what a mess that looks like. Now cut and paste it into a new entity and get forced to recreate and reconnect all the variables involved.
  • Forced to choose between overly simplistic BP or slow compiling C++
  • HTML5 support is questionable, doesn’t seem to be a priority.  Huge file sizes, rendering problems
  • Full source code.  Makes this a good choice if you’re going to be implementing your own streaming landscape or enet networking.

Unity:

  • No C++.  C# isn’t bad, but I miss my direct pointer manipulation and huge library of code I’ve written, so it means a lot of porting, or using plugins that are less portable.
  • Compile times are a dream
  • No crashes, was 100% stable (so far, anyway)
  • Better 3D import options, it can handle .blend files directly
  • Better audio import options too, unlike UE4 it can properly handle a simple .mp3 file
  • Excellent HTML5 support – nearly a must for a public game jam, more on this later
  • Month to month licensing isn’t cheap for the Pro version, but at least they don’t have their hooks on your game royalties for eternity.  Free version isn’t bad either really
  • No source code (well, not for peons like me, anyway)

So in the end, I’m thinking I’m around 5X faster when using Unity simply because of faster compiling and smarter import options.  I guess I need to do a VR demo in Unity and test that side of things too though.

Screw it, let’s use Unity

In the end I told Akiko, look, I’m switching engines so how about I do a sort of simple 2D flying game as a refresher for me.

“Can I still make 3D models in blender?”

“Sure!”

“Ok, I’m in.  What will the game be like?”

“It will be like The Last V8 crossed with Space Taxi”

“Never heard of those”

The Last V8:

Space Taxi:

Using Unity’s auto collision

I remembered this trick from when I made Multiplayer Space Taxi a while ago, you can very easily add collision to a level simply from an image.

Unity’s magical Polygon Collider 2D component

About HTML5 vs native with game jams

Because this is my main development machine, long gone are the days where I can run unsigned binaries from people I don’t know.  I know, I hate that, but unless I setup a clean or virtual machine that’s just how it is.

Play our game

So finally, here is the game we made.  True to its heritage, it’s extremely hard.  Good luck!

Play the game in your desktop browser here

Unity project/source code here

(also, the LDJAM site link for it is here)

How to waste less time on Facebook

Wasting too much time on Facebook? Being bombarded with targeted videos in your feed that turn you into a drooling fool for hours?

If so: Get F.B. Purity!

I’ve been using this free browser plug-in for months now. I configured it so I only see real content from friends, and ignore the shares and likes. Refreshing.

I circled in this pic where you can add some custom settings to get rid of more stuff.

I don’t mind frittering away time online – but I want to consciously choose when and how I waste hours upon hours of my life.

Also, if you really can’t stand baby or cat pics, they’ve got you covered:

Playing with the HoloLens

At an extremely spendy price of $3,000 I picked up a HoloLens.  Why so much more than a Rift or Vive?

Well, the biggest difference is instead of tethering to your computer, this thing IS a computer+kinect small enough to wear.

Welcome to the world of mixed reality!  I hope I’m keeping up with my jargon correctly

Mobile VR is trash, HoloLens is different

The current mobile VR solutions (GearVR, Google Daydream, etc) are garbage, you know why? They can’t track positional movement.  Take a step sideways or forward – in the game nothing happens.

This means there is an entire category of games they won’t work with – basically nothing where you move around a room naturally.

HoloLens is different (well, it’s AR/MR and not VR for one, but that’s not the point here), it can fully track position/rotation/acceleration, you can even do something a Vive can’t – you can walk BETWEEN ROOMS and it knows.

Without any complicated setup, you can plop this on someone’s head and it just works, anywhere.  Oh, and it’s fast.  As for tracking your hand.. well, not so fast, we’ll get into that later.

Akiko knows kung-fu

It uses multiple cameras (normal and infrared) to figure out where your walls, table, and chairs  are – and is capable of knowing exactly where your head is located in space.

It’s quick enough to feel nearly as smooth as say, a Vive. I think it’s using acceleration/rotation sensors to do accurate predictions while constantly correcting things with the camera based space-mapping but it works well despite the occasional glitch.

I didn’t expect it to track outside (it must use walls to calculate head position, right?) but it worked fine! I guess it’s scanning the ground or something.

Cool, but here are the problems

At 1268×720 resolution per eye, the objects you’ll see overlaid look great – but that’s mostly because the DPI (dots per inch) are so tiny.

If you hold a piece of A4 paper at arm’s length you’ll get an idea of how small the rendering area is.

The actual screen overlay area is tiny

This means when a spaceship tries to run away in a game, it just gets cut-off unless you turn your head to follow it.  A workaround that games are using is they will pop up an arrow “<– It’s over there!” to help you find it again.  Not great, but hey.

It also isn’t able to overlay graphics too close, like if you set your GL near plane too far away.  You can see the image break apart in the gif below.

Click this gif to view it in action. Don’t blame me if you get sick

Kinect delay is back, baby

It can sort of track one of your hands – but it’s too laggy to be of much use for anything.   It’s a better experience to move your head around to put a centered crosshair on an option, then use the included remote’s satisfying clicker to select something.

Random free idea that makes no sense due to the hardware requirements: Use with a Vive hand control to make a spray paint simulator so you can tag up your house.

Seth’s verdict

The good:

  • The wall mapping and fast, accurate positional tracking is amazing.  This is a hard nut to crack and probably the most impressive thing about the entire HoloLens project
  • Totally self contained unit makes it easier to show people.  I mean, good luck bringing your Vive to Kyoto Indie Meetup
  • It barely works, but it can sort of do smart occlusion around physical objects (if a real chair is in front of the hologram, it won’t render the hologram there) – its 3d scanning is too rough but .. it’s still tantalizing us with what the future will hold

The bad:

  • Costly, it’s squarely in “developers only” territory right now. It’s no surprise it’s only sold “thousands”
  • The tiny video overlay area is very limiting
  • Laggy-ass gesture controls are bad for most gaming
  • Can’t walk up close enough to objects, they disappear
  • UE4 doesn’t support HoloLens as an export target, I don’t think there is a way to build it without fighting with Microsoft’s hacked up version of UE4 they did a while back, no thanks

There are rumors that Microsoft has canceled the 2nd generation HoloLens and are skipping straight to a 3rd gen version slated for release in 2019. Interesting.

Playing with the Fove eye tracking VR headset

vove_headset

It came! This VR headset was on kickstarter back in 2015 and has received some serious investor cash since.

FOVE-VR-Headset-Pre-Order-Announced

Sure, that’s exactly how I use VR…

I’ve been working on prototype games with the Vive (in UE4) but really wanted this primarily to play with its unique feature: real eye tracking.  It has cameras that watch your eyes and figure out where you’re looking – and applications can act on this information.
fove_eyes
No, this isn’t from Resident Evil 7… it’s how it watches you watch.  Yes, it’s creepy.

Currently there is only one demo on the Fove website to try out – I expect more will be added soon – hopefully they will show off foveating rendering and depth of field based on gaze. I want to see if it’s all quick enough to “feel right” or not.  I guess we could always write our own tests as well… maybe later.

fove_test_app
This is the sample app.  That little green and red ball?  That’s where your left and right eyes are currently looking.

My impressions

  • I had some trouble getting it going, but after a few reboots, trying different usb ports, and removing my second monitor it kicked into gear
  • Fove is currently marketing this to “developers, creators, researchers” and I agree that it isn’t ready for the general consumer
  • It’s fiddly.  If your headset shifts on your head AT ALL since you’ve calibrated the eye tracking, it will be way off.  I had the best results if I tried not to move my head at all
  • Sadly, they don’t support Valve’s lighthouse tracking (this was something they were talking about earlier) and it comes with a single infrared camera that tracks points on the helmet. I felt it didn’t track rotation/position as well and accurately as Vive or Oculus Rift does
  • It really does work! I could totally write an eye controlled VR web browser or whatever, that rocks

Conclusion

It’s functional and is very useful to experiment with eye tracking VR technology early.  Eye tracking will probably be a standard feature in all the VR headsets soon enough.

If you just want to play some games, get a Vive.