|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today! |
|
#1
|
|||
|
|||
|
Question concerning features of a MMORPG
Not sure if anyone here has ever heard of it, much less played it, but I am creating what can be termed a 'clone' of a game called ArchMage originally created then dropped by a company called MARI telecommunications from Korea several years back. After MARI discontinued development of the game, several copies have sprouted up, now Im in the process of creating my own.
Basically, this game is a text based/turn based game. I am encoding it in php with a SQL backend. While I am not finished with the PHP coding, it is coming along nicely, although a bit slow. I will begin working on several of the new features here shortly. But I am not entirely certain of the way I wish to proceed on creating it. In the game, there is a 'marketplace' of sorts where players can put up for sale their unwanted items, or purchase items, in a auction type of sales system. Once a bid is placed upon an item, someone has 30 minutes to come along and place a higher bid. If someone bids higher, then the clock is reset to 30 minutes, and the process begins anew. Once the item has gone a complete 30 minutes without a higher bid, the purchaser receives the item and the seller receives the funds generated from the sale. Now, several people have requested a sidebar that shows how long until they either receive the item or the money generated by the sale, and to display this in a clock type fasion. My question here, and I guess this is simply a matter of opinion, what would be the best way to accomplish this? At first, I began to explore the JS route, but ruled that out as I cannot find out how to connect to a DB from JS. I then thought of using a RSS type feed, but 1.)I know nothing of RSS, and 2.) How could it update without refreshing the entire screen? Recently, it was suggested that I used flash and ActionScript to accomplish this, and it seems a very good idea, except for 1.) I know nothing of Flash, and 2.) Wouldnt the constant querying (say perhaps every 10 seconds or so would be sufficient) of the DB drastically slow things down, especially if this game would and could eventually have thousands of players from all over the world playing? As far as my 'Not Knowing' or not being familar with JS, RSS, or Flash, thats not much of a problem as my knowledge of PHP and HTML are entirely self taught, and I can do the same with any of the above. And when it comes to the server, I am not entirely sure of the specs, but it is a dedicated server. So, what would be the best way to do this? Possibly something I havent thought of yet? Thanks for your input here guys and gals. Here is some concept art/templates from the graphics designer we have on our team: Main Gaming Page Secondary Page Background that turn information will be shown on Different symbols used in the gameplay |
|
#2
|
||||
|
||||
|
Are they asking that it be instant notification when someone outbids them? Or do they just want a 30 min countdown?
If a countdown is all that is needed, just use JS it's very simiple. If they want notification then flash or JS (AJAX) can be used.
__________________
Miscellaneous Software Viper_SB Developershed E-Support Anyone else play chess? Challenge me |
|
#3
|
|||
|
|||
|
Instant, or near instant notification is what is being asked.
Never thought of AJAX, but I do know of several 'chat' type programs that utilize it. Which type would take up less server resources? |
|
#4
|
||||
|
||||
|
AJAX is javascript (in case you didn't know) and with it you can access another script and that script does the db checking etc...
I've never used flash so I don't know how much resources we're talking here, but flash might take less if it keeps an open connection, as with JS you have to keep requerying the page. |
|
#5
|
||||
|
||||
|
Flash wouldn't take any longer than a script, because Flash can't talk to a database directly. You use Flash to talk to a server-side script (like PHP), which acts as a middle-man between the database and the Flash movie.
However Flash does support XML socket connections. So if your server also supports socket connections, then you can get instant data communication between the two. I would also suggest you could make your entire game interface in Flash, and it could call the PHP scripts it needs and then just display whatever data in whatever way. Then you don't ever need to reload the page. The same can be implemented with AJAX.
__________________
. Web Dev Cheat Sheets :: Flash 8 LiveDocs :: PHP Manual :: MySQL Manual :: My Zodiac/13Moon Mod for SMF :: Compare Game Prices "All matter is merely energy condensed to a slow vibration. We are all one consciousness experiencing itself - subjectively. There is no such thing as death, life is only a dream. We are the imaginations of ourselves." - Bill Hicks "Truth is hidden in the subtle nature of the heart of everything, although it is invisible. One cannot see it from inside and neither from the surface. One can only live and experience it." - Heart Sutra |
|
#6
|
|||||
|
|||||
|
Quote:
After it went down, I tried creating my own. Lost interest and all; besides I had no resources for a test server. Anyway... Quote:
The trick is to ask yourself, how many times do you need to query to keep the whole thing secure? You need to query at least once, to retrieve the timestamp for the bid. Now for whatever time is remaining, it's just a countdown on the clientside. There's two reasons that there is a query from the database. The first is that the client thinks there is a change. In that case, the client should send a request for the updated information. The second is that the server knows there is a change, and needs to tell the client. As mentioned, AJAX is ideal for this. But you can muck about with Flash socket connections if you want. So the best case scenario is two db queries from the client, and the worst case is whatever the update resolution of your game is. Just one more point. You brought up RSS. RSS is sort of like a news notification system, and it's not intended to be part of a regular browsing experience. I.E., people subscribe to a RSS feed, when there is a new item in the feed, they can click on a link to a webpage (or read the text in the feed). What I'm trying to say is, RSS is only in addition to an AJAX or Flash update system. And someone has to have their RSS feed updating very frequently... Quote:
Regardless of the specs, I'm going to warn you about one point. Cache as much as possible. You might recall this from the original game, where certain aspects of the game like the ranking list were updated only every so often (15 minutes-30 minutes IIRC). Try to intelligently reduce server load. |
|
#7
|
||||
|
||||
|
Quote:
Didn't know that, I learn something new everyday ![]() |
|
#8
|
|||
|
|||
|
Answer ?
Quote:
Have you thought about using Iframes ? this way the clock can be a simple html one, the Iframe would let you administor the clock on a different page and it would appear updated on your game's site, well i think html can connect to sql db ive never got that far. Is there not also a way of using the sql server time?, Or VB code if you can include that you could just use a label and program the clock to what you need (badly thought about post (2:30am) lol sorry if this doesnt help) |
|
#9
|
||||
|
||||
|
I personally despise iframes. They work well for KoL but rarely anywhere else. Using an AJAX implementation for supposedly real-time updating seems like a much better way to me.
I personally would also prefer ajax to flash.
__________________
A work in progress: Card Game Platform (Status: On Hold) | Joke Thread “Rational thinkers deplore the excesses of democracy; it abuses the individual and elevates the mob. The death of Socrates was its finest fruit.” |
|
#10
|
|||
|
|||
|
Quote:
I forget about this thread until i received an email notification showing a reply. FYI, I went with flash. Im still in early beta testing (or is it called alpha at this point) with only 5 or 6 people, but it appears a minimal amount of bugs so far. of course, once I get more people involved, they will begin popping up alot more im sure. |
|
#11
|
||||
|
||||
|
There's a link to a Flash Socket Server program in the Resources sticky of the Flash forum. It's written in Java and uses TCP sockets (Flash only supports TCP sockets, not UDP). There is even a free version.
|
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Game Development > Question concerning features of a MMORPG |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |