Yet another mmo project

Hi everyone,



I've started playing with jmonkeyengine a few months ago. I started creating an mmo game. Right now I have the following:

Separate client and server code.

Communication: developed by me as I didn't like the available utils.

Server: Some of the code is inspired by darkstar. Some of the future plans are inspired by the pennmush code.

Client: display is with jme2 (I'll upgrade to jme3 when beta comes out), and TerrainPass (mfkarpg). Chatting is available on a global chat right now. Movement is supposed to work (I could move a mob on the terrain and see it moving, supposed to work with two players, too). Supported model formats are md5 and .obj right now.

Database: Hibernate and derby (plans to use a more serious db on the server side, but derby is ok for the client).

Data synchronization: Mobs, items, and heightmaps are synchronized from the server when logging in and entering a zone.

World can be infinite and dynamically loaded as neccessary.

Sky, day-night transition, sun and moon movement.

Fenggui.

Source is closed right now - if the game is ever finished I'd like to avoid modded clients. It sould be possible to replace parts of the code (like game system) of course, without touching the game core.



If some of you would like to spend some time developing a game like this then I'd be glad :slight_smile:

Future plans:

World is not designed yet. I'd prefer a game with lots of intriguing and humans, and less monsters.

Partial documentation exists about coding but I still have to write some. I'd like a game that is much more roleplaying than fighting.

Adding physics.

The server would work like a MUSH server, but instead of softcode I plan to use lua - this would mean a very flexible world building and ai.

Login server and multiple game servers.

The client should have lots of fancy things to make the game look better, like weather, particle effects, grass (shell texturing?).

Fancy game windows and game ui.



About me:

10+ years experience in java (final thesis in networking) as software designer, 4+ years experience in developing, organizing muds, mushes.



Looking for:

Experienced programmers (I have no time to teach beginners)

2d/3d artists (I have no experience in this area)

music composer / sound composer (can do without it right now)

world designers

world builders (there are no build tools right now so it can wait)

homepage designer (can wait)

server (I don't have a server to run the game on, or svn server to use for development)

Don't expect to get any money for the work.



If you'd like to tell me that such a project is impossible to finish then don't. I expect to not finish this game, but I'd very much like to be wrong, and during the development I'll learn a lot.



I'll put up some screenshots in a few days.



Gaba

Hungary

I've attached some screenshots. Please note that all models and textures right now are only placeholders. Unfortunately the real features of the code cannot be seen from the screenshots (like data synchronization from the server, etc).

Actually I think that your Project is quite possible, I suggest to not use md5 models, as JME3 does not support them, try to use Ogre.xml instead, then you have no problem switchig over modelwise.



Also with lua coding, I suggest to not use it actualy.



While it gives you fast and simple programming, once it reaches a critical amount it becomes slower and slower(to develop in it), due to being a dynamic language. (I really know what I'm speaking here about, as it is the reason why I switched from Garrysmod to a static language, even If  I have to write far more stuff myself.

(It really sucks to think you have finished some larger addon, just to find out the next 2 hours how manny spelling mistakes you did in variablenames, functions, and that some functions return a different value than you expected them to do)

All in all, I think taht programming in Java is faster than in lua, also the resulting code is way faster.(around 5x should be the factor, as lua is only interpreted/compiled to luabytecode, but not JIT-compiled)



Just out of intrest, what kind a network architecture/system did you choose?

(Server side calculation, Clientside prediction / Server side checking and relaying,Client side calculation of localplayer /ect.)





If you want to make the Cliebnt better looking, you might want to start takinga  few looks in Jme3, because you cannot convert effects taht easy between jme3 and jme2 as the material and geometry system has some larger changes. Also jme3 has another default Gui system (Nifty Gui) wich you may want to take a look on (I think it is possible to get Fenggui working with JMe3 however)





Also good to know that I'm no the only one who has developed his own networkcode.

Hi,



The code is prepared to detect the type of model loaded, and it is now also prepared to load ogrexml. I need to compare different model types to see which is more effective. I didn't like md5 because it was a bit jumpy.



If I'd be able to use java for AI language then I would. Unfortunately I need a language that is good for AI scripting and java is not a choice:

  • needs to be changeable without rebooting the server.
  • must avoid deadlocks and infinite loops (no while(true) {…}, but instead foreach(…) {…})
  • must be partially useable by non-coders.
  • must provide only the tools that can be used by builders (access control).



    Lua is good for the above. Java is not. (the above is based on my MUSH experience which uses "softcode" for AI and server side scripting. I think its quite good but softcode lacks the resources for learning while lua has some good training sites).



    The network architecture is a bit complicated as there will be multiple servers who are connected to each other and the client can connect to one or more servers at the same time, each time sending the message to the responsible server (there is a login server and the game servers will be separated by zone). The connection will be java.nio based tcp+udp. I'm thinking that server-server connection might be not tcp (only reliable connection is neccessary), but ejb3 but I haven't yet decided.



    The client and the server stores the timestamp, current location and direction, and movement (transition and rotation vectors) of each object. Only changes are sent to the server that broadcasts the movement to the other nearby players and nearby mobs. the clients interpolate the movement based on the last known position and direction. Both the client and server needs to calculate current position: the client for displaying, the server for checking and for the mob AI (triggering mobs when moving close to them, etc). The server will also do anti-cheat checking. Displaying mobs and other players movement might be a bit delayed in local client to provide seamless movement.



    I'd only like to switch to jme3 when it's at least in beta. Before then it would be a risk I'd not take. Even now I had to move to nightly build from 2.0.1 because of some problems with one of the ogrexml models and I don't want to spend hours coding just to find out that something is "still buggy" or "not implemented yet".

Quite right



Me and my brother arealso developing an MMO game (MMORTS that is) and I wanted to move onto jME3, but I very soon found it is far too unstable right now to actually use it. I have an ATI graphics card and I could not run the engine, so I’m sticking to jME2 right now. It’s either that, or having to postpone the production of your game a few months (which - certainly in my case - is something that I cannot afford as summer break will be over by then).



Concerning the underlying architecture and client <> server communication/interaction, we are using almost the same as you do. Yet we do all of it in java. Sure we will need to change code from time to time, but then the game will be down for a few seconds. No big deal, but it’s a downside nonetheless.

Saving locations/rotations and passing them to other clients is also done the same way in order to reduce the amount of internet traffic as much as possible.



Funny actually, as we are also looking for people like 3d artists and a sound composer.

Concerning music composer, we have already found one. I found him at http://www.dvxuser.com/V6/. It’s actually a filmmaking forum, but most of the composers that are active there, also make music for games. Alternatively, you could check out http://forums.tigsource.com/.



Hope it helps, I wish you best of luck with your game! It seems perfectly doable to me.

Hey tehre,



I't good to see people actually working on games… I would love to do that as well, but since I don't have the time to actually put any effort towards learning the needed skils that's not going to happen for a while.



I do however have a project I'm currently working on that could benefit you both.



I'm working on a plugable, distributed server architecture. This architecture lets you write plugins on a framework core. This core can work both as a standalone instance or on multiple instances on multiple servers / JVMs. The only difference in setup is the configuration file which you would have to write to tell the core which plugin runs where.

So you could start with just 1 server, and then gradually add more as needed without having to rewrite any code, all you have to do is reconfigure your servers and you're done.



I recently also added a beta version of the registry which makes it even more simple. Every locally run plugin now registers with a central registry and all other plugins can loo up the connection details there.



the sourceforge url is http://sourceforge.net/projects/pffj/

Qaxis_dev: I must disagree with you on the AI coding language. If you choose java, then you have a complex language that is hard to learn for the world designers (they are usually not coders), and you limit the possibilities of the AI with it. It is also very possible to write infinite loops, and you need to reboot the server each time a new NPC or mob with a special action is added. I use a scripting language that can be added or modified while the game is running. It is an easy language that can be learned by people who are not programmers. Java provides it some api to manipulate the game objects. And because of the structure of the language you cannot make infinite loops. This provides the possibility of more complex AI actions. This is something I really liked in MUSHes - they have a softcode that is easy to use even for complex operations.



ractoc: Yes, I've already noticed your project although I haven't looked deeply into it. I guess I'll use EJB3 for distributed server architecture because I already know it quite well and I use it for business applications.

ah yes, EJB3. I've used EJBs from time to time myself, work related. But the drawback of those is that they need a j2ee container. My framework is deisgned to only use 2jse. Which in some cases might prove more usefull, seeing as you won't need a server like tomcat (hard to maintain) or jboss, which is also not very user friendly.



But in the end, it's up to you. I'm just pointing it out as an alternative.

ractoc: I'm used to EJB and J2EE as this is what I do for a living (working ni J2EE+EJB). As I already use hibernate for database persistence it is really just a short step to use EJBs too. I was planning to use OpenEJB instead of tomcat or jboss, but if I need a container I would use glassfish as this is the easiest and includes the ejb specification by default (which tomcat doesn't).



Btw my first Lua AI works :slight_smile: It is only a rabbit running in circles (as the API doesn't allow much more then moving towards a place and scheduling the next decision right now) but it will be extended very easily. The AI scripts are written in Lua, they can be modified at any time without any lag or server shutdown (heck, the code can even modify itself if it wants!), but the game API it uses is provided in java. This is the example:


actor.move:
if actor:get("state") == "1" then
    dir=math.pi*2/3
    state="2"
elseif actor:get("state") == "2" then
    dir=math.pi*4/3
    state="3"
else
    dir=0
    state="1"
end
actor:set("state", state)
actor:moveTo(dir)
actor:schedule(actor:get("move"), 10) -- 10 sec delay