Shuttorscape

As Touch of Darkness is taking somewhat longer than expected to complete I’m having to do one or two smaller projects to get something out. The joys of having to pay for your own time, you know.

As such I’m working on a a simple puzzle game, Shuttorscape.

Shuttor-menu

More coming soon!

Cheers,

lith

Augmented Reality in Unreal Engine 4

Here’s how to set up Unreal4AR from scratch (the documentation gets you to copy an existing small project in and I know some people like to start with a blank canvas).

It’s pretty much as the documentation says, except:

  1. Don’t copy the entire Content directory, just:
    • ARToolkit
    • Blueprints/
      • AR_ACtor_TOUCH.uasset
      • ARToolkitBase.uasset
      • ARToolkitBaseAdvanced.uasset
      • Markers.uasset
      • MarkersNFT.uasset
      • Mouse_GameMode.uasset
      • Mouse_PlayerController.uasset
    • Collections
    • Developers
    • Materials
    • Textures/
      • HUD_Custom.uasset
      • LoadingScreen.uasset
    • UI

In World Settings (Windows->World Settings, this appears in the right hand panel), set the Game Mode to Mouse_GameMode.

Drag an ARToolkitBaseAdvanced into the level (it should appear as a camera with a large square plane in front of it, the camera is the Virtual part of the AR view, the plane uses the BaseFeedScreenNoShadow material to display the real-world/video part of the AR view).

With the ARToolkitBaseAdvanced selected, in the Details panel change the “Auto Activate for Player” from Disabled to “Player 0“.

The important parts of the Level Blueprint are “Transform Camera”, “Actor Visibility”, and “Offset for NFT Marker” (assuming you’re using NFT markers – I am).

Be aware I’m also not using non-NFT markers so I’ve removed the relevant nodes for those.

think that’s everything I did to get it working, let me know if I’ve missed anything. Helpful images below.

"Transform Camera" and "Actor Visibility"
Transform Camera and Actor Visibility
Screenshot 2016-04-11 10.11.23
Offset for NFT Marker
ARToolkitBaseAdvanced settings
The ARToolkitBaseAdvanced Settings panel on the right showing the Auto Player Activation set to Player 0.
Screenshot 2016-04-11 10.16.04
The level screen, showing the World Settings panel on the right with the Mouse_GameMode, HUD_Custom and Mouse_PlayerController.

 

Progress

Now I’m past the worst of the coding (fingers crossed) I’m making steady progress on level building. After a handful of levels built comes the testing and feedback cycle. It’s good to be moving forward.

lith

In Which I Become Overwhelmed

Edit: to make the role of working on low hanging fruit clearer. Also to mention the affect of isolation.

For tl;dr scroll down.

Over the past few weeks I’ve had a struggle with making any progress on ToD. This is about why and how that ended, in the hope of helping others avoid and/or get out of it when it happens to them.

To begin with I started losing momentum on progress – a couple of large issues came up that were hard to fix (including a bug that wouldn’t occur if the debugger was attached). It all slowed down. The lack of progress became disheartening, which in turn made everything seem that much harder. I knew I had to get these things fixed or there would be no game. Somehow, where I thought I was fairly close to having most of the main features of the game complete only a week or two before there were uncountable major issues that were going to take an incalculable amount of time to fix before I could even begin to make real progress rather than just make broken things work.

In the middle of this I was turned down for the EGX Leftfield collection which was disappointing – though being a bit down from the previous it was more of a knock than it should have been, especially when I was fully aware that competition for a place was fierce and ToD wasn’t even in alpha at that point, so it was hardly surprising.

Eventually I decided to temporarily ignore the big issues and move on to some of the ‘easy’ stuff so I could make progress – stuff that I would need to do further down the line but really wasn’t a priority. I spent a few days making some simple models, putting together the “picking things up” animation and the like – the low hanging fruit that’s easily dealt with. This allowed me to make obvious progress, which meant I felt like I was making progress, which improved my state of mind so I could think more clearly.

Two days later I came to realise that the ‘big’ problems of the past few weeks weren’t big, most of them were trivial and the largest was fairly simple – and I’d already mostly fixed it anyway.

I’m now back on track and progress is being made.

