It is worth pointing out here that punctuation and grammar are two different things. Punctuation provides the rules for the marks and symbols that we use to clarify meaning in written communications. These include commas, apostrophes, question marks, dashes, periods, etc. There is no punctuation involved in spoken communication.
Grammar is the structure of the language, e.g word order, tense, morphology, syntax, etc. Grammar applies to both written and spoken communication, and to both formal and informal communication. Sometimes different grammar 'rules' apply in written and spoken communication, and in formal and informal communication.
To answer the question in your heading; when joining an independent clause to a dependent clause:
If the dependent clause comes first, then a comma should be placed between the two clauses.
If the independent clause comes first, then a comma is not placed between the two clauses.
So, (not ignoring Gary Botnovcan excellent answer, but just assuming that your statement - that the text in bold is an independent clause and the non-bold text is a dependent clause - is correct), then Example 1 would not require a comma.
Example 2 is grammatical but the sentence is essentially nonsense. However, there are several different ways in which we can try to interpret what this sentence is trying to say, and each of those may require different punctuation. I have provided two possible interpretations below.
If we assume that you are continuing with your original query regarding joining dependent and independent clauses, and if we further assume that you intended the independent clause to be '(t)he guards strolled inside with their torch lights', with the remainder of the sentence being a dependent clause, then Example 2 is punctuated correctly.
On the other hand, if we assume that you intended the independent clause to be '(t)he guards strolled inside only to be stopped by their limitations inside the ocean of nothingness', to which the prepositional phrase 'with their torch lights' has been added parenthetically , then Example 2 is not punctuated correctly. In this case the non-restrictive prepositional phrase 'with their torch lights' would need to be set off with commas on either side.