Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Austin

17
Posts
4
Topics
4
Followers
A member registered Apr 08, 2022 · View creator page →

Creator of

Recent community posts

of course!!! have a great day as well. Sorry if it was too much, I enjoy this kind of interaction and want to show I’m dedicated to help/fix

okay I’ve further updated how the oscillator calculates x to guarantee it hits the correct extremes: image.png

it’s possible to further refactor this but I like simplicity because it helps me return to the project and mentally load the code when needed. I’d like to also note that my implementation is an alternative implementation to Barotrauma and may not function exactly. They use a phase value which I call “x” and modulate the value wherein I am “ping-ponging” a value to determine a position in the wave form.

Barotrauma Oscillator

here’s the calculations for each wave form: image.png

I updated the frequency calculation (which I forgot to do after taking screenshots) so that it isn’t at half herz. With that said, after some testing I think it all works now… let me know if you disagree. I’ll publish the new version soon.

I also found some other bugs/issues while testing that will be included.

Here’s what the logic looked like prior to this bug: image.png

I’ve updated the signal processing method to behave as you described: image.png

For frequency, I realized I was modulating by a value of 1, meaning the value of x will always be between 0 and 1. image.png

This worked (mathematically) but where it falls short is accuracy. Time in Unity is not inclusive to every possible moment of real time, making the incrementation (and thus calculation) inaccurate. It stutters and doesn’t increment as you would expect, so I had to change how x is calculated.

^ TLDR: the numbers were getting skipped because Time.time is not accurate.

Pulse has been updated to look like this, using delta time instead of application time: image.png

I tested this with a light component, it can toggle the light on/off with every pulse.

This fixes pulse, I am going to continue on the others, even though I believe they’re working now. But I will continue to test.

thanks for the detailed bug report! I’m glad you’re getting use out of the tool! I’ll be looking into this now, thanks :)

If you think you found an issue with the tool, this is the spot to post about it. I can’t guarantee I’ll be able to get to every request but I’ll try my best.

Please check existing posts before posting your own topic/issue.

Please also include screenshots, videos, etc. and excessive detail about what you were doing, how you were doing it, and what the result was.

Poorly worded posts may be ignored.

CS2 has an issue tracker that displays common errors and data type mismatches between signals. Let’s take a look at an example to learn how to read and use the issue tracker.

Below is a working component system. Each component has a tiny green light in its upper right hand corner to mean it’s functioning correctly.

image.png

The Adder component typically only works with numerical values. In the screenshot below I’ve changed one of the constant components values to a non-numerical field like a string.

image.png

You can see that the green light in the upper right hand corner of the Adder component is now a red light. There’s also an error displayed beneath the component. Additionally, there’s an error that appears in the Issue Tracker window in the top left hand corner of the screen.

image.png

Clicking the arrow button on this error will take your camera to the screen position where the error component exists.

From there, you can make corrections as needed. This feature is simply meant for alerting you to when a signal doesn’t appear to be used correctly.

(3 edits)

Here you’ll learn how to add two numbers together and display it on a preview node. It will cover the following:

  1. How to create component nodes
  2. How to edit components
  3. How to connect components
  4. How to display results

Creating Components

  1. Press space bar or right click in an open area of the component editor
  2. In the search box, type “Add”
  3. Select the “Adder”

Create Adder

Editing Components

  1. Using step 1 above, create a “Const” component instead of an “Adder” component
  2. Select the “Const” component by left clicking it
  3. In the top right corner, use the Component Editor to set the component’s memory value to 1

Create and Edit Const

Connecting Components

  1. Using step 1 and 2 above, create another “Const” component and assign it’s value to 2 (hint: you can copy/paste inside of CS2!)
  2. Click and drag from each of the Const components’ output nodes to the Adder’s input nodes

Note: The right side of the component nodes is the “output”, the left side is the “input”. You can’t ever connect two input nodes nor two output nodes.

Connect Nodes

Display Results

  1. Use the above steps to create a “Preview” component
  2. Use the above steps to connect the Adder component’s output node to the Preview component’s input node

Create Preview

(3 edits)

Getting your work into Barotrauma is as easy as creating a blueprint in CS2 and pasting it as an item assembly in the submarine editor.

Step 1

Either deselect everything or select only the components you’d like to export to Barotrauma. In this example, I have the following components and I’ve selected nothing because I’d like the system to automatically export everything.

image.png

Step 2

  • Go to Tools -> Export as Item Assembly…
  • You can do either “to clipboard” which will let you paste it into Barotrauma, or you can create an XML file. In this case I’ve chosen to clipboard.

Export as Item Assembly

Step 3

  • Go to the Barotrauma sub editor and hold SHIFT and then right click
  • Select “Paste item assembly”

Paste item assembly

Notes

  • This feature was difficult for me to implement and get the way it is. I’m still working on it, but you may notice that sometimes wires don’t move with the components they’re supposedly connected to. To fix this, go into wire editing mode and make sure each wire’s start/end nodes are overlapping with the component they’re meant to be attached to. Moving the circuits around will then include moving the wires around too.

hey there mr. angry pidgeon! This version of component sandbox has issues. I’ve been working on a new iteration of the tool that has WAY more features and improvements. I’ve stopped working on this one to support the other. This one will go into a legacy mode once component sandbox 2 is ready. Sorry about that :)

hey there, I appreciate the offer. The new version of component sandbox (unpublished) has the regex component implemented already. Thank you though :)

hey thanks for the nice comment! This year, very soon, I will be releasing Component Sandbox 2! The completion of this project lives on in its sequel. I may try to tackle copy/pasting into Barotrauma as well.

hey thanks for the awesome comment! I’m currently working on another project double-full time right now. However, I can say that I will be revisiting Component Sandbox this year. Wherein, I may rebuild (and open source) the entire thing. I’ve learned a lot about Unity and I will mention UI has never been my strong suit. I will take that feedback for the next iteration, several others have mentioned to me similar things about the UI. Thanks again.

Sure, I can make an executable build. I won’t be able to do it anytime soon unfortunately, I’m currently traveling. In the meantime, try enabling “Hardware Acceleration” in your web browser. That might make things run smoother or more quickly!

I’ve added a rounding component as well as a modulus component. Thanks for the feedback, hopefully this will help you in the future

glad to hear that! which components are you looking for? I haven’t worked on this project in a while but I could see about getting one in there for you.

no prob, thank YOU!

Thanks! That means a lot. I really wish the Barotrauma community felt the same way :)