Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411588 Posts in 69386 Topics- by 58443 Members - Latest Member: Mansreign

May 06, 2024, 12:29:12 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)Viability of JavaScript/AJAX Iso MMO with PHP server side
Pages: [1]
Print
Author Topic: Viability of JavaScript/AJAX Iso MMO with PHP server side  (Read 3172 times)
Kira
TIGBaby
*


Web Developer


View Profile
« on: November 23, 2009, 12:21:46 PM »

Hello everyone,

I have been doing some research lately regarding the viability of a JavaScript MMO client accessing a PHP/MySQL server.  I am looking to expand my web holdings into browser-based interactivity without the use of plugins and was looking for information regrading this topic.  So far this is what I am looking at:

Client: JavaScript/AJAX/CSS
- Polls server every second (dumps command array into request)
- Isometric, z-index absolute positioned layered elements
- Zone maps kept in memory (think D2 zones) to mitigate need to poll server for tile information *
- Unloads tiles not in use, and recreates them from zone map in memory *
- * zone map a security issue?
- movement system: click to move (D2, Ragnarok, etc)
- highlights move to location
- tile layering bottom to top:
- - layer 0: ground
- - layer 1: shadow
- - layer 2: environmental
- - layer 4: gatherable, doo-dad
- - layer 5: user
- - (layer 6: air-based, floating, clouds, weather (not included in viability analysis but rather an open thought))
- tile layering back to front:
- - ensure that changes are made to the layering if an object, in an isometric sense, is behind or in front of another object
- - example: iso(0,0) = top-left, iso(4,4) = bottom-right
- - - ref1: iso(0,1) = [ground,doodad,user]
- - - ref2: iso(0,3) = [ground,environmental]
- - - ref3: iso(0,4) = [ground,user]
- - - objects back to front is then [ground,doodad,user] + [ground,environmental] + [ground,user] so that ref2[environmental] should it be large object thus covers the ref1[user].
- - not counting users, maximum graphical assets for X-Y playscreen:
- - - 20x20: 1600 (20 * 20 * 4)
- - - 30x30: 3600 (30 * 30 * 4)
- - this leads to question: how much can JavaScript really support?  this is the crux question of the viability here.  how many tiles are needed on the play screen and can these tiles be displayed without significant system slowdown?

Server: PHP/MySQL for development (With streamlined custom-coded Java server that maintains persistent information for release)
- Accepts requests from client, processes, sends back
- Custom Java persistent server will significantly decrease SQL queries and server load

A server with 1000 users will poll the server 60,000 times a minute.

Anyways, I was hoping to gain some feedback.  It would be pretty awesome to have a JavaScript framework, but viability is the priority and I feel that in lieu of non-viability, AS3 would be the next best choice.  Accessibility is the second priority and the game must be available without installation.

Thank you for your time,
Kira
Logged
Sanojian
Level 1
*



View Profile
« Reply #1 on: November 25, 2009, 12:20:15 PM »

Hello Kira,

I am writing a game that does some of the things you have mentioned.  Its providing tiled maps and overlaying levels of graphics on top.  It is a turn-based game but it does have a chat client that polls the server for messages every two seconds.  Everything on the client is pure x-platform javascript and HTML.  I am using JSP and servlets on the server-side.

I think the technology could be pushed quite a bit further towards what you described.  I am not sure what kind of web host you would need to support the load since I haven't gotten that many players yet myself.

Anyway here it is:  http://www.cydstudios.com

It needs a graphical overhaul but otherwise its is nearing completion.  Check it out and I would be happy to chat with you more about the technology behind it.
Logged

Tycho Brahe
Level 10
*****

λx.x


View Profile
« Reply #2 on: November 25, 2009, 01:03:29 PM »

Not wanting to be rude, but may I point you to http://forums.tigsource.com/index.php?topic=45.0

anyway, Your idea seems cool, my only concern is the viability of large amouts of javacript in browsers other than chrome and firefox. Also, storing the whole of the map in memory may not be such a good idea as (depending on the size of the data) certain browsers may not allow JavaScript to store that much data.
« Last Edit: November 25, 2009, 02:09:15 PM by MrHackenbacker » Logged
SidM
Level 1
*



View Profile
« Reply #3 on: November 25, 2009, 03:23:54 PM »

There was one I used to play called nexuswar (now defunct due to lack of  Hand Money Right ), which was Java backend, but the front end was heavy, heavy AJAX.

It was low on graphics, though.

http://wiki.nexuswar.com/index.php/Interface
Logged
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic