[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=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.
[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.