f-log

just another web log

31 May 2020:
dunking vr after alyx and mini-me creates own world
And Bonk It! is why you should never give me access to a VR system, that does not have be dismantled constantly over a three day weekend.

I continue to be enamoured with Half Life: Alyx. Time disappears without trace when I am in that world, but ...

although the experiences in Alyx are constantly evolving and increasing in difficulty, I do wonder if this is it.

I went on the Steam VR games list and apart from Super Hot, there seemed to only be short "experiences", Escape-the-room puzzlers and First person shooters, some without zombies, most with.
(I am not interested in the rhythm games)

and then my son asked if he could make a VR game.

With a little help, he created a fully playable Basketball game. With scoring, ball return and custom textures on the ball and the backboard. There was also a quickly Blendered basket with hoop and net.

Now the VR has to sleep again...
30 May 2020:
BonkIt vr game written in unreal engine released to the world
Bonk It! a VR game created in Unreal Engine

Gameplay video


In depth video looking at the Blueprints used.


Github Repo of the entire project
https://github.com/robgithub/BonkIt

It is worth pointing out, this is my first attempt at creating a game in Unreal Engine and I might not have followed best practices. But hey, it works and is surprisingly fun.
28 May 2020:
Seeing straight through Unreal Engines opaque smooth face from Blender
Another quick couple of Unreal Engine notes. This time around Blender

When exporting as .FBX go into the Geometries tab and set Smoothing to Face. This stops an error on import if you have any smoothed faces.

The other one, is when you want a Transparent material in Unreal to match what you had in Blender In the UE Material editor set the Blend Mode to Translucent. This adds a new Input "Opacity".
28 May 2020:
Lose my grip on Unreal Engines blueprint for hands
One of the things in my old Unity VR project was Grabbing. Detecting the trigger on the controller being pulled when connected to an object.

It seemed so easy. I could already get the BP_MotionController object when it interacted with an object. Surely all I needed to do is test if the Trigger state was "pulled"?

NO!

There is no Trigger state. You have to code your own.

Edit the MotionControllerPawn(prawn) Blueprint. This is the "player" in the game environment and includes the camera and auto generates the Motion Controllers.

Now the actual code(Blueprint Nodes) is not very complex. You can add a globally visible flag or generate an event on your object.
but ...

Unreal kept having "issues" while I was editing this and the controllers would stop being able to "grip". As everything else functioned correctly I assumed I had messed up the Blueprint. The hand closing animation was not even working.

I tried a few "Save All"'s and Rebuilds and it actually seemed to get worse!

At my wits end, I restarted Unreal Engine and it just started working again. Then it failed about 30 minutes later, but this time "Save All" and Rebuild did fix it. Then it failed a while later and only a restart would fix it. Then it worked consistently.

Did I get to create my VR game in the end? Actually, yes and more on that in future posts.
28 May 2020:
Unreal Escape from the Epic Engine IDE blueprint
There are many options in Unreal Engine IDE, including one that creates a separate process for a standalone version of your VR game. Sounds good?

There is no way of exiting ... Had to Alt-Tab out and then kill it.

The solution is to edit the Level Blueprint. From the Blueprints menu.

You add a Node and search for "Keyboard" and then scroll to "Escape". Connect this node to a "Quit" node.

Now pressing "Escape" in the game quits it.

Oh! and what ever you do, do not click the Launch button. It started another mass Shader Compile, with no feedback and I only saw the processes in Task Manager. This time there were 7000+ Shaders to compile.

And don't use the default map in the VR starter template, doesn't really work. Instead go into the VirtualReality/Maps/ and open the MotionControllerMap. It has teleporting, grabbing and a basic design.
24 May 2020:
unreal engine for the vr pizza fail
In my random and chaotic world, I thought it would be fun to try and create quick VR game in Unreal Engine. Never tried Unreal before, but had been recommended to give it a try and the recent news that it was now more creator friendly made it a no brainer.

Download the Unreal Engine: NOPE you cannot download Unreal Engine. You have to install Epic Games Launcher, which you get from an installer from https://www.unrealengine.com/en-US/get-now and, of course you have to sign up for an account.

So you download and run the mini installer and that installs the "Launcher" and from there you can install Unreal Engine. But there was a small problem, it kept failing. Weird cryptic error codes.

It took so long to install, I walked away. What I did not see was the Windows UAC asking for permission and then timing out after a short while. UAC normally sticks around until you action it, but Epic have out done themselves and created an auto fail system. I guess in most cases it would auto succeed and no one thought to check it on a UAC system.

Finally got past that, numerous times, because it never happened at the beginning of the install. Then a reboot was required... erm hello? it is 2020 we do NOT need reboots for random user software!

Then I had to allow three different firewall changes... Yes really, not looking good. Then the actual install of Unreal Engine could start and that took hours.

OK, OK, so it is installed and I can make basic VR world to test the setup?

Starts well by directly offering a VR world Game type as a new project base and then ....

Oh dear! The initialisation process seems to have stalled at 39%. Wait half an hour, no change, so kill it and try again, same issue. Googling around and ... lots of people have this issue and the fix is to ...

WAIT

and
wait and wait

another hour passes and Unreal Engine IDE appears !! and then the shaders start compiling. Over 3500+ of them and they take another 20 minutes.

Now I am in Unreal Engine IDE. I look around, take the tour and everything seems hunky dory. Click to start VR mode and ... you must restart Unreal...

Its back and everything has loaded and I notice Steam VR has automatically started.

With great trepidation I start VR and put on the headset and I am in VR and ...

Oh, wait. The head set is way above the play area and I cannot teleport. But the thumb disk on the left controller brings up a multitude of options. And, although I can cycle through them, none of them work!

Time for bed.

Find a short YouTube video that explains that it is a "pallet" and you have to use the other controller to select the options. Doh!

In other random news; I ate a very nice Pistachio pizza last night :D
23 May 2020:
the worst working nodejs slide show project ever
A little while ago I made a Raspberry Pi 4 into a Wi-Fi access point, with no access. As the whole point was not to give Wi-Fi clients internet access, but to see if I could host something only Wi-Fi clients could see.

The guide from Raspberry Pi is specific to the new Pi 4, but that's great because all the internet guides for Pi 3's fail.
https://www.raspberrypi.org/documentation/configuration/wireless/access-point-routed.md
(I just missed out the routing section)

And then I wrote the worst NodeJS server ever ! that works :D

It is a simple slide show web page and server. The idea is you can connect any USB drive and it will compile a list of images and show them in the browser.

Why is it the "worst" NodeJS server? Well I used the Express module and then wrote my own view engine. I the most simplistic way, rather than using Jade etc.

Thing is, I didn't need anything more complicated.

As a server it has to serve to the browser
Login page
Slide show page
JavaScript file
Images

and that's it. And the view engine boils down to loading the file into "template" and setting key/value pairs into "model"

function renderTemplate(model, template) {
    let reg = "";
    for (let [key, value] of Object.entries(model)) {
        reg = new RegExp('{-{' + key + '}-}','m');
        template = template.replace(reg, value);
    }
    return template;
}


Worked perfectly for my simplistic needs.

There also a placeholder security login system that if you have the source code can be deciphered very quickly.

Oh, and it looks awful, bold colours and inconsistent design. But, you know, it works.

Pi Presentation Hub screenshot

The client logs in and requests the catalogue of images be loaded. Then once the GUI is closed the JavaScript requests the image by number and delays before requesting the next in sequence.

It has some sophisticated screen resolution and scaling abilities, not to mention a Full screen mode. You can also manually step forwards and backwards through the slide show, enter and image index or request a random index.

It works, it is useless and I will probably promptly abandon it. Still, it was fun to make.

GitHub repo
23 May 2020:
setup for three days of alyx headcrabs
It is the bank holiday weekend, so the VR setup is staying set-up for three days!

Half Life: Alyx is still amazing, I mean it amazes me every time I play it and the Alienware 15 R2 from 2016 has everything on the lowest quality.

The Alienware 15 R2 laptop's specs are
Intel i7 6700HQ CPU 2.6GHZ (four cores) 16GB
NVIDIA GeForce GTX 970m

I cannot imagine it with more detail, except resolution. The settings state the textures are on Low and the flickering lights and cloth mechanics are off. There is also a Low settings for Rag doll physics. But in the game I can put objects next to my face and read tiny text and other details and pickup dead enemies and their bodies rag doll as expected. Not sure I would want flickering lights and I have not seen any scenes that have materials I would expect to act as cloth.

The game play is so varied. You can sneak around and even use objects as shields. From one of the many pieces of trash littering the levels to headcrab shells and even doors. The door mechanics are so well defined that I could look through the window in the door and put my gun through the gap and shoot, while my other hand controlled the door.

There is one odd bad problem with Alyx. Every now and then the frame rate will drop to 4-5. Now the obvious answer is my rig is not powerful enough, but there are plenty of people with super high end gaming rigs worth thousands who have the same issue. No one is sure what causes it or what fixes it. The most guarantied fix is to save your game, exit to the main menu and reload it. But this shows the machine IS capable of running that part of the game. I have my theories, but today I only had it happen once in hours of game play, yet the other day it felt like it was every 20 minutes.
The fix used today was to leave the game running and open the Settings in Steam VR, turn off Smooth Motion, close settings and return to the game. After it fixed it I then turned it back on with no ill effects.
23 May 2020:
is there nothing better than half life alyx
I have been playing Half Life: Alyx ...

...

AND IT IS FRIGGIN AMAZING!!

Best VR experience to date in every aspect.

Graphics, immersion, fun, scope and diversity in gameplay.

This really is VR turning a corner.

What's more amazing is it runs fine on the 2016 laptop we got when we bought the HTC Vive.

One thing to note is the horror aspect of this game. Yes, it has great puzzles, combat and exploration, but there are some nasty bits and a lot of blood and gore.

Not suitable for kids.

Still a major pain to get hardware setup in a tiny room at night and then taken down again each day, just so the room can be used for home schooling.

Lots of the original reviews of the HTC Vive mention the screen door affect, where you can see the pixels. I notice it a lot with the Zombie gallery, where the cardboard cut-out zombies are mostly solid cartoon colours.
In HL:Alyx I see none of that and become completely immersed in the range of dark, light, open or closed environments.

There are lots of interact-able set pieces, from matchboxes that if shaken rattle, to severed heads missing skin, from 3.5in floppy disks, to alien worms, that get crushed to give you health.

I was wary of the price £46.99, but it is worth this and so much more.
04 May 2020:
genius genie javascript grabs geany themes
I decide to try Geany as my IDE, after finding gVim not quite up to the task. It has great syntax highlighting for HTML, CSS and Javascript. Plus lots of IDE-y things like collapsing brackets and symbols list.

Problem was, I was trying it at night and the white background was burning my eyeballs. Not to worry everything comes with a Dark theme now ... Except Geany, but it does support Themes!

There are 34 Themes and over half of them are "Dark"...

Open Javascript console on that page and run
Array.from(document.links).filter(x => x.href.endsWith("conf")).map(y => "wget "+y.href)
(*breakdown at the end)
to get
[
wget https://raw.github.com/geany/geany-themes/master/colorschemes/bespin.conf
wget https://raw.github.com/geany/geany-themes/master/colorschemes/black.conf
wget https://raw.github.com/geany/geany-themes/master/colorschemes/darcula.conf
wget https://raw.github.com/geany/geany-themes/master/colorschemes/dark.conf
wget https://raw.github.com/geany/geany-themes/master/colorschemes/dark-colors.conf
wget https://raw.github.com/geany/geany-themes/master/colorschemes/dark-fruit-salad.conf
wget https://raw.github.com/geany/geany-themes/master/colorschemes/delt-dark.conf
wget https://raw.github.com/geany/geany-themes/master/colorschemes/epsilon.conf
wget https://raw.github.com/geany/geany-themes/master/colorschemes/fluffy.conf
wget https://raw.github.com/geany/geany-themes/master/colorschemes/gedit.conf
wget https://raw.github.com/geany/geany-themes/master/colorschemes/github.conf
wget https://raw.github.com/geany/geany-themes/master/colorschemes/himbeere.conf
wget https://raw.github.com/geany/geany-themes/master/colorschemes/inkpot.conf
wget https://raw.github.com/geany/geany-themes/master/colorschemes/kugel.conf
wget https://raw.github.com/geany/geany-themes/master/colorschemes/metallic-bottle.conf
wget https://raw.github.com/geany/geany-themes/master/colorschemes/monokai.conf
wget https://raw.github.com/geany/geany-themes/master/colorschemes/notepad-plus-plus.conf
wget https://raw.github.com/geany/geany-themes/master/colorschemes/oblivion2.conf
wget https://raw.github.com/geany/geany-themes/master/colorschemes/pygments.conf
wget https://raw.github.com/geany/geany-themes/master/colorschemes/railcasts2.conf
wget https://raw.github.com/geany/geany-themes/master/colorschemes/mc.conf
wget https://raw.github.com/geany/geany-themes/master/colorschemes/retro.conf
wget https://raw.github.com/geany/geany-themes/master/colorschemes/sleepy-pastel.conf
wget https://raw.github.com/geany/geany-themes/master/colorschemes/slushpoppies.conf
wget https://raw.github.com/geany/geany-themes/master/colorschemes/solarized-dark.conf
wget https://raw.github.com/geany/geany-themes/master/colorschemes/solarized-light.conf
wget https://raw.github.com/geany/geany-themes/master/colorschemes/spyder-dark.conf
wget https://raw.github.com/geany/geany-themes/master/colorschemes/steampunk.conf
wget https://raw.github.com/geany/geany-themes/master/colorschemes/tango-dark.conf
wget https://raw.github.com/geany/geany-themes/master/colorschemes/tango-light.conf
wget https://raw.github.com/geany/geany-themes/master/colorschemes/tinge.conf
wget https://raw.github.com/geany/geany-themes/master/colorschemes/ubuntu.conf
wget https://raw.github.com/geany/geany-themes/master/colorschemes/vibrant-ink.conf
wget https://raw.github.com/geany/geany-themes/master/colorschemes/zenburn.conf
]

(I removed the quotes and commas)

These Theme files go in a folder colorschemes. Which on my machine was
~/.config/geany/colorschemes

Change into this folder and then copy & paste all the wget commands to download all the Themes

They are now available in the Geany View menu.

*What was all that crazy Javascript?
Array.from(document.links) gets all the page links and converts them in to a standard Javascript Array. There were exactly 100 on that page.
.filter(x => x.href.endsWith("conf")) then only returns results where the href ends with "conf".
Finally .map(y => "wget "+y.href) creates a string "wget" + the link value.
loading results, please wait loading animateloading animateloading animate
[More tags]
rss feed

email

root

flog archives


Disclaimer: This page is by me for me, if you are not me then please be aware of the following
I am not responsible for anything that works or does not work including files and pages made available at www.jumpstation.co.uk I am also not responsible for any information(or what you or others do with it) available at www.jumpstation.co.uk In fact I'm not responsible for anything ever, so there!