Is It possible?
Is It possible?
I think so, you can do an emulator with most of languages out there. I'm not a pro with LUA, but reading it now, looks like it's fairy possible.
I'm basing my opinion on:
http://w3.impa.br/~diego/software/lu...roduction.html
https://gist.github.com/Deco/4026258 (Multithreaded example)
I wish some LUA Developer come here and have a look at it...
I think @Glaceon develops in LUA...?
Your head is in the right place. Keep it going! Would love to see emulators avaliable in other languages than C# and Java...
Best of luck
Just Cause 2 servers are written in LUA (As far as I know). They seem to be pretty stable and able to handle a lot of connections.
JC-MP only uses LUA for scripting, not for the server software itself. LUA is a script language, and unless there's something out there that converts it to real programs, it won't be good to use to make the actual emulator.
That said, it is a really good language for supporting plugins and mods!
Yes, you could write the high performance parts in C and embed Lua for stuff like game logic.
Writing the emulator in pure Lua would be interesting though.
So it would be difficult to make an emulator in lua?
atleast an stable one
Playing around with LuaSocket now :)
- - - Updated - - -
Should i use HTTP socket or TCP socket?
This sounds like an interesting learning project. Props to you for trying something new! I honestly don't think you'd ever want to use Lua for anything too big but it is a nice language to play around with. Some of the more complex features like metatables are really cool to work with.
Off Topic: Lua is a word (it means moon) and so shouldn't be all caps (specifically requested by the creators of Lua).
http://www.lua.org/about.html"Lua" (pronounced LOO-ah) means "Moon" in Portuguese. As such, it is neither an acronym nor an abbreviation, but a noun. More specifically, "Lua" is a name, the name of the Earth's moon and the name of the language. Like most names, it should be written in lower case with an initial capital, that is, "Lua". Please do not write it as "LUA", which is both ugly and confusing, because then it becomes an acronym with different meanings for different people. So, please, write "Lua" right!
Something doesn't have to be Object Oriented in order to make a server out of it. If it has networking and file opening access (and database drivers), then you can make a Habbo server with the language.
Languages you can write a Habbo server in (not complete list):
Python
C
Go
C++
C#
Java
JavaScript (using Node.JS, and any Node.JS language, including TypeScript, CoffeeScript and others)
Pascal / Delphi
Visual Basic 6 / .NET
Lua (yes)
Haskell
OCaml / F# (would love to see this!)
Ruby (had a project like this years ago, but threading in Ruby sucks, not impossible, just not worth it, use JRuby instead or CoffeeScript with Node.JS)
and thousands of other languages, including RealBASIC, probably FreeBasic and many others.
Key features you want in whatever language you use:
Networking
Database Drivers or File Input and Output
Threading or subprocesses or something close enough, or capability of implementing using C or C++