i have a nearly full developed program written in python it uses the Kivy framework which however does not employ a webplayer.
I want to migrate it to a webplayer and decided to try it on unity with ironpython.
This however does not work since the webplayer has a limited subset not the full subset from .net.
Sadly the unity community has little interest in python and cannot really help with this.
So my question is:
What else could i try?
could i write most code in python compile it to a library and access it from c# or has someone an other idea to integrate it with unity?
Is there a way at all with unity, if not what would you suggest then to make a python webplayer?
Note i want to use a platform which i can use to compile to mobilephones too thats why i did go with unity.
Related
If you work with Unity, you have many tools like the Input class to work with. Is it possible to bring those tools in a non Unity project?
It's possible, if you have access to the c++ source code. I know Double Fine uses Unity 3D to prototype, and has a pipe line setup to import into their engine. I don't think just adding the library would work in your case.
However, if you have a decompiler like Jetbrains dotPeek you can at least look at the C# scripts in Unity and copy their C# code over. But, you'd have to figure out how to reimplent all the pieces of the Input library requiring Unity's C++ code. It's probably just worth looking at to learn about implementing an Input class.
A better bet for this would just be using MonoGame, and developing your own InputManagement system based on the Input class from them.
http://www.monogame.net
I am starting with game dev using Unity3d and I can see there's 3 supported languages for creating scripts: C#, unityscript and Boo...
although, coming from a web-design past I am obviously used with javascript, but after few attempts I could notice Unity3d doesn't really have full support to the script language and some elements like new Date().valueOf() and some other statements within methods such as the attribute arguments and many other won't work properly, also it seems my file can't have a wrapper method that envolves all the other methods like:
(function (scope) {
function Start() {
...
}
...
}(this));
and when using something like new Date().valueOf() which is valid in JS I get:
MissingMethodException: Method not found: 'System.DateTime.valueOf'. Boo.Lang.Runtime.DynamicDispatching.MethodDispatcherFactory.ProduceExtensionDispatcher ()
So perhaps the compiler turns that initial 'unityscript' code into Boo language? so perhaps Boo is the right 'native' choice and maybe unityscript itself isn't the best way to go when developing unity3d apps?
I was thinking on a language that has full support to all known native classes and methods which will work without problem?
Sorry for any errors mentioned above and please let me know what you think.
Unity doesn't use 'real' Javascript per se. See:
http://forum.unity3d.com/threads/1117-Javascript-Version
UnityScript is based on javascript 2.0. There are a few things missing (switch statements, etc.), but they get half the speed of C++, which is way faster than Mozilla.
Once you get used to it, developing in 'JS' for unity is very very fast and flexible...but of course, if you're going to develop native components, or interface to anything in C, you'll need to use C# (in the end, C# is not difficult to learn).
If you want to be a developer in Unity and build a career on it, learn C# and use it - don't waste your time with UnityScript. You can use C# outside of Unity for programming. If your main career is already web development (or will be), then continue using javascript because ultimately C# and UnityScript have the same functionality but C# is much more widely used for programing games and applications.
The majority of the assets on the store that I have used are C# or offer both JS and C#. Mixing between the languages creates serious dependency problems because in order to use a class in either language it has to already have been processed by the Unity script loading order. To use a Javascript defined class in C#, that script file must have been processed prior to the C# script file. If the javscript class then later needs something from the C# class, you would have to find ways around it because its simply no longer possible from the javascript file. Unity has ways to define the script order.
I thought that I would warn you about mixing C# with UnityScript because if you don't focus on one or the other, you will run into this problem. Ultimately, C# is the middle ground between ambiguous languages like VB and JavaScript, and pedantic languages like C++ (I have a C/C++ background of about 10 years).
Your title "What is the best xxx" leads to opinionated answers, but I am trying to give the best advice possible without being subjective. C# will allow you to continue, even if Unity were to go away a year from now. UnityScript/JavaScript would only allow you to move into being a web developer. A C# developer can easily move into UnityScript/JavaScript, but the reverse is much harder (not impossible, just more difficult).
You should use c#. It is popular, mature, native to .NET. c# is what big teams use. Learning c# will be useful in the future. JS in Unity3D is not real JS as already mentioned and nobody heard of Boo.
JS is the most popular language for use with Unity. But the language is implemented in Mono, and so any restrictions in that implementation are going to affect Unity scripts too.
I don't know how the Mono implementation of JS works, but judging from the error message, it uses datatypes initially defined for Boo, at least. However, that doesn't mean that JS is "turned into Boo". Both are compiled into the same bytecode, which is JIT'ed and run by the Mono runtime. So neither language is "more native" than the other.
Checkout advantages and disadvantages of using c# and Java script from here.
C# is little bit faster than JavaScript and you get extra features provided by C#. You can get peoples opinion from here.
Developing with c# has advantage of Visual Studio 2010. It provides better code completion feature than Mono develop.
In JavaScript only, variables can have an unspecified type. This only occurs if you do not assign a value while declaring the variable.
Performance is slower with dynamically typed variables, and you can run into casting problems. Iif this is a concern, use #pragma strict.
I'm programming a computer game in C#/Mono using OpenTK library. I want to use Lua for scripting for the game, so also those who know nothing about C# can edit the scripts, levels, etc. However, the problem is, that I can't find any way how to use Lua with C#/Mono. I found amazing LuaInterface, however it doesn't work on Mono. I've tried it and it works on Windows, but it doesn't on linux (Ubuntu). Replacing lua51.dll with linux alternates doesn't simply work.
I'd like to ask if there's any suitable way for using LuaInterface with Mono (I didn't find any source codes of LuaInterface to edit and rebuild it; I also heard that old versions of LuaInterface do work on Mono, however I didn't find them anywhere for download), or if there's any other suitable library for C#/Mono that you used before and you know it works. I've been searching for a long time, but I didn't find anything and I don't want to spend weeks programming it myself.
I guess it'd be however possible to use C# for scripting rather than Lua, but I don't like that idea very much, although I don't know why.
There is a feature in .Net (which is also included in Mono) called Dynamic Language Runtime.
I don't know about Lua being supported, but there are DLR implementations of Python and Ruby - both of these work on Mono as well as on Microsoft CLR.
Check out this question for information about using C# as scripting language.
EDIT: Actually, there is an IronLua project, but I don't know how complete it is.
You can use lua grammar and this answer as way to find compiler generator which creates c# code. As I think it is the best and the easiest way to make support for external language support. Why? You can fast add any events for grammatic constructions and add any language extensions you want.
I'm a computer scientist and i've been working with Java mostly to develop applications.
I just been hired in a company that makes projects with ArcGIS.
The company has hired na electrical engineer to develop the arcGIS projects.
This engineer used to customize ArcMap with VBA and lately extensions with .NET and C#.
I want to take a new path and start using the ArgGIS Engine with Java.
I want to know if this choice is right.Has any of you been developing with Engine-Java and how difficult is it(The use of JNI -for which i have little knoledge- is making it more difficult? ).
Also I have a little experience with .NET and c++ but not C#.I will have a big learning curve with this path?
Also which are the advantages and disadvantages and limitations of each method?
Hard question to answer.
The general opinion seems to be that C# is easy to learn if you know Java.
IMHO your biggest problem is going to be learning and manipulating the massive, convoluted ArcGIS object model. Choice of language is probably secondary.
My instinct is that C#/.Net is probably more popular for desktop programming with ArcGIS, so you'll get more community support with that. But I don't know. There's clearly a lot of folks using Java with ArcGIS - I suspect it's mostly server work, but I'm not sure. You might be able to figure out how popular ArcEngine with Java is by checking out the ESRI forum activity.
EDIT. You probably need to decide whether learning C# is going to be valuable in future to your employer (and your career), and balance that against some assessment of whether using Java with ArcGIS engine is unusual, and therefore more risky. Only you can answer the first question.
I absolutely in all respects suggest you stick with C#/.Net over Java. Last time i looked (take this with a grain of salt), the Java Library + COM inter-opt done with ArcGIS is pretty slow when working with certain elements (Arrays, oh god the arrays), also i am pretty sure Java will most likely be the next language to be put onto the cutting block in the near future(VB6 is now getting the axe). Also ESRI's java community is pretty tiny compared to their C#/.NET (however about 50 times bigger then their C++ :()
I would go for .NET and C#
If you know java and C++ than C# must be easy. You will just need to find your way through the .net framework that's all.
You will be safe with C# if you ever have to make some rich internet application in combination with arcgis and Silverlight (C#).
I have a project that is an open source application for a specific type of scientific calculation that uses c++ for the backend, and C# for the front end. I'm not doing anything windows specific in the c++ portion, so I'm hoping for a relatively small learning curve there. I have a few specific questions, and I would appreciate any advice in general about this type of transition. Please keep in mind that I know absolutely nothing about Linux, but I am willing to learn.
Is there an IDE that is similar to Visual Studio? Ideally, I would like to set it up in a similar fashion to what I have now, with 2 C# solutions and a couple of c++ dlls. I really don't want to use a text editor alone and link with a command line
Is there some tool to give me an idea about problems I might have in the transition?
Is there anyway to translate my Visual Studio options to gcc options?
I know that I don't need to support Linux technically, as almost everyone in my field uses Windows, or has easy access to a Windows box, but I thought this might be interesting from a technical standpoint.
There is a IDE you can use for C# on linux - it is Mono Develop. The current version will open visual studio project and solution files, so zero knowledge is needed to migrate to it.
It uses the Mono project, which is an implementation of C# for linux.
They have created a migration tool (MoMa) so you can test your C# code and see if it will work on linux - it will provide you with hints and explanations of what isn't portable and why.
I know this isn't the c++ route you are asking about, but it is probably going to be the easiest and quickest way to make your application platform independent.
The answer to nr 1 is: MonoDevelop. Which also comes with Mono, the .NET version that's platform independent. It's a must-use when you do this transition. It runs also on Windows, which makes the learning curve less steep.
The answer to nr 2 is: I don't know..., but running your program compiled for Mono should give you a fair idea of platform specific issues you have in your code.
The answer to nr 3 is: try that as a specific question, that will give that rather complex issue the right attention and support.
The answer to nr X is: use an automatic build (NAnt or similar) to automatically build your code for several target platforms. However, it is possible that your .NET code runs unmodified for either platform (ideally it should) and only your C++ part needs special attention.
Everyone else has already mentioned MonoDevelope. But there is also MoMA which can scan a .NET application and look for commands like pInvoke that will not be portable.