Lua/Love2D or Java/Slick2D: Which is faster and which do you prefer?
15 replies, posted
I have already started production on a game in neither of these languages or frameworks, but I just want honest opinions on this dilemma after scavenging the internets for answers. I couldn't find any. Which is a faster language (I know the question is highly objective, and I know Lua is a scripting language, not a programming one, but still), and which do you prefer (for game development)?
Thanks. :quagmire:
It's a matter of personal preference. I find it easier to organize my project in object oriented languages like Java, but for prototyping and experimenting I prefer Lua. I don't think there's a huge speed difference between Love2D and Slick2D, haven't got any numbers to back it up though.
In this age of blazing fast computers I really wouldn't worry too much about performance but instead focus on what you expect to be most productive with.
LOVE + LuaJIT is quite fast(ish).
C + device contexts/bitmaps.
I think it's more like what language do you prefer: Lua or Java.
I personally stick with Lua + Löve. It's pretty. And you can have classes if you want
Why don't you just try out both, toy around a little and then decide which one you want to choose?
[QUOTE=SiPlus;36065888]C + device contexts/bitmaps.[/QUOTE]
Not using hardware acceleration will surely make it faster.
Is Love2D built on C++?
Why does it matter? They are both pretty fast. Both will slow down if you are drawing a million things at once. And yes Love2D is built on C++.
[QUOTE=dajoh;36067676]Not using hardware acceleration will surely make it faster.[/QUOTE]
OpenGL glOrtho/Direct2D?
[QUOTE=Map in a box;36070425]Why does it matter? They are both pretty fast. Both will slow down if you are drawing a million things at once. And yes Love2D is built on C++.[/QUOTE]
How sure are you of that? Isn't C++ an assembly language, and Java is an interpreted one running through a virtual machine, which stagnates processing, rendering Java slower than C++? Or am I getting something wrong?
If you're just starting I really don't think you should care which one is faster. Just use the one you feel more comfortable with.
[QUOTE=Perl;36081996]If you're just starting I really don't think you should care which one is faster. Just use the one you feel more comfortable with.[/QUOTE]
Even if you're not starting. You'd be surprised how little time the speed is actually important. Well, at least the "minor" differences between stuff like Java and C++.
If you have a game in Java that runs at 10 FPS and in C++ it runs at 60 FPS that still means that it's too slow and you'll have to do some optimizing either way.
[QUOTE=Darwin226;36082294]Even if you're not starting. You'd be surprised how little time the speed is actually important. Well, at least the "minor" differences between stuff like Java and C++.
If you have a game in Java that runs at 10 FPS and in C++ it runs at 60 FPS that still means that it's too slow and you'll have to do some optimizing either way.[/QUOTE]
Well in that example the smarter choice would be obviously to use C++ as it means that you have to optimize less(compared to the optimization you would have to do if it ran at 10fps).
But no, it really doesn't matter. I personally dislike both slick2D and love and I use Flixel/Flashpunk. It's all preference.
[QUOTE=Cockman;36081944]How sure are you of that? Isn't C++ an assembly language, and Java is an interpreted one running through a virtual machine, which stagnates processing, rendering Java slower than C++? Or am I getting something wrong?[/QUOTE]
C++ is a compiled language, which means that once compiled, it can be send to the CPU directly. Java is an interpreted language and must be run through a virtual machine first.
On a side note, C++ isn't always faster than Java, it depends on the code you write. Because C++ is quite a bit harder to code, it's easy to write code that is actually slower than it would be in Java. Also, the raw power provided by such a language is not often necessary, as others are stating. Especially if you're building a relatively simple 2D game, there is plenty of speed available with Java en other interpreted languages.
Furthermore, Love is indeed written in C++ and Lua is a very fast language, that is why it is used a lot in games. So try to choose a framework or engine that you find easy to use and meets your requirements, like maybe you want it to run on tablets or so.
[QUOTE=The Mad Man;36116679]C++ is a compiled language, which means that once compiled, it can be send to the CPU directly. Java is an interpreted language and must be run through a virtual machine first.
On a side note, C++ isn't always faster than Java, it depends on the code you write. Because C++ is quite a bit harder to code, it's easy to write code that is actually slower than it would be in Java. Also, the raw power provided by such a language is not often necessary, as others are stating. Especially if you're building a relatively simple 2D game, there is plenty of speed available with Java en other interpreted languages.
Furthermore, Love is indeed written in C++ and Lua is a very fast language, that is why it is used a lot in games. So try to choose a framework or engine that you find easy to use and meets your requirements, like maybe you want it to run on tablets or so.[/QUOTE]
Java has been JITted for years now. Instead of being interpreted directly, the first time you call a method it compiles that piece of code and runs it. Every time after that it just runs the already-compiled code. You still have to worry about the garbage collector, though.
Sorry, you need to Log In to post a reply to this thread.