Low Entry Plugins

Did you update the LowEntryUE4 library? :stuck_out_tongue:

I’ve added UDP support, which required some changes in the connection making process.

Download link: https://public…com/files/LowEntryUE4/java/latest.php

To the Low Entry Extended Standard Library? Yes.

Edit: Oh, you changed the java code. <contemplates walking into the ocean>

No not the UE4 plugin, the Java library. You need to use a newer version of the Java library to make the socket plugin work with it.

No blueprint changed changes will be required.

We wrote our mysql connection code on top of your source. We use Eclipse (as per your long ago suggestion.) Could you outline the steps necessary to change the Java library? Or do we need new source code for the server?

We learn Java on as needed basis, so please, if at all possible, be verbose.

You downloaded the .jar and placed it in your project, right?

Just download a newer version, name it the same way, and then put that in your project (the new .jar should override the old .jar).

If you really can’t figure it out, let me know, I’ll make a short tutorial for this as well then.

Sorry to be obtuse, but which file in the project should be replaced? The name of the new download doesn’t match anything. Was it LowEntryUE4.jar?

It depends to what you renamed it to, the tutorial renamed it to LowEntryUE4.jar I think yeah.

You can also check if you can find it in the referenced libraries and then remove it from the build path, it should show up as a .jar file again then.

What is the new syntax for SocketServer? What args?

Its the same as before, the listener just has 2 more functions. Mouseover the listener and click on add missing implementations or somethink like that.

You can also check the socket examples inside the jar, which have been updated.

Okay, got the server running, but now client can’t connect.

Can you enable debugging with SocketServer.setDebuggingEnabled() before creating the server, and then try again and see what it says?

Also, you’re only passing one port to the server right? Otherwise it will listen for UDP as well, and then it will require the clients to connect over UDP as well.

Working now!

The debugging produced nothing that I saw.

I had both ports.

My apologies. Your comments in the code are excellent and I should learn to use the horizontal scroll bar to read them in full. :slight_smile:

Thank you very much for your fantastic help!

Edit: Operator failure. :stuck_out_tongue:

I am writing JSON to a file and it works well, but during this save the process freezes the game. Is there a way for me to detect rate and progress of the write operation and display it to the player? Can the write be run asynch so that the game does not freeze during this?

Hi Low Entry - first of all, thanks for the extended library plugin - it’s been really handy to me. As it’s Christmas, I’ve just had a spend and bought most of your other plugins.

I had a question for you which I haven’t been able to solve - I’ve been generating textures using BLUI (A Chrome based HTML texture buffer plugin, which is great BTW). But I want to save those textures out to disk to save me having to re-generate them unnecessarily, or on a system without an internet connection (or mobile). I’ve tried using the UE save game system, but the data doesn’t get to the save file - this is serialisation I think?. Should I be able to use your byte conversion nodes and your LE File Manager plugins to accomplish this?

What I’d really like to save is an array of a custom struct which contains lots of string and int data along with textures.

Thanks!

Writing to a file causes a freeze? That’s weird, since generating the JSON should take more time to do. Either way, there are no async file methods in the engine, so I can’t create blueprints for this.

What you could do is create a different thread and generate and save the JSON in that thread, which is a huge pain in the *** to get working I bet. You will also not be able to get progression from it, just whether it is done or not.

What you could also try is instead of saving data using JSON, try saving data using the ByteDataWriter classes found in the Extended Standard Library, they will create a far smaller result, which should be a lot faster.

What you could also try doing is compressing the data before you write it to a disk (if the writing to a disk is the slowest component here), since this will reduce the amount of data that will have to be written.

Anyway, if this doesn’t work, you’ll have to multi-thread it. I have no experience with this in the Unreal Engine, and I’m not certain whether you can do that in blueprint or not. I remember reading a tutorial from Rama about this, maybe you could give that a try.

To save data to a file, you will have to convert it to bytes first. I don’t know if you can convert textures to bytes, but that is what you’ll have to do.

To save an array of custom structs, you basically just have to loop through the structs and convert them to bytes one by one. The ByteDataWriters might help with this. (PS: you might want to save an integer before all of it, which will contain the number of entries in the array, so you know how many structs to expect when you read the data in).

Thanks for that - if it’s just regular data to save, like from a struct, i’m pretty ok with that. What I don’t get though is why you can’t convert textures. There are a lot of image loaders, but savers seem tricky for some reason - surely it’s just a block of memory with some header information. Rama’s got a node which saves off data pixel by pixel but there must be a way!

I think its because every platform can have a different way of saving the texture in memory.

I think the only way to properly convert it to bytes is by going through all pixels…

It would be useful if there was just a method for this in the engine itself, just like there are methods to convert image bytes into the OS texture format.

Anyway, maybe making a request to Epic will get you this feature (in several months time best-case scenario).

Or you could just loop through each pixel and just hack something together, like Rama did basically, which will get you something working right away.

Or you could drop this idea, or delay it until the future, when the engine has become more developed in this aspect.

Either way, there doesn’t seem to be a perfect solution possible right now, so if it’s not necessary, I would delay it until later.

I actually ended up removing the whitespace boolean which dramatically reduced the time required to save - it’s phenomenally faster now