Search the Community
Showing results for tags 'virtual world'.
-
This is a virtual world that runs on webGL. I don't think they used any webGL frameworks like ThreeJS or BabylonJS. I know these guys launched in 2011 and were acquired (and shutdown) by Yahoo in 2014. The company was Sam Thompson (ex-Cryptic and Pandemic), Jimb Esser (ex-Cryptic), Conor Dickinson (ex-Facebook and Cryptic) and Jered Windsheimer (of Cryptic). It looks pretty cutting-edge for its time. Does anyone know much about this project? Did they end up doing any cool webGL related work with Yahoo?
-
I've been asking a lot of questions lately. Well here's why: www.punkoffice.com/webiverse I'm working on a virtual world. This runs on mobile devices and its networked, so yeh, you can open multiple browser windows to see for yourself. Its just a start. There's much to be done such as flying, building, asset management, region management, basic physics, etc... I'm aiming to make it a collaborative workspace where people can build stuff together. I have a lot of experience playing Second Life, developing for it and also running the OpenSim server so I've used some of my knowledge from that. For those who care and want the details, here we go: Client I'm using typescript for the first time...and I love it! I can now use Visual Studio for EVERYTHING. I just felt stupid writing a big project in javascript so I decided to grow up and learn typescript. Server I'm using C#. Its one of my fave languages. So quick and easy and portable so I can build in Visual Studio then just copy the file to my Linux server and it works. I was tossing up between nodejs and C#. I've seen the benchmarks and for the bigger stuff C# comes out faster. Networking Just using websockets for this one. No libraries required on client side, just straight javascript. Using Fleck on the server. Communication The client sends keypresses to the server NOT position / rotation information. This is to prevent client from cheating and changing position in browser debugging tools. Keypresses are sent every 50 milli-seconds when the user is holding down the key. It has to be done this way. Its not possible to send just a DOWN and UP key event because network lag will give a variable time difference between DOWN and UP and calculate different movements to the client. This will make "client correction" go crazy and will cause the avatar to snap back every time they release a key. Also, you can't send timestamps with these keypresses 'cos the client can change them and make their character basically teleport. I know 'cos I worked on this problem for weeks. Client prediction / correction The client will "predict" the movement when user presses the keys so the avatar moves instantly. The server will calculate movement using the same formula and send the new position / rotation the client. If the client's current position / rotation is different (due to rounding errors or cheating) it will be corrected to mirror the server. The process is complicated and I had to read a lot of different tutorials on how to do this properly. This is the technique that John Carmack invented when he made Quake for WAN. This technique is never perfect though. You either have speed or accuracy, but you can't have both (which is why in multiplayer games you can still get hit by a bullet even if you managed to quickly hide behind a wall). Logging The server is logging to a MySQL database. I'm logging players entering and leaving, their user agent, their FPS every minute (minimum, median, maximum). I'm also logging the amount of outgoing and incoming data between each player. I really need stats so I can see if this is feasible for mobile users. I remember Second Life really drained the bandwidth. That's ok for a home connection, but not for someone using their mobile phone with a data limit. Authentication All my client code is visible. Sockets can also be connected from anywhere and bad data sent to screw up the server. I need to stop this (or at least make it harder to do). I'm using a session key from PHP then sending that session key through the socket on initial connection to verify that its the same client. That session key is deleted as soon as they've been verified. Physics The only physics so far is simple moving forward and rotating. I'd like to add gravity as well. The only problem is the algorithm must be the same on client and server. If I can't find a library that exists in Javascript and also C# I'll have to write my own. I'm prepared to do that though. However, frame rate has priority especially with mobile devices. I will sacrifice physics to keep a smooth frame rate if I have to.