Metagun in Scala

Any community contributions to libgdx go here! Some may get included in the core API when permission is granted.

Metagun in Scala

Postby tomas » Sat Jul 23, 2011 7:22 pm

Hi everyone,

I have just uploaded a version of Metagun written in Scala code. Nothing really interesting yet I guess but it shows that it's pretty straightforward to use Scala instead of Java.

http://github.com/tlazaro/scala-metagun

Cheers
tomas
 
Posts: 13
Joined: Sat Jul 23, 2011 7:15 pm

Re: Metagun in Scala

Postby mzechner » Mon Jul 25, 2011 9:20 am

Uh sweet, that will be the ideal stepping stone for me to get into Scala.
mzechner
Site Admin
 
Posts: 4879
Joined: Sat Jul 10, 2010 3:50 pm

Re: Metagun in Scala

Postby tomas » Fri Dec 30, 2011 11:14 pm

I have just finished updating the project. I also added Android support.

It's interesting to note that the Scala code is lighter than the original Java code (comparing classes.dex inside the apk). I'm not sure why. Perhaps the Java code changed since last time I did the conversion or perhaps the way I coded just resulted in less bytecode! Or perhaps Proguard just removed more... no clue. But the most important result is that it is not heavier! There is just no penalty for using Scala.

You too can code using Scala instead of Java! Join now! :)
tomas
 
Posts: 13
Joined: Sat Jul 23, 2011 7:15 pm

Re: Metagun in Scala

Postby mzechner » Sat Dec 31, 2011 12:03 am

That's pretty interesting. The last time i tried Scala + Android it resulted in a 20mb APK iirc. For a plain app. Been a while though, glad to see there's no penalty involved in using Scala :D
mzechner
Site Admin
 
Posts: 4879
Joined: Sat Jul 10, 2010 3:50 pm


Return to Libgdx Contributions

Who is online

Users browsing this forum: No registered users and 1 guest