[WIP]3D Javascript MMO Engine

A topic built around all the best posts and information from the site. It includes informative posts, links to resources, tips, tricks, ect... Do not post here unless it will become a resource based post.
Post Reply
User avatar
Luke111
Posts: 84
Joined: Fri Aug 17, 2012 7:02 am

[WIP]3D Javascript MMO Engine

Post 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
I don't believe in platform-specific development, but I also don't believe in Apple.
User avatar
a_bertrand
Posts: 1536
Joined: Mon Feb 25, 2013 1:46 pm

Re: [WIP]3D Javascript MMO Engine

Post 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!
Creator of Dot World Maker
Mad programmer and annoying composer
User avatar
Luke111
Posts: 84
Joined: Fri Aug 17, 2012 7:02 am

Re: [WIP]3D Javascript MMO Engine

Post 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
I don't believe in platform-specific development, but I also don't believe in Apple.
User avatar
Jackolantern
Posts: 10891
Joined: Wed Jul 01, 2009 11:00 pm

Re: [WIP]3D Javascript MMO Engine

Post 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.
The indelible lord of tl;dr
User avatar
Luke111
Posts: 84
Joined: Fri Aug 17, 2012 7:02 am

Re: [WIP]3D Javascript MMO Engine

Post 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!
I don't believe in platform-specific development, but I also don't believe in Apple.
User avatar
Jackolantern
Posts: 10891
Joined: Wed Jul 01, 2009 11:00 pm

Re: [WIP]3D Javascript MMO Engine

Post 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.
The indelible lord of tl;dr
User avatar
Luke111
Posts: 84
Joined: Fri Aug 17, 2012 7:02 am

Re: [WIP]3D Javascript MMO Engine

Post 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
I don't believe in platform-specific development, but I also don't believe in Apple.
User avatar
Jackolantern
Posts: 10891
Joined: Wed Jul 01, 2009 11:00 pm

Re: [WIP]3D Javascript MMO Engine

Post 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 ;)
The indelible lord of tl;dr
User avatar
a_bertrand
Posts: 1536
Joined: Mon Feb 25, 2013 1:46 pm

Re: [WIP]3D Javascript MMO Engine

Post 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.
Creator of Dot World Maker
Mad programmer and annoying composer
User avatar
Luke111
Posts: 84
Joined: Fri Aug 17, 2012 7:02 am

Re: [WIP]3D Javascript MMO Engine

Post 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.
I don't believe in platform-specific development, but I also don't believe in Apple.
Post Reply

Return to “Resources”