Skip to main content

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

Kiki SoDa

9
Posts
2
Topics
2
Followers
1
Following
A member registered Feb 04, 2018 · View creator page →

Creator of

Recent community posts

Nice!

Fragment Jam community · Created a new topic Jam Extended?

Was the jam extended to July 14th or was this just an error? 

Awesome run/walk cycles!

Nice! I like how you used this game to cover a growing problem in the United States.

The link doesn't seem to work :o

Easy to understand and fun!

So, just to be clear on specifics then, the following should not count as lines:

  • Lines that are simply curly braces: '{' or '}'
  • Import lines: 'using UnityEngine;'
  • Function definitions: 'void Start()'
  • Class definitions: 'public class Character: MonoBehaviour'

However, the other lines would count:

  • Variable declarations: 'public int test_var1 = 100;' and 'public float test_var2 = 200;'
  • Modifying variables: ' test_var2 += ++test_var1;'

I didn't have any in the previous example, but would function calls or conditional statements and loops count?

Example:

for(int i = 0; i < 5; i++){

if(this_counts_as_a_line){

        Debug.Log("This counts as a line?");
}else{

        Debug.Log("Does the else count too?");

}

}

So, while the curly brackets do not count as a line, the for loop definition, if statement, else statement, and Log function calls would all count for a total of 5 lines?

(1 edit)

I am curious what is considered a line for our games? Does it only count if we move to the next line with a newline/enter, or is it something more specific like a semicolon marks the end of a line?

As an example, how many lines would you say the following code contains?


using UnityEngine;

public class Character: MonoBehaviour
{
    public int test_var1 = 100; public float test_var2 = 200;

    void Start()
    {    test_var2+=++test_var1;}