I hot desk in an office with a number of other developers – this allows me to get out of the house and see people a few days a week. It also lets me discuss ideas and get feedback. I can work on my own but after a lot of time in isolation it can become hard to keep going – socialising helps recharge me mentally and the moral support from others is invaluable. Part of the problem I had above was that I’d decided I was going to fix this major bug before I went back into the office. Obviously it took a long time and I deprived myself of my own support network at a time I needed it most, which made it even harder to get out of it.

In my head I’d felt that I couldn’t go in until I’d fixed it, I didn’t want to see the other developers in the office until I was making progress again. It was the same day I went into the office for the first time that I decided to do the easy work and started to actually make progress again.

Conclusion

If you start feeling overwhelmed by things, progress will slow and it’ll all seem worse which can spiral out of control. Backing off and chilling can help but won’t make you feel like you’re getting anywhere, the big problems will still be there when you come back – pick something easy to work on, make some quick wins and get back to a good place where everything seems that much more manageable.

I appreciate this won’t work for everyone and all circumstances, but thought it was worth putting it out there in case it helps anyone.

tl;dr

(really tl;dr below)

A large, particularly difficult problem arose that set me back and couldn’t be fixed by anything other than calculated guess work and a problem-solving equivalent of flailing around.

  • It got me into a place where somehow every single problem seemed like a major issue that I would be unable to fix.
  • This spiralled and became overwhelming, making everything seem even more intractable.
  • I was turned down for Leftfield, which was more than the disappointing it should have been.
  • Eventually I side-stepped it, moved onto easy stuff, made progress and within 2 days had a more positive view of everything, then managed to fix the largest remaining issue in an hour.

really tl;dr

A couple of hard problems blew up out of proportion, I became overwhelmed, I temporarily moved on to easy stuff to make progress and suddenly everything was back into proportion and progress was made. Yay.

Debugging woes!

A quick update, I’m working towards getting the last major bugs sorted and then I can get to the real work of level design.

I spent a few days last week tracking down a crash bug that wouldn’t occur if the debugger was attached. It’s painful but the only way to deal with those is work systematically through everything that could be wrong and fix it (there was no way to get output around the bug so even printing info to the screen didn’t help much). Bright side – I probably fixed a few things that would’ve blown up later anyway, so it wasn’t a complete waste of time.

The voice acting is mostly done now, I’ve been wanting to show that off in a short video clip but for some reason nothing seems to be able to record the audio on my machine – I’m guessing something’s got exclusive use of the output so nothing else can grab it, though it used to work, I don’t think I changed anything and I can’t get it to work after hours of trying. I’ll try again later.

lith

Improved senses

In playtesting, Touch Of Darkness was proving very confusing just to work out which way was up, let alone which way you were facing.

Obviously it’s supposed to be disorienting but it shouldn’t be possible to lose your own hands. That would be careless.

I’ve made some changes so you should generally know where your hands are, and now as you look up and down there’s a faint horizon line that helps you orient.

It’s getting towards being able to navigate your way around a level without relying on luck.

lith

New Audio Dynamite

Not really dynamite, but there are now fire and dripping sounds added to Touch Of Darkness – really adds ambience to the levels and also helps with navigating (quieter/louder as you get closer or further away, 3D audio so you can tell which direction it’s coming from).

Also you can feel the heat from the fire so you know what direction it’s coming from and walls cast a heat shadow so you know when something’s blocking line of sight with it.

lith

UE4 Screen Edge location

I’ve seen various requests for how to calculate the screen x,y coords of an off-screen object and the point on the edge closest to it – using Blueprints.

I saw them because I was looking for a way to do it and didn’t like what I found, so I’ve made my own and I hope this will help others.

Below is a sample of it in use, and the blueprint screengrab below that:

unreal-screen-edge-example

 

The function:

unreal-screen-edge

It returns the point on the edge of the screen that’s between the center of the screen and the target point if you draw a straight line in 3D space between the two. It also takes a margin (0 = no margin, 1 = center of screen, 0.5 = half way between those) if you don’t want to use the actual screen edge for whatever reason. It should cope with different screen resolutions and aspects without any trouble.

It also returns the float angle in degrees heading towards the target – used above to orient the arrows.

Edit: There should be an ABS node in “Use resulting screen coord to find screen edge and angle”, just after the first “+” node. Of course I discovered it immediately after posting this. D’oh.

unreal-screen-edge-correction

Cheers,

lith