Frictional Games Forum (read-only)
Terminal Project Grab-Bag (Color Picker / DOS-Style / Video Player) - Printable Version

+- Frictional Games Forum (read-only) (https://www.frictionalgames.com/forum)
+-- Forum: SOMA (https://www.frictionalgames.com/forum/forum-55.html)
+--- Forum: User created content (https://www.frictionalgames.com/forum/forum-79.html)
+---- Forum: Development (https://www.frictionalgames.com/forum/forum-82.html)
+---- Thread: Terminal Project Grab-Bag (Color Picker / DOS-Style / Video Player) (/thread-52385.html)



Terminal Project Grab-Bag (Color Picker / DOS-Style / Video Player) - Abion47 - 08-17-2016

Alright, there are a few things I've been tinkering with in terms of making terminals bend to my all-mighty will. They were originally meant to be PoC's, but ended up just being my own personal tinkering. That said, these three are polished enough that I've decided to just post them all in a single compilation post.



Color Picker Tool





This one was less an attempt to make something specifically useful and more just to see how involved it would be to make an entirely new widget using ImGui functions. As you can see, it's entirely possible, but it involves some of the lower level functions for getting mouse position within the terminal window to make it work.

Now that it's figured out, though, there are a lot of different things that I could make. A color picker... To be honest, I'm not entirely sure how much practical application it would have in a CS, but the principles behind how it was made can be used to create other widgets, such as maybe a live Google Maps style tracker or something.

DOS-Style Classic Terminal





What the last project did for mouse input, this one does for keyboard input. I thought it was weird that, for all the stuff that SOMA does with terminals, not a single one takes keyboard input directly. Even the keypad StationGui apps are just number pads that you have to click with the mouse manually.

Well, I aim to change that with the DOS terminal. Using the same class of lower level functions, the terminal is now fully keyboard-enabled. Not only that, but it's set up to accept simple commands, and records a history of lines of text, just like a classic console terminal should. Isn't the future great?

Video Player





Another oddity for SOMA is that there is no native support for playing video files within the game. Even some of the stuff you would attribute to video, such as the video on the train or the orientation sequence at Upsilon, are really just timed slideshows.

Well, as it turns out, there's a way to play videos in SOMA, albeit in a roundabout fashion. It's still a slideshow, but it is timed in such a way that the frames go by at the same rate as a typical video. At the same time, the video's audio is played over the top of it, similarly timed.

This one takes some setup to accomplish, but the result is a video getting played within the game's engine. I think this opens up a number of other possibilities for mods, now that they can play pre-rendered recordings instead of having to rely on either static images or in-engine sequences.


RE: Terminal Project Grab-Bag (Color Picker / DOS-Style / Video Player) - A.M Team - 08-17-2016

Thank you so much! This will be amazing for my mod.

+REP