Monday 12 September 2022

Unreal Engine: The viewport

<Lone lamp on ceiling flickers>

<Looks at it in annoyance>

<Looks around bunker for other light sources, finds none>

Oh well. Shouldn't complain. Having internet and power in the Zone is a miracle already. 

I mean, try getting connectivity while working on a dusty old basement in a Soviet-era ruin.

Now, where was I... oh yeah, Unreal Engine.

Now I finally have it up and running.

<Pulls out monkey wrench> I suppose it's time to find out how do you use wrenches with this thing.

Also, on second thought... there's something missing here.

<Looks around bunker>

<Notices radio> 

Aha! We can't do S.T.A.L.K.E.R. stuff without a proper soundtrack, now can't we?

<Turns on radio>

And so our journey today begins with Kino's Spokoynaya Noch. I wonder what Viktor Tsoi would say if he had lived to see these times...

Okay, setup complete. Let's get to it. <Grabs monkey wrench>

The viewport, or the place where stuff happens

So, in order to check out what the viewport is, we gotta create a new project. 

In we go. On the left pane we gotta select 'Games'.

Captain Obvious to the rescue.

Soooo... what's this... templates for projects. First person, third person, top down... I don't guess I'll get done a lot of stuff on the top-down perspective if I get to mod or work on STALKER.

Well, this tutorial says to get started with a third-person template, so that's what I'm picking.

Now, there's a pane on the right-side of the screen describing what this third-person nonsense is about and a variety of options.

Target platform... well, I'm not doing stuff for mobile. (Not yet, at least. Who knows.)

Quality preset... maximum? Isn't that going to make my rig crash and burn? Let's hope not.

Starter content... now what's this. Hmmm. No idea. The guide says to uncheck it. Fine by me, I don't have a clue what it does.

Raytracing? No thank you, I don't want to add to the chances of my rig deciding to go on strike.

Sir, yes sir.

<The Random Number God on DJ duty decides to play next Sveta's Drugaya. Sorry. I don't have the source. It's an awesome rap in Russian.>

So, next: select a location for the project. And a name. Fairly standard stuff.

Then for magic to happen there's that 'Create' button to press, I suppose.

I guess there's no such thing as too obvious, some captains to the contrary.

Now, to sit back and wait while Unreal Engine does its thing.

<Maliciously snarking> I hope it doesn't take as long as it did to download it.

Thankfully it does not. Some 15-20 seconds or so for me. (Still an absolute eternity in computer parlance.) Well. That's what I get from using Soviet-era hardware, I guess.

Et voilà!

Hold on, this isn't what I hoped to see on a Soviet-era rig...

So, here I am. What's next? <Reads guide>

Hmmm... so, the vaunted 'viewport' is the big area in the middle.

So much info and gimmicks I got absolutely no idea about...

Well, starting with the basics again.

There's the level name on a tab on the upper left corner of the viewport.

And this level can be played if we click on the big green triangle, here.

So how about I go and do exactly that...

And the viewport changes into this.

It's alive! IT'S ALIVE...! *clears throat*

This doesn't seem very STALKER-y... oh well. I've started from lower than this.

<RNG-powered DJ plays: Sektor Gaza's Dopilsya. Awesome.>

This android-ish avatar here won't move on its own. Gotta give it some input. We can't do that unless we click on the viewport first.

*Click*

Now... oh, typical ASD keys and mouse. Spacebar to jump. Well. Makes things simpler, I guess.

Those blue cubes are supposed to be... what, stuff you interact with? Oh, you can push them around and stuff.

Meh, this gets boring fast. I want to get to do some stalking already.

But there's a lot of learning to do first. 

So, to stop the 'game', gotta press the Escape key...

<Presses Esc>

Odd. Now the screen is in a different place...

I mean, the viewport is not where it was as it first loaded.

A wizard did it.

Well, of course it isn't there. I just moved around in this drab, gray, empty world.

There's gotta be more to this. Doesn't look like I'm going to do much modding or content creation this way.

<Reads guide>

Well, there's the simple, intuitive way to move around. To quote...

"Click inside the viewport and it grabs hold of your mouse pointer."

*Click*

Now that was anticlimactic. Nothing happened.

<Clicks again>

Hmmm... maybe this transcript is wrong somewhere... 

How about we go with common sense instead.

<Clicks and holds, wiggles mouse>

Now we're getting somewhere. 

Doing that actually lets you pan the camera around. 

So what happens if we hold click and move straight in this or that direction... oh. 

Moving forward or backward displaces the camera on the horizontal axis. Moving to the sides pans.

There's other tricks that aren't readily intuitive. Is this where the monkey wrench comes into play...? Ouch, nope, don't want to scratch the screen. No computer stores near this bunker to replace it.

The Q and E keys displace the camera on the vertical axis.

This stuff here says you can also use the middle mouse button... hmmm... let's see what it does...

Oh, apparently you can use it to move along both the horizontal and vertical axis without panning.

Sorry. Probably not descriptive enough. But you get an idea.

<RNG DJ: Another gem by Sektor Gaza, Kolkhoz Punk. Oldie but goodie.>

<Continues reading> 

Maaaaaaaaybe this is something I oughta have learned beforehand.

There IS actually a way to stop your rig from imploding.

Which is good. The Soviet-era hardware in this bunker wasn't supposed to handle this stuff, you know.

So, you click here first. 

Then... there's this thing... ah, here it is.

"Engine Scalability."

Ohhh, there we go. No wonder my rig feels like I would after running two marathons back-to-back.

Hmmm, now that I think of it, some elements of this interface ring familiar... 

And no, this wasn't around on the Soviet era.

I mean, you have similar tabs and panes on dev tools like IntelliJ IDEA or Android Studio.

There, you can pretty much arrange the working space any way you want. Undock panels and move them around, open and close tabs, that stuff. 

Apparently you can do that here too... Hmmm...

Oh, and someone thought up ahead. I mean, when we're screwing around with a new tool, we always end up closing something we need later.

UE ships with a default layout you can load up on the Window menu.

Whoever thought up of this deserves a medal.

Alright... so, what's next... 

Apparently there's a way to change the speed of camera movement, but it says you have to use the scroll wheel for that. It didn't work for me.

Oh well. I suppose I'll figure it out as I go. Thankfully the guides I'm checking out aren't written in Cyrillic. 

<Yawns>

<Reaches for lunchbox>

Oh well. This stalker has to rest now. Nutrition is important, you see.

Grab the lower rack when you feel like catching some Zs. The upper one is mine.

Cheers and see you around.