Category Archives: UE4

HoloVCS – Play Atari 2600 Pitfall! in 3D on a Looking Glass Portrait

Understanding how it works

Have a Looking Glass screen and want to try the above thing? Well, you can!

Download for Windows (~120 MB)

Github source

How to set it up and play it

To run this, you need:

  • A Looking Glass holographic display device connected to a Windows computer via hdmi (designed for the Portrait, but in theory it should run on all of them…)
  • The Holoplay driver installed
  • A beefy ass graphics card
  • A game rom (.a26 or .nes file) which needs to be put in the /atari2600 dir or /nes dir, depending on the system it’s for

If you don’t have a holographic device the screen will look like blurry garbage. If you want a build that works in 2D for some reason, I guess I could do one though…

Supported games (you must supply the rom, they are not included in the zip):

Note: Supported means they are playable, it doesn’t mean they work perfect or don’t have issues…!

  • Pitfall! (Atari 2600)
  • Super Mario Bros (NES)
  • Castlevania (NES)
  • Jack Bros (VB)
  • Panic Bomber (VB)
  • Teleroboxer (VB, lickers between rounds)
  • Vertical Force (VB)
  • Wario Land (VB)

The actual filenames don’t matter, it detects supported games by checksum.

Note: There are two versions of Castlevania NES roms out there, if it’s not detected and not playing in 3D you might have the wrong one.

It will run unsupported games, but they won’t have any depth/3d effects.

I’ve only tested with the Looking Glass Portrait and the OG 8.9. They both seem to run around the same speed, with the OG 8.9 being too zoomed in initially. (try the – key to zoom out?)

When it starts, it will show a menu with the hotkeys, but here they:

Arrow keys: Move
Ctrl, Space, Enter: A and B and Start buttons (gamepad supported too)
Return: Reset game
Num 0 through 5: Set frameskip (higher makes the game run faster by not showing every frame)
Num 6 through 8: Toggle texture smoothing, shadows, lighting
P: Pause
A: Adjust audio to match game speed (experimental but can help with audio problems)
/+: Zoom in/out. Hoping this will help with other Looking Glass sizes.
S: Save state
L: Load state
< and > : Cycle through detected games (any roms you’ve placed in the atari2600 and nes directories)

Tips

I can get 60 fps with everything with a 5ghz with Nvidia 3090. Exception is Virtual Boy which I’ve limited to 50fps to match the real device.

If a game is too slow, press 1 or 2 for frame skipping modes. If audio is weird, press A to cause audio to sync with the recent framerate. (gets rid of pops and scratches usually, but pitch/speed will be wrong making it… interesting…)

If you have problems, check the log.txt file for clues. (created in the root dir where HoloVCS.exe is)

FAQ

Q. Does it support other games besides these?

A. It will play unsupported games without 3d plane effects, so not really

Q. I noticed you’re using emulators via a libretro dll interface, does this mean I can pop in more emulator types?

A. Yes! Well, no. I mean, each requires customizations to work properly and do 3d stuff.

Q. The snake in Pitfall! is mostly invisible!

A. This is a known bug, sorry. I mean, it’s a ghost snake now

Q. Why do some levels look weird or broken?

A. Sorry, I only made it so the first levels works, didn’t worry about later stuff. It is possible to detect current level/environments via PPU memory and adjust rendering to match the situation though.

Q. Why is it called HoloVCS?

A. It originally only supported Atari VCS emulation. Too lazy to change it

History

1.0 Initial release, supports Pitfall! for the Atari VCS

1.1 Added support for a few NES games too

1.2 Added some Virtual Boy support. The neat thing about this is there nearly no game specific code happening, it’s reading the 3d position directly by hooking into the emulator at a low level. It’s not able to capture everything but it’s enough to be a neat gimmick. The only game-specific thing I’m doing with VB is setting the zoom level to look slightly better for certain games.

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)