Calinou wrote:No, just no. Java and C# both suck.
cosarara97 wrote:Adding lots of nodes in lua shouldn't slow down the game, but things like animals mod, in which lots of objects (entities?) are controlled are really slow.
cosarara97 wrote:I think that if we wanted to make mods in a fast language it would be better to make them in C++, using shared objects like in some plugin systems.
Java is not really fast (my PC runs MC at 5 fps), and both Java and C# would mean a big amount of new dependencies needed by minetest. With java you'd need to install the java virtual machine, and for .NET you'd need .NET in windows and mono in Linux, and mods should run on both... so I think that if a new language were added to minetest it wouldn't be C# or Java.
Neuromancer wrote:cosarara97 wrote:I think that if we wanted to make mods in a fast language it would be better to make them in C++, using shared objects like in some plugin systems.
Java is not really fast (my PC runs MC at 5 fps), and both Java and C# would mean a big amount of new dependencies needed by minetest. With java you'd need to install the java virtual machine, and for .NET you'd need .NET in windows and mono in Linux, and mods should run on both... so I think that if a new language were added to minetest it wouldn't be C# or Java.
I thought that C++ might be a good idea for mods too (because it would offer the best performance and integrate the easiest), but what made me dismiss it is that it has always been possible to write C++ code to modify Minetest, and yet hardly anyone ever did. It wasn't until celeron enabled modding with Lua that there was an explosion of contribution and mods to Minetest. My impression was the reason that happened is that Lua is much easier to learn than C++. I looked at Java & C# as dumbed down versions of C++ that were more accessible, you don't have to worry about pointers and the like. Still you do have to compile but I thought that building/compiling would be quicker and easier than in C++.
Here's the other thing, there is no shortage of people writing mods for Minecraft in Java, but that may just be because 6.3 million people own Minecraft, and so there are bound to be some folks in that group that can handle Java. Next to Minecraft, Minetest does have the most vibrant contributing user community, but it is orders of magnitude smaller. How many copies of Minetest have been downloaded? I've been curious about that. It's kind of amazing to see someone buy a copy of Minecraft every 5 seconds.
cosarara97 wrote:Before the lua api there weren't mods, just patches you had to apply to the game, and you had to rebuild every time. I'm talking about using .so/.dll's as you do in, for example, pcsx for plugins.
hijera wrote:maybe better use LuaJIT, which will compile lua to bytecode?
Neuromancer wrote:hijera wrote:maybe better use LuaJIT, which will compile lua to bytecode?
Holy %#&^$!
This could really boost performance of lua mods!
http://luajit.org/performance_x86.html
"LuaJIT is API-compatible with Lua 5.1. If you've already embedded Lua into your application, you probably don't need to do anything to switch to LuaJIT, except link with a different library:"
So is this saying that Minetest c++ would need a minor tweak to make this happen?
"LuaJIT offers more performance, at the expense of portability. It currently runs on all popular operating systems based on x86 or x64 CPUs (Linux, Windows, OSX etc.) or embedded systems based on ARM (Android, iOS), PPC or MIPS CPUs. Other platforms will be supported in the future, based on user demand and sponsoring."
Would Minetest lose any portability by doing this? (I'm thinking like maybe game consoles)
Neuromancer wrote:hijera wrote:maybe better use LuaJIT, which will compile lua to bytecode?
Holy %#&^$!
This could really boost performance of lua mods!
http://luajit.org/performance_x86.html
"LuaJIT is API-compatible with Lua 5.1. If you've already embedded Lua into your application, you probably don't need to do anything to switch to LuaJIT, except link with a different library:"
So is this saying that Minetest c++ would need a minor tweak to make this happen?
"LuaJIT offers more performance, at the expense of portability. It currently runs on all popular operating systems based on x86 or x64 CPUs (Linux, Windows, OSX etc.) or embedded systems based on ARM (Android, iOS), PPC or MIPS CPUs. Other platforms will be supported in the future, based on user demand and sponsoring."
Would Minetest lose any portability by doing this? (I'm thinking like maybe game consoles)
xyz wrote:Neuromancer wrote:hijera wrote:maybe better use LuaJIT, which will compile lua to bytecode?
Holy %#&^$!
This could really boost performance of lua mods!
http://luajit.org/performance_x86.html
"LuaJIT is API-compatible with Lua 5.1. If you've already embedded Lua into your application, you probably don't need to do anything to switch to LuaJIT, except link with a different library:"
So is this saying that Minetest c++ would need a minor tweak to make this happen?
"LuaJIT offers more performance, at the expense of portability. It currently runs on all popular operating systems based on x86 or x64 CPUs (Linux, Windows, OSX etc.) or embedded systems based on ARM (Android, iOS), PPC or MIPS CPUs. Other platforms will be supported in the future, based on user demand and sponsoring."
Would Minetest lose any portability by doing this? (I'm thinking like maybe game consoles)
Some random links — lua 1 2, luajit 1
Somebody care to test that? For me (as you can see) it just slows everything down.
Neuromancer wrote:
That's really unfortunate. I read somewhere that it might be the communication between Lua and C++ that can cause performance problems with LuaJit. I think you have proved that getting LuaJit to work with Minetest is more grief that what it is worth. Adding the ability to use C++ to create mods and keeping the ability to continue to do Lua mods is probably the best way to go. C++ mods would perform much better than LuaJit even if it had worked as claimed. Thanks for taking the time to do the performance analysis. It was worth a shot.
Users browsing this forum: No registered users and 13 guests