Categories
Programming

Diving into Electron Desktop Applications as a Newbie

I’ve decided to hang up my C# cape in favour of trying out Electron to run the new https://streamupdater.com desktop application. It has one job, take the process list of the user, and send it to the API for processing, easy as pie! Surely it can’t be that hard?

Issues

Already, I got an error GPU process isn't usable. Goodbye. and GPU process launch failed: error_code=18

Fixing this was a case of adding no-sandbox to my start script ala:

  "scripts": {
    "start": "electron -no-sandbox ."
  }

If I had to guess, this is because I’m running all my development tools via a network share. Funny, the more complex your envrionment seems to get, the more it tends to break. I genuinely wonder if people have dedicated machines for absolutely every aspect of their life, (development machine, gaming machine, youtube editing machine)

Categories
Programming SHAR Project

SHAR – Visual Studio 2019 Import

Windows 10 – Visual Studio 2019 Updating

First, I started by importing the project into Visual Studio 2019, accepting any changes it requires to change project files to the new format, next I rebuilt the solution just to see what might happen, expecting tons of errors as the software surely wouldn’t have been compatible going from 2002 Visual Studio to 2019 in one go.

Sure enough, during the build process I was already getting hundreds of errors such as

'strcpy': This function or variable may be unsafe. Consider using strcpy_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details.

Seems like the best course of action here would be to install VS Studio 2002 and select it as the toolset for compiling. Far to many BCs between 2019 and 2002 (duh)

Gonna give that a try…

Categories
Programming SHAR Project

The Simpsons: Hit & Run Source Code Leaked

Seems like someone somewhere is having a bad day. Simpsons Hit and Run (SHAR) has been leaked via 4chan. Not entirely sure how it dropped but as someone extremely interested in game development, projects releasing like this is a fantastic learning opportunity to see what is out there working in the real world. This one is especially great as it effectively comes with all the documentation concerning the entire game development process.

To be clear, not going to link the mirror links that are everywhere on the internet, but I’ll help you get setup!

Note, currently something I am working on so you’ll see this updated every now and then

Windows XP VM

  1. Setup Windows XP VM
  2. Install .net version 1.0 (https://download.cnet.com/Microsoft-NET-Framework-Redistributable-1-0/3055-10250_4-10725994.html)
  3. Install Visual Studio 2002
  4. Open the project
  5. Rebuild the project. If you build it at this stage you’ll have about 600 errors, you need to rebuild the entire thing
    • (NOTE, I HAD THIS MOUNTED ON A NETWORK PATH, THIS IS NOT POSSIBLE, EXTRACT SHAR TO YOUR LOCAL DISK)
  6. Navigate to shar\game\build\win32\Release and your newly compiled Simpsons Hit and Run should now be there!

Now, developing on Windows XP with Visual Studio 2002, isn’t exactly the best thing ANYONE would recommend, so let’s work on exporting to Visual Studio 2019.

Categories
Gaming Programming

Update your Stream Title / Game automatically

We’re all busy streamers wanting to keep the content flowing for the fans, nothing worse than playing a game just to realise you’ve been in the wrong category or your mods weren’t able to switch the title. I’ve developed a quick and easy solution with StreamUpdater.com

Use our App and send your processes to StreamUpdater. You’ll see them on the other end and when you do, you can build actions off that. So let’s say if the process Fallout3.exe loads up, you can have your twitch title change to be all about a Fallout 3 stream!

Here’s how to do it!

Login using your Twitch account at https://streamupdater.com

Download the App ( https://streamupdater.s3.eu-west-2.amazonaws.com/assets/Release.zip)

Click the Add Activity Button

Fill in the details with what ever you want. Be aware though the game won’t change if you don’t enter something that is actually on twitch.

Once that’s all done, StreamUpdater will scan every minute and change your Twitch Stream/Game as soon as it detects that program running. It’s that easy! So try it out today, I’ve been enjoying testing it over on https://twitch.tv/kaibasean as has my mate https://twitch.tv/profrisky.

Lot’s more ideas coming soon for it, let me know what you think!

Categories
Programming

Unreal Engine 4 – VaRest Storing Response in Variables (Response Code, Response Body)

VaRest one of the most popular plugins for blueprint REST api calling does allow you to also capture the response that comes back.

My issues were that whenever I tried to get the response code or the response body it wouldn’t pull the data (Response kept coming back as -1). Long story short, this is because I never used any event bindings, so effectively as the screenshot shows below, this will only run when the request is complete, before I was trying to store the data before the response even came back. Easy mistakes like this cost time!

Be aware, there’s no checking for fails in this, my view on this is, if the game login api is down, the game won’t launch anyway through other health checks!

 

 

Hope this blueprint helps you! My API is responding in JSON, I recommend your API do the same.

Categories
Programming

Unreal Engine 4 – Always show mouse on Widget/UI

If you’re like me you’ve used a widget for the UI over a version of the game world. A similar sort of style to how World of Warcrafts look

Obviously, not as great, but a similar concept!

You might be having an issue were the Cursor, when it clicks on the level it disappears! Then you need to do Shift+F1 to get it back again or wave it over the boxes you have.

No more! Simply change this setting on the widgets CanvasPanel and it will sort it right out!

Should make the Cursor appear over everything! No more clicking the world!