Skip to main content

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

Are there any limits to the line lengths;;;

A topic by Arowx created May 10, 2019 Views: 219 Replies: 3
Viewing posts 1 to 3
(1 edit) (+2)

My point being that 200 lines of code without some kind of size limit e.g total character length could contain a huge code base just no line feed characters.

Here's a 6 line business card reflection probe demo for Unity.

  1. using UnityEngine;using UnityEngine.Rendering;
  2. public class UBC:MonoBehaviour{private int[] txt={524288,1432917,1906002,1383925};private Material m;
  3. void Start(){m=new Material(Shader.Find("Standard"));m.SetFloat("_Metallic", 1f);m.SetFloat("_Glossiness",1f);int y=txt.Length;for(int i=0;i<txt.Length;i++){int x=10;for(int b=1;b<=1048576;b=b<<1){if((txt[i]&b)>0)B(x,y);x--;}y--;}G(10,10);GameObject p=new GameObject("ReflectionProbe");ReflectionProbe pc=p.AddComponent<ReflectionProbe>()as ReflectionProbe;pc.resolution=256;pc.size=new Vector3(20,20,20);p.transform.position=new Vector3(0,5,0);pc.mode=ReflectionProbeMode.Realtime;pc.refreshMode=ReflectionProbeRefreshMode.EveryFrame; }
  4. void B(int x,int y){GameObject b=GameObject.CreatePrimitive(PrimitiveType.Sphere);b.transform.position=new Vector3(x,y,0f);b.GetComponent<Renderer>().material=m;}
  5. void C(int x,int z,bool red){float t=2f;GameObject c=GameObject.CreatePrimitive(PrimitiveType.Cube);Vector3 s=c.transform.localScale;s*=t;c.transform.localScale=s;c.transform.position=new Vector3(x*t,-3,z*t);c.GetComponent<Renderer>().material.color=red?Color.red:Color.white;}
  6. void G(int x,int z){bool c=false;for(int a=-x;a<x;a++){for(int b=-z;b<z;b++){C(a,b,c);c=!c;}c=!c;}}}

It's about 1223 characters.

Plus what about if I were to use Blueprints from Unreal? How would that count towards the limit.

Host

You may use included code in game engines that allow the game engine to run. But not any assets. Say unity has rigid body physics built into unity you can use that. But if it’s a pre-made first person character then that counts as an asset.

Good luck!

Host

Each 300 characters will count as an line