Page 1 of 1

[WIP]3D Javascript MMO Engine

Posted: Sat Jun 22, 2013 6:23 am
by Luke111
Hi everyone, I will make this short and awesome, unlike most of my posts.

Here's the deal: I am making a Platform as a Service 3D MMO Engine.

Here's the details:
It is coded in PHP/Javascript/CSS/HTML.

I am using node-webkit for the client/editor. The service side uses PHP. The server side uses node.js.
The 3D rendering is done in Three.js.
The network communication (client->server) is done in socket.io.

I would have had a lot more done, but I 1) Had no internet and 2) had to work on TheGamerBoard.

Feel free to ask questions, and give advice!

EDIT: I think I posted this in the wrong location. Oh well...

-Luke

[SCREENSHOTS]
lre-0012-062213.PNG

Re: [WIP]3D Javascript MMO Engine

Posted: Sat Jun 22, 2013 7:09 am
by a_bertrand
Why mix node.js and PHP? What does PHP bring here to you? Just curiosity mind you.

For the 3D, I'm somewhat skeptic. Not sure how will that will work out, but anyhow good luck with your project!

Re: [WIP]3D Javascript MMO Engine

Posted: Sat Jun 22, 2013 7:58 am
by Luke111
I plan to use PHP to handle the initial developer authentication and the ecommerce portions of the system.
Pretty much what happens is the PHP is used to log in the developer and verify their license, etc. Node then confirms the validity of the developer and handles the editor.
The server for the game is done completely in Node. This may not make sense, as it is hard for me to think anything but code at 2am.

Oh, and for the 3D, Three.js uses WebGL. It makes use of the graphics card, but can also have a software renderer (I think that is the right term). The way I have it set up, I don't think there will be any problems for the 3D side, as long as Three is as good as I think it is (I had revision 58 on my laptop where there was no internet, so I haven't updated it).

I strongly recommend everyone checks out node-webkit! (It is chrome with node built in, and it allows for access to the filesystem!!!)

-Luke

Re: [WIP]3D Javascript MMO Engine

Posted: Sat Jun 22, 2013 8:24 am
by Jackolantern
Sounds cool! However, I would suggest to drop PHP for that usage. I think it would simplify your life to keep it all in node. Check out Express if you haven't. It is extremely pick up and use. It will greatly simplify the sessions situation where you would be trying to pass session data back and forth between PHP and node.

Re: [WIP]3D Javascript MMO Engine

Posted: Sat Jun 22, 2013 6:59 pm
by Luke111
Yeah I think you're right.. I used express in the past, and I guess I will be using it now too!

Thanks for the ideas!

Re: [WIP]3D Javascript MMO Engine

Posted: Sat Jun 22, 2013 9:32 pm
by Jackolantern
Luke111 wrote:Yeah I think you're right.. I used express in the past, and I guess I will be using it now too!

Thanks for the ideas!
If you need some help in allowing logins in Express sessions to carry over into Socket.io, I released a simple project here showing how to do it. It is a little weird, requiring use of a Connect MemoryStore session system and the Socket.io 'authorize' event.

Re: [WIP]3D Javascript MMO Engine

Posted: Sun Jun 23, 2013 1:12 am
by Luke111
Thanks for the link, Jack! It looks pretty cool. I once also used mongo, but figured it was too hard. I think I can manage it now. Funny thing is, I was thinking of using mongo for one of my other projects that could use a non-structured database for feed updates. I was originally thinking redis, but that's not structured enough. SQL is too structured. I think mongo is just the one. :)

Thanks
-Luke

Re: [WIP]3D Javascript MMO Engine

Posted: Sun Jun 23, 2013 5:00 am
by Jackolantern
I love MongoDB now. It isn't right for everything, of course, but for many cases it is perfect and actually cuts down a lot of complexity from SQL databases. After using it for a couple of weeks now, about the only case I can come up with where I wouldn't want to use it would be for a datastore that will be used for heavy Business Intelligence reporting. SQL is still king when it comes to comparing data in all kinds of twisty and crazy ways. But for basically anything game-related, Mongo is a boss lol ;)

Re: [WIP]3D Javascript MMO Engine

Posted: Sun Jun 23, 2013 12:03 pm
by a_bertrand
Well maybe when you go for top pages, or player progression to see if somebody cheat MongoDB doesn't offer much by itself and you will have to make the data mining yourself. However for game content and even player data MongoDB is indeed not bad at all.

Re: [WIP]3D Javascript MMO Engine

Posted: Sun Jun 23, 2013 5:51 pm
by Luke111
My thought is to have a structure for the logged in player in memory, and sync it with Mongo either every 2 minutes (does this sound good?) or when the player logs out (or disconnects from socket.io, pretty much logging out).

I have lots of time to prepare for the client/server, I am still working on the editor.

A cool thing I am planning is to (eventually) allow the developers to edit the zones together simultaneously. With socket, it doesn't sound too hard.