converting java to "C" or "Unity"

So, I’m trying to upload my Java game that I’m coming up on finishing. It has roughly 4,500 lines of code, 6 classes, and future updates to come.

The site only accepts C or Unity, of course I could hand convert the code to C, but that’d be a lot of work LOL. I tried a few online Java -> “C” convertors but they don’t really work that well. They break my classes down, and make it annoying.

So what’s your question?

Is there any easier way to convert Java to C or Unity.

C does not support classes or any fancy stuff, so any Java->C converter is going to be messy.

As for Unity, I don’t think you even have a chance.

The question is, what kind of site only allows C/Unity anyway?
You’re better off looking elsewhere.

I’m trying to upload my game to kongregate, a fairly large gaming ground…

Step 1:
Learn C.

Step 2:
Port Java code to C.

:wink:

^ this :smiley:

Once you become fairly decent at java, it’s not too terribly hard to port a small game/program to another language. Just a little time consuming.

lol those language converters are lulz

It doesn’t even make sense for Kongregate to accept C source code in the first place. Are you sure that’s what they require?

A quick look at their FAQ gives me this: http://www.kongregate.com/pages/help#uploading-q-2

yeah, there are some that kinda-sorta work, but the irony is half the time you have to pretty much know how to port it manually anyway to fix all the errors. … and sometimes the errors are so numerous that you’ll probably port it faster manually too. :smiley:

Well Unity allows for C# scripts which is almost syntactically identical to Java.

Also, Microsoft has an article showing what you’d do in Java and how to do it in C#.

http://msdn.microsoft.com/en-us/library/ms228358(v=vs.90).aspx

As they accept HTML5 the simplest route may be a port to libGDX and then just build the html5 version?