Loading...
  OR  Zero-K Name:    Password:   

Porting Zero-K lobby

32 posts, 2144 views
Post comment
Filter:    Player:  
Page of 2 (32 records)
sort
___DELETED___201545
11 years ago
I am a beginner at C# but I have some experience with C/C++ and gtk on Linux. I think of porting the Zero-K lobby to Linux(or any platform that has mono,gtk,and webkit-sharp). Most of the everything else that doesn't use WPF seems to compile under monodevelop but WPF port(Mono) itself is a work in progress. Would be easier to do a rewrite the lobby(but keep some of the helper classes) or try to convert WPF portion to gtk?
+0 / -0


11 years ago
To convert ZKL to linux we would remove WPF part - and replace it with winforms (which works both on linux and windows).
It would need making some nicer buttons using bitmaps in winforms.

There is no need to use webkit, because mono implements default "webbrowser" using gecko or webkit automatically.

Most of the ZKL is already converted to WinForms, the only remaining part is the main window + the top menu bar buttons.
+0 / -0
___DELETED___201545
11 years ago
Hmm.. where is the "webbrowser" in Mono. Are you talking about Mono.WebBrowser?
+0 / -0


11 years ago
No, I mean mono implements WebBrowser class from winforms (using whatever it chooses). So if ZKL uses winforms there is nothing to "port".
Single binary will work on both linux and windows.
+0 / -0


11 years ago
If you want to do this project its best to contact me in lobby chat, I can help and show you around.
+0 / -0
11 years ago
I dont understand how it would be done but it would be fantastic to see ZKL on linux.
+0 / -0
11 years ago
It works because C# is compiled into platform-independent bytecode, which is run by the .net framework on Windows and the Mono project on Linux and Mac.

The Mono project provides a drop-in .net framework replacement for most of the features of Microsoft's implementation. However, it's not complete. So, in order for ZKL to work on other platforms, all that you'd have to do is re-write the parts of the lobby that use features that don't exist in Mono.

Most of the code base will work on either.
+0 / -0
> The Mono project provides a drop-in .net framework replacement for most of the features of Microsoft's implementation. However, it's not complete.

You can call all windows executables crossplatform as well then. The format is documented and there's wine which is a drop-in replacement for linux and mac. It's just not complete enough.

Quite a lot of games on Desura use winelib and call themselves crossplatform. There really is little difference between .NET and "native" windows binaries.

EDT: No, I'm not asking to rewrite ZKL in something else. :) Just clearing up a few misconceptions.

EDT2: Just noticed I introduced a misconception of my own. :)
Technically CLR and native windows binaries are very different. But from the users' POV they are the same. Both are supported only on Windows. Both need an incomplete hack to run them on other platforms.
+0 / -0
Um... Mono isn't an incomplete hack. It's a complete implementation of the CLI standard.

It also provides a C# compiler that fully supports C# 1.0-5.0

The incomplete part consists of Microsoft's class libraries, which are non-standard.

Technically, the .net framework is Microsoft's commercial implementation of the CLI. Mono is an open-source implementation of the CLI.

Microsoft's implementation provides a set of Microsoft class libraries. Mono's implementation provides a set of Mono class libraries. It also provides open-source implementations of Microsoft's class libraries, to provide a solution for both developers and end-users.

Look here: http://www.mono-project.com/Compatibility

.net 1.1, 2.0, & 3.5 support is complete. .net 4.0 support is almost complete, and .net 4.5 support is in progress. .net 3.0 (what we need for ZKL), sadly, will probably never be supported.

Take a look at this if you want to know exactly which classes Mono implements: http://docs.go-mono.com/

Note that due to the differences between Windows and the rest of the world, there are some things that will break portability: http://www.mono-project.com/Guidelines:Application_Portability

Also, C# as a language is just as cross-platform as Java. Compile once, deploy anywere that has an implementation of the runtime environment. Oracle is just less stingy with their runtime environment.
+0 / -0
> .net 1.1, 2.0, & 3.5 support is complete. .net 4.0 support is almost complete, and .net 4.5 support is in progress. .net 3.0 (what we need for ZKL), sadly, will probably never be supported.

Well, that's ridiculous. There is a standard called CLI. The standard developer's job is to ensure that supporting it is enough to make software portable. Sun did it with TCK. Not sure about Oracle. Microsoft doesn't care and has non-standard features in its own implementation. So supporting CLI doesn't mean anything. At all. You need to support .NET which is one implementation of CLI. Good job hijacking your own standard, Microsoft.

> C# as a language is just as cross-platform as Java.

You have to try very hard to make a language non-crossplatform. :D

EDT: Wa-a-a-ait. The CLI standard doesn't include class library? Then it all makes sense. Sorry for butthurting. :) But then I don't understand how CLI helps writing crossplatform software at all. .NET is proprietary and Mono is an opensource implementation of CLI, which means very little, and .NET's proprietary class library, which is what we care about but it makes Mono the same hack as wine.

Sorry if I messed up something again. It all gets so complicated when proprietary stuff is involved. I prefer to just stay away from it.
+0 / -0


11 years ago
Note that ZKL used to work on linux. Older builds of ZKL did work exactly as I said - they had single "executable" which worked on both linux and windows.

We then decided to make lobby prettier by using WPF so linux compatibility was dropped (also because of no maintainers who would report linux specific issues with paths etc).
+0 / -0
11 years ago
Btw Licho, why would porting ZK to proprietary engine defeat the purpose ( mentioned twice here: http://zero-k.info/Forum/Thread/4536 ) but using a proprietary library in ZKL did not?
+0 / -0


11 years ago
ZKL can be ported to linux easilly (actually just modified slightly).
Zero-K cannot be "ported" to any other engine its tied to it and engine makes it what it is (and we dont even know how moddable PA will be).
Zero-K represents massive multi-year investment that would all go away if we switched to other engine (not just all the code, but also including models which are specific to spring!)
+0 / -0
11 years ago
I understand that it's the actual reason but Saktoth talked about open vs proprietary.

But then Saktoth is not you :) Maybe you don't mind using proprietary code in ZK unlike him.
+0 / -0

11 years ago
The problem with a proprietary engine for us is mostly free-as-in beer, not free-as-in speech.

For what it matters the Spring engine might as well be merely free-as-in-beer, because we still end up using whatever broken version the engine developers spit out at us and while theoretically we could fork it, practically we cannot.
+0 / -0
Modern game engines are complex enough that devs normally work from an API not from source code. The only reason you may need source code is for bug fixing. However, bug fixing someone else's code is not exactly fun or productive.

Working from source code kind of goes against object orientated programming anyway. Honestly if you want to work from source code those days, I think you are better off with a rendering engine like Ogre3D + bullet physics.

Ogre3D even has a c# wrapper MOGRE. Most of the good engines use the MIT license these days. Even Ogre3D switched. Bullet can be compiled deterministically in theory.

Switching engines is not easy.
+0 / -0
11 years ago
Any news on porting ZKL?
+0 / -0

11 years ago
quote:
Working from source code kind of goes against object orientated programming anyway.

Wait what?
What kind of programming do you envision? Dragging funky boxes in a UI?
+0 / -0
11 years ago
Why do we want ZKL for linux? Is it better than one of the already excellent lobbies available, like Springlobby, NOTA Lobby or Weblobby?
+0 / -0


11 years ago
A web app is not an optimal solution for some people, and also suffers from some performance overhead.

(though i guess java+browser+javascript in weblobby and .NET + ie6browser + javascript are actually quite close)
+0 / -0
Page of 2 (32 records)