Space Engineers

Space Engineers

Not enough ratings
Wolfenray's Raycast to LCD Viewscreen
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
9.773 KB
31 Dec, 2018 @ 9:32pm
13 May, 2019 @ 7:33pm
3 Change Notes ( view )

Subscribe to download
Wolfenray's Raycast to LCD Viewscreen

Description
Ever since that one time long ago when a guy could have a plug-in to start SE and have a "Live Camera Feed" (may that mod rest in peace" I wanted to have that back as a part of the game. Bridge viewscreens are cool, however, my skills as a script writer are limited. Still, I studied hard to find some sort of solution. I came across a build in my archives of workshop items where a guy made a raycast to lcd proof of concept. It really only worked up to 50m, and at 15x15 resolution. Yet the proof was there, so I started with that and worked from there.

So this is my amature attempt at C+ to make my dream of a camera to lcd viewscreen. It is simple and primitive, but with the communitys help I want to improve from the trail laid out here. So to make this work, raycasting must be amped up a bit. Meaning that you MUST have my modification, Wolfenray's Raycast Recasted. Once you have that, we can proceed.

Here is what it is, you have a camera and 2 LCD's.

Name one LCD - LCD Raycast
Name the other one - LCD Viewscreen
Name the camera - Camera View

Then run the script. It will work, and if you want to browse through the script I have it seperated enough so that you can change any configurable any way you want.

It has been noted in the comment section I forgot to mention the arguments to make the viewscreen work. The LCD Raycast will give the number of charges available (input measure of area able to scan). This number should be very large and ever increasing. The LCD Viewscreen needs the PB block to run the argument SCAN ON (in caps). Then the image will display on the screen. Once charges run out, the screen will start to blink. Use the PB argument SCAN OFF (in caps) to turn off the viewscreen and recharge the raycast.

This script will TAX your system. So have a beefy computer if you want to run higher resolutions. Plus, planets tanks the cpu as well. Still, if you set the resolution to 10x10 for planets or 35x35 for space you should not have much of a load on any moderate gaming computer. You can go as high as 140x140 if you have a monster beast of a computer (as I do) before the script becomes too complex to run. The 7500m range of sight does not affect the performance of your computer, surprisingly enough!

So there is a color scheme that displays on the LCD based on your distance from any object. This is what gives an abstract of what is in front of your camera. Here is the color scheme.

Black - Beyond sight (7500+) [Trees also show up as black]
Blues - Safe distance (4500m to 7500m)
Magentas - Safe distance (2500m to 4500m)
Greens - Acceptable distance (1000m to 2500m)
Yellows - Cautious distance (300m to 1000m)
Reds - Unsafe distance (0m to 300 meters)

Stay in the safe zones of an object or landscape by placing the blues, magentas, and greens into the center of your LCD. If you do this, you will never crash even if you are playing a dark game (such as with the Total Dark mod).

Like I said, my script is a cannibalized, self taught, amature attempt at scripting. My goal however, is to get a viable camera to lcd viewscreen of some sort to work within the game of SE. So I will be updating as I learn more ideas and have better scripting capability. Now I know that many of you have xp at this sort of thing, so PLEASE give detailed ideas on how to improve in the comments below. Also, I am totally willing to work with anyone who has skills at this, as all I want is the result and not worried about how or who got this to there!

Post Scriptum: I do not know how to get a thumbnail on IngameScripts. If anyone has an idea, please let me know so that I can get one on here! Thx.

May love be the inspiration of your deeds,

-Wolfenray73-
26 Comments
DomDiaemus 4 Sep, 2021 @ 11:24pm 
@Darian
Sorted! Many thanks
Darian Stephens 4 Sep, 2021 @ 9:07pm 
Did you add the required mod?
In Space Engineers, camera raycasting requires a certain amount of 'charge' in order to scan at a particular distance.
The mod makes it much more powerful, though, so charging so much isn't as required.
DomDiaemus 4 Sep, 2021 @ 7:19pm 
"...insufficient raycast charge..." what does that means? it appears on the LCD Raycast after running SCAN ON. Also no image on the LCD Viewscreen... I bit lost atm. Thanks
Emperor Augustus 12 Jun, 2019 @ 7:29pm 
Nvm wrong place
Emperor Augustus 12 Jun, 2019 @ 7:28pm 
Is this script supposed to widen my debug font?
nubeees 14 May, 2019 @ 7:17pm 
That's exciting!
wolfenray73  [author] 13 May, 2019 @ 7:42pm 
I have updated the script to reflect the depreciated definitions. Working on converting the monofont picture to the new sprite lcd capabilities. Will take some time, got a rough idea how to do it, and will be working with my son on it. Will be a MAJOR improvement, and I hope it will eliminate the taxation it makes on the cpu. If so, then that will be a big step to making this a viable script for everyday use.

Anyone got ideas on script language that will help convert to the new sprites has my attention, and welcome any knowledge given on the subject. As I stated, this is a project I want to see succeed so credit given is no problem for me.
dRuPpI 5 May, 2019 @ 6:05am 
... it's strange how I browse the workshop every day and still miss stuff
dRuPpI 5 May, 2019 @ 6:04am 
:steamhappy::KSmiley::steamhappy::KSmiley::steamhappy:
nubeees 15 Jan, 2019 @ 8:47pm 
you have no idea how long I've wanted someone to do this, even if its really taxing