Devlog Week 55-56

Glitches and corruptions

I was messin around in Unreal, and while switching between Lumen and baked lighting the textures appeared corrupt. It looked good with the dream ASCII filter on top.

Lightmap glitch + dream effect

And I thought a bit about replicating the effect. The first thing that came to mind was to corrupt a PNG file by altering one of the bytes in the beginning, and it worked better than I expected. This is the result of changing *only one* byte. (I also added edited it in Affinity Photo by resaving as very low quality JPEG and then increasing the contrast and overlaying it on top of the original corrupted png)

Corrupted PNGs

I also wrote a generic file corruptor (that’s somehow not my weirdest little program). You can control how the interval of bytes it leaves between each corrupt one. I applied it on a video and a sound individually then combined them together, and it looks like scratched VCDs/DVDs.

Corrupted video

Here’s the python code if anyone is interested.

File_corruptor.py

Blockouts

I worked on the blockouts a bit more. Not a lot has changed since last time, but I worked a bit more on the location of things (shops, cemetery, fields, forest…etc). I still didn’t implement them in the world, but I left a few cubes and text render actors as a reminder.
I also switched the lighting to a sunset to setup the mood for the beginning of the game. I re-enabled the NPC paths and chatter/greeting. I’m actually surprised by how alive and busy this feels with just a bunch of NPCs walking around. Normally it wouldn’t be this busy, because most people are gathered in groups, at work, in the cafĂ©, at home…etc. and only a few of them should actually be walking.

Blockout and lighting update

Interaction System features

Set Player Transform

I added a new component “set player transform”, which, as the name implies, set the player’s transform when an interaction starts.
It is meant to position the player in front of an NPC when you talk with them, and it should be hidden with a camera cut. It can be instant, or have a transition time if needed. Alternatively it can rotate the player toward the object/NPC regardless of where you stand.
This only affects the player if the object has that component.

Set Player Transform

While working on it I picked the wrong axis and interpolation method and forgot to account for scaling and had these funny bugs

The scale bug was interesting so I tried it out. Maybe there will be an opportunity to use this as a mechanic in one of the dreams.

You are now small

Interactive Cutscenes

I wanted to have cutscenes that play while you’re talking/interacting. Nothing impressive in the test, but I need this for some interactions.
A cutscene ends when the current interaction ends or when another cutscene is called, or when the cutscene itself is over. I need to find a way to make the cutscenes pause on the last frame, but maybe I’ll just leave a veeeeeeeeeeeeeery long empty chunk at the end of the cutscene’s timeline.

Interactive cutscenes

Follow Spline

One last important feature I wanted was following an NPC while also talking. I did not know what would be the best way to do it. I was thinking about giving the player full movement control, but I don’t want players wandering and going where they shouldn’t go yet, and I didn’t like “hey come back here!” because I felt it was more annoying than not having control. So I ended up with this idea, where an NPC (or the player) can follow a spline, and another NPC or the player can follow them as they walk.
This is the first iteration : a target is spawned on the spline, and it advances if its follower (the player in the first half of the video, or the dog in the second) is close enough. When the target reaches the end it goes back to the beginning if “loop” is checked. Otherwise it stops there. You can see the target not advancing when I block the dog’s path.

Follow Spline v1

The player moves without any input from my controller (except camera rotation)

Look ma, no hands!

In the second iteration I added the secondary pawn. It can be any NPC or the player.
In the following video the dog is the main pawn, and the player is the secondary following it. I also added an option to interrupt and trigger the spline following.

Follow Spline v2

And finally I integrated it with the interaction system, so that it can be triggered from talking to an NPC. I also added an option to stop walking if you haven’t progressed through the conversation enough. The NPC can show you the town and introduce you to people.

Follow Spline (Full Demo)

Here is the data table, used in lines 6, 13 and 16 to stop (notice the “stop” in the row “Extra C”).

There are some bugs to fix and features to add, but the hard/tedious part is over.

Misc

I tested the performance difference between C++ and Blueprints for the scrambling function. This is probably the worst case scenario for Blueprints, because it’s a lot of extremely small operations repeating hundreds of thousands of times. C++ did 1000x more iterations in a shorter amount of time.

C++ vs Blueprints performance

Here is my code in Blueprints vs CPP.

I fixed some bugs and made minor optimizations, and wrote a draft for a mini game.
I’m also trying to play more indie games, aiming for an indie game each two weeks at the very least. These two weeks I finished Resident Evil 5, replayed The Beginner’s Guide and a bit of Night in the Woods. I aim to play weird/unusual/unique games for inspiration and appreciation.

That’s all for this devlog, thanks for reading, and I hope to see you soon!

Leave a Reply

Your email address will not be published. Required fields are marked *