• What Are You Working On Jan 2013
    1,974 replies, posted
[QUOTE=VGS_Devs;39113194][IMG]http://i.imgur.com/aoebr.png[/IMG][/QUOTE] [cpp] #undef whereveryouare #undef myheartwillgoon [/cpp]
[csharp]private void ParseCommandLineArg(string name, string val) { Debug.Log("Parsing command line, name is " + name + " value is :" + val); if (name == "connect" && val != string.Empty) { string[] array = val.Split(new char[] { ':' }); Debug.Log("Connecting to IP:" + array[0] + ", Port:" + array[1]); uLink.Network.Connect(array[0], array[1], new object[0]); } else { if (name == "-maxPlayers") { this.maxPlayers = int.Parse(val); } else { if (name == "-hostPort") { this.hostPort = int.Parse(val); } else { if (name == "-server") { this.isHost = true; } else { if (name == "-scene") { ServerInit.SceneToLoad = val; } else { if (name == "-sendRate") { int num; if (int.TryParse(val, ref num) && num > 0) { this.sendRate = num; } } else { if (name == "-guileak") { if (!this.leakDetecting) { base.get_gameObject().AddComponent<ManagedLeakDetector>(); this.leakDetecting = true; } } else { if (name == "-rconserver") { this.rconServer = val; } else { if (name == "-rconclient") { this.rconClient = val; } else { if (name == "-rconwait") { this.rconWait = true; } else { if (name == "-batchmode") { this.batchMode = true; } } } } } } } } } } } }[/csharp] garry garry why
you're looking at decompiled code remember supersnail, I'm pretty sure garry didn't write it like that... I really hope not. :C
are you guys seriously gonna bag on him about the code in his unreleased, almost not-even-playtested game that you guys reverse engineered from the first screenshot?
Why are you sniggering at a random piece of code anyway? Who cares.
[QUOTE=supersnail11;39113454]-snip- garry garry why[/QUOTE] Switch statements usually don't decompile cleanly and instead look like a chain of if-elses
hey, compwhizii is back! :dance:
On another note: [url]http://www.scirra.com/forum/plugin-gwen-gui-system-aimed-at-games_topic55228.html[/url] This dude is selling GWEN for money.
[QUOTE=Jawalt;39114331]On another note: [url]http://www.scirra.com/forum/plugin-gwen-gui-system-aimed-at-games_topic55228.html[/url] This dude is selling GWEN for money.[/QUOTE] Well he is allowed to do so. [url]https://github.com/garrynewman/GWEN/blob/master/LICENSE.md[/url] He just has to have that license somewhere.
[QUOTE=commander204;39114525]Well he is allowed to do so. [url]https://github.com/garrynewman/GWEN/blob/master/LICENSE.md[/url] He just has to have that license somewhere.[/QUOTE] Still a dick move.
Someone should post there calling him out on it. I know GWEN is free to sell, but it's a total dick move because he didn't change it at all afaik and is taking advantage of others' lack of knowledge.
[QUOTE=Jawalt;39114331]On another note: [url]http://www.scirra.com/forum/plugin-gwen-gui-system-aimed-at-games_topic55228.html[/url] This dude is selling GWEN for money.[/QUOTE] [THUMB]http://i.imgur.com/CBKXI.png[/THUMB] [URL="http://www.facepunch.com/member.php?u=1&tab=visitor_messaging&page=40#visitor_messaging"]He asked Garry for help[/URL] The forum looks pretty dead to me, a lot of 'last posts' are from August 2012 or later. I don't think this guy is swimming in money. Either way Supersnail is right, it's a dick move. [QUOTE=Se1f_Distruct;39114747]Someone should post there calling him out on it. I know GWEN is free to sell, but it's a total dick move because he didn't change it at all afaik and is taking advantage of others' lack of knowledge.[/QUOTE] Supersnail already did Edit: His steam profile is under the same name, same picture is someone wants to stalk him :v:. [URL="http://steamcommunity.com/id/arsonide"]http://steamcommunity.com/id/arsonide[/URL]
On page 2, he does kind of credit garry: [quote]Disabling the resizing of something screws up something along the borders. This is actually a known problem in GWEN itself, rather than the plugin. I noticed it during my testing, but I'm still waiting on Garry to figure out the problem. (He might have already fixed it, I haven't recompiled GWEN in a bit.) Apparently he knows what is causing it though, so a fix should be imminent. Like I said, GWEN is a library intended for use in the Source Engine (Garry's Mod), and my plugin is a wrapper around it that makes it easier to use, while showing it how to render within Construct.[/quote] I do think the credit should be a bit more overt, but I guess it's better than claiming it all to be original work.
It's a port of GWEN to the plugin system of the Construct game engine. He did something, at least.
Yeah he's not selling GWEN per say, he's selling a wrapper around GWEN for another game library. That's nothing really to get upset about there. Shit software (the wrapper in this case) is packaged and sold daily, this is nothing new. He should make that more clear though it's a wrapper, but it looks pretty dead at this point anyway.
I'm trying to stay motivated enough to learn for one of my maths courses. It didn't work very well, I spent the whole night writing generic matrix extension methods. At least now I can do my homework a bit faster :rolleyes: It's not constrained to an interface, so I can basically drop in any type that implements the necessary operators: [csharp]static void Main(string[] args) { var a = new int[][]{ new[]{1, 1}, new[]{-1, 1} }; var b = new int[][]{ new[]{1, 0, 1}, new[]{0, 1, 0} }; Test1("a", "b", a, b); var c = new StringDing[][]{ new StringDing[]{"a", "b"}, new StringDing[]{"c", "d"} }; var d = new StringDing[][]{ new StringDing[]{"A", "B"}, new StringDing[]{"C", "D"} }; Test1("c", "d", c, d); } private static void Test1<T>(string aString, string bString, T[][] a, T[][] b) { Console.WriteLine(aString); a.MatrixPrint(); Console.WriteLine(); Console.WriteLine(bString); b.MatrixPrint(); Console.WriteLine(); Console.WriteLine(aString + " * " + bString); a.MatrixMultiply(b).MatrixPrint(); Console.WriteLine(); Console.WriteLine(aString + " * (" + bString + " * " + bString + ")"); a.MatrixMultiply(b.MatrixMultiply(b)).MatrixPrint(); Console.WriteLine(); Console.WriteLine("(" + aString + " * " + bString + ") * " + bString); a.MatrixMultiply(b).MatrixMultiply(b).MatrixPrint(); Console.ReadLine(); }[/csharp] [code]a 1 1 -1 1 b 1 0 1 0 1 0 a * b 1 1 1 -1 1 -1 a * (b * b) 1 1 1 -1 1 -1 (a * b) * b 1 1 1 -1 1 -1 c a b c d d A B C D c * d Aa+Cb Ba+Db Ac+Cd Bc+Dd c * (d * d) AAa+ACb+BCa+CDb ABa+BCb+BDa+DDb AAc+ACd+BCc+CDd ABc+BCd+BDc+DDd (c * d) * d AAa+ACb+BCa+CDb ABa+BCb+BDa+DDb AAc+ACd+BCc+CDd ABc+BCd+BDc+DDd [/code] I found a way to call operators on generic variables that may or may not be terrible: [csharp]matrix[zeile][spalte] != default(T) as dynamic[/csharp] Interestingly, the above code works as expected, while this: [csharp]ergebnis[zeile][spalte] += (a[zeile][summand]) * (b[summand][spalte] as dynamic)[/csharp] ...calls [I]public static StringDing operator *(StringDing a, object b)[/I] instead of [I]public static StringDing operator *(StringDing a, StringDing b)[/I], same with the + operator. Calling them with compiled Expressions would probably be better, this looks much cleaner though. At least it works for basic types too and I didn't have to define an interface for basic arithmetics.
[QUOTE=JohnD;39113642]Switch statements usually don't decompile cleanly and instead look like a chain of if-elses[/QUOTE] Except .net actually has a bytecode for switch. [url]http://msdn.microsoft.com/en-us/library/system.reflection.emit.opcodes.switch.aspx[/url] Looks more like the decompiler didn't tidy up the if/elseif chain.
Or Garry really is using an if-else chain. :v: [editline]6th January 2013[/editline] Why are we even going through his [b]pre-alpha[/b] gamecode anyway? [editline]6th January 2013[/editline] Or is it beta?
[QUOTE=high;39115653]Except .net actually has a bytecode for switch. [url]http://msdn.microsoft.com/en-us/library/system.reflection.emit.opcodes.switch.aspx[/url] Looks more like the decompiler didn't tidy up the if/elseif chain.[/QUOTE] The switch bytecode only works efficiently with a range of small, mostly consecutive [B]numbers[/B].
[QUOTE=Se1f_Distruct;39115758]Why are we even going through his [b]pre-alpha[/b] gamecode anyway?[/QUOTE] because i have no beta key, i need to find something to do :v:
[QUOTE=Tamschi;39115812]The switch bytecode only works efficiently with a range of small, mostly consecutive [B]numbers[/B].[/QUOTE] Actually .net will construct a static dictionary with the values to indexes. I forget the threshold but if I remember correctly a switch will only be if/elseif when there are under 4 cases. [csharp][STAThread] private static void Main(string[] args) { switch (args[0]) { case "connect": Console.WriteLine("1"); break; case "-maxPlayers": Console.WriteLine("2"); break; case "-hostPort": Console.WriteLine("3"); break; case "-server": Console.WriteLine("4"); break; case "-scene": Console.WriteLine("5"); break; case "-sendRate": Console.WriteLine("6"); break; case "-guileak": Console.WriteLine("7"); break; case "-rconserver": Console.WriteLine("8"); break; case "-rconclient": Console.WriteLine("9"); break; case "-rconwait": Console.WriteLine("10"); break; case "-batchmode": Console.WriteLine("11"); break; } } [/csharp] becomes [csharp].method private hidebysig static void Main(string[] args) cil managed { .custom instance void [mscorlib]System.STAThreadAttribute::.ctor() .entrypoint .maxstack 4 .locals init ( [0] string CS$4$0000, [1] int32 CS$0$0001) L_0000: nop L_0001: ldarg.0 L_0002: ldc.i4.0 L_0003: ldelem.ref L_0004: stloc.0 L_0005: ldloc.0 L_0006: brfalse L_0188 L_000b: volatile. L_000d: ldsfld class [mscorlib]System.Collections.Generic.Dictionary`2<string, int32> <PrivateImplementationDetails>{7E19AFC7-B84C-45B6-A5EA-150F0A0E6EC4}::$$method0x600001d-1 L_0012: brtrue L_00ab L_0017: ldc.i4.s 11 L_0019: newobj instance void [mscorlib]System.Collections.Generic.Dictionary`2<string, int32>::.ctor(int32) L_001e: dup L_001f: ldstr "connect" L_0024: ldc.i4.0 L_0025: call instance void [mscorlib]System.Collections.Generic.Dictionary`2<string, int32>::Add(!0, !1) L_002a: dup L_002b: ldstr "-maxPlayers" L_0030: ldc.i4.1 L_0031: call instance void [mscorlib]System.Collections.Generic.Dictionary`2<string, int32>::Add(!0, !1) L_0036: dup L_0037: ldstr "-hostPort" L_003c: ldc.i4.2 L_003d: call instance void [mscorlib]System.Collections.Generic.Dictionary`2<string, int32>::Add(!0, !1) L_0042: dup L_0043: ldstr "-server" L_0048: ldc.i4.3 L_0049: call instance void [mscorlib]System.Collections.Generic.Dictionary`2<string, int32>::Add(!0, !1) L_004e: dup L_004f: ldstr "-scene" L_0054: ldc.i4.4 L_0055: call instance void [mscorlib]System.Collections.Generic.Dictionary`2<string, int32>::Add(!0, !1) L_005a: dup L_005b: ldstr "-sendRate" L_0060: ldc.i4.5 L_0061: call instance void [mscorlib]System.Collections.Generic.Dictionary`2<string, int32>::Add(!0, !1) L_0066: dup L_0067: ldstr "-guileak" L_006c: ldc.i4.6 L_006d: call instance void [mscorlib]System.Collections.Generic.Dictionary`2<string, int32>::Add(!0, !1) L_0072: dup L_0073: ldstr "-rconserver" L_0078: ldc.i4.7 L_0079: call instance void [mscorlib]System.Collections.Generic.Dictionary`2<string, int32>::Add(!0, !1) L_007e: dup L_007f: ldstr "-rconclient" L_0084: ldc.i4.8 L_0085: call instance void [mscorlib]System.Collections.Generic.Dictionary`2<string, int32>::Add(!0, !1) L_008a: dup L_008b: ldstr "-rconwait" L_0090: ldc.i4.s 9 L_0092: call instance void [mscorlib]System.Collections.Generic.Dictionary`2<string, int32>::Add(!0, !1) L_0097: dup L_0098: ldstr "-batchmode" L_009d: ldc.i4.s 10 L_009f: call instance void [mscorlib]System.Collections.Generic.Dictionary`2<string, int32>::Add(!0, !1) L_00a4: volatile. L_00a6: stsfld class [mscorlib]System.Collections.Generic.Dictionary`2<string, int32> <PrivateImplementationDetails>{7E19AFC7-B84C-45B6-A5EA-150F0A0E6EC4}::$$method0x600001d-1 L_00ab: volatile. L_00ad: ldsfld class [mscorlib]System.Collections.Generic.Dictionary`2<string, int32> <PrivateImplementationDetails>{7E19AFC7-B84C-45B6-A5EA-150F0A0E6EC4}::$$method0x600001d-1 L_00b2: ldloc.0 L_00b3: ldloca.s CS$0$0001 L_00b5: call instance bool [mscorlib]System.Collections.Generic.Dictionary`2<string, int32>::TryGetValue(!0, !1&) L_00ba: brfalse L_0188 L_00bf: ldloc.1 L_00c0: switch (L_00f6, L_0106, L_0113, L_0120, L_012d, L_013a, L_0147, L_0154, L_0161, L_016e, L_017b) L_00f1: br L_0188 L_00f6: ldstr "1" L_00fb: call void [mscorlib]System.Console::WriteLine(string) L_0100: nop L_0101: br L_0188 L_0106: ldstr "2" L_010b: call void [mscorlib]System.Console::WriteLine(string) L_0110: nop L_0111: br.s L_0188 L_0113: ldstr "3" L_0118: call void [mscorlib]System.Console::WriteLine(string) L_011d: nop L_011e: br.s L_0188 L_0120: ldstr "4" L_0125: call void [mscorlib]System.Console::WriteLine(string) L_012a: nop L_012b: br.s L_0188 L_012d: ldstr "5" L_0132: call void [mscorlib]System.Console::WriteLine(string) L_0137: nop L_0138: br.s L_0188 L_013a: ldstr "6" L_013f: call void [mscorlib]System.Console::WriteLine(string) L_0144: nop L_0145: br.s L_0188 L_0147: ldstr "7" L_014c: call void [mscorlib]System.Console::WriteLine(string) L_0151: nop L_0152: br.s L_0188 L_0154: ldstr "8" L_0159: call void [mscorlib]System.Console::WriteLine(string) L_015e: nop L_015f: br.s L_0188 L_0161: ldstr "9" L_0166: call void [mscorlib]System.Console::WriteLine(string) L_016b: nop L_016c: br.s L_0188 L_016e: ldstr "10" L_0173: call void [mscorlib]System.Console::WriteLine(string) L_0178: nop L_0179: br.s L_0188 L_017b: ldstr "11" L_0180: call void [mscorlib]System.Console::WriteLine(string) L_0185: nop L_0186: br.s L_0188 L_0188: ret }[/csharp]
[QUOTE=commander204;39114525]Well he is allowed to do so. [url]https://github.com/garrynewman/GWEN/blob/master/LICENSE.md[/url] He just has to have that license somewhere.[/QUOTE] Well, the demo certainly has no license anywhere
[QUOTE=Jawalt;39114331]On another note: [url]http://www.scirra.com/forum/plugin-gwen-gui-system-aimed-at-games_topic55228.html[/url] This dude is selling GWEN for money.[/QUOTE] Lolz, he can do what he wants as per license, I don't mind.
[QUOTE=swift and shift;39112793]this wouldn't really work out. haskell implements lazy evaluation by working from the inside out and using thunks[/QUOTE] Nah man, it totally would.
[QUOTE=garry;39116310]Lolz, he can do what he wants as per license, I don't mind.[/QUOTE] GIVE KEY [editline]6th January 2013[/editline] am working on space game [IMG]http://i.imgur.com/zndPX.png[/IMG]
[QUOTE=JohnD;39113642]Switch statements usually don't decompile cleanly and instead look like a chain of if-elses[/QUOTE] Ah, the Nullular Grapher defence.
Soo, a list of decompiled programs that prove the coder didn't know how switch statements work and definitely weren't mangled by the decompiler: - Nullular Grapher - Minecraft - Terraria - Rust [editline]6th January 2013[/editline] By the way, you people are aware that [cpp] else if () {} [/cpp] actually compiles to [cpp] else { if () {} } [/cpp] right?
[QUOTE=Lexic;39117411] By the way, you people are aware that [cpp] else if () {} [/cpp] actually compiles to [cpp] else { if () {} } [/cpp] right?[/QUOTE] I hope you know that you just blew my mind.
[img]http://puu.sh/1KjF7[/img] Heck yes! Lua support!
[QUOTE=cartman300;39117497]-img- Heck yes! Lua support![/QUOTE] I once made a GLaDOS terminal in Cosmos and I have to say that it is a very nice development kit. Lua support is even more awesome! Good job!
Sorry, you need to Log In to post a reply to this thread.