#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2006
    Location
    St. Louis, IL
    Posts
    57
    Rep Power
    9

    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. #2
  3. Psycho Canadian
    Devshed Demi-God (4500 - 4999 posts)

    Join Date
    Jan 2001
    Location
    Canada
    Posts
    4,846
    Rep Power
    635
    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.
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2006
    Location
    St. Louis, IL
    Posts
    57
    Rep Power
    9
    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?
  6. #4
  7. Psycho Canadian
    Devshed Demi-God (4500 - 4999 posts)

    Join Date
    Jan 2001
    Location
    Canada
    Posts
    4,846
    Rep Power
    635
    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.
  8. #5
  9. Prisoner of the Sun

    Join Date
    Jul 2004
    Location
    The Mews At Windsor Heights
    Posts
    5,309
    Rep Power
    2350
    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.
    .
    :: My blip.fm tunes :: Web Design Feeds :: Web Dev Feeds :: CheatSheets :: PHP :: MySQL :: 13 Moon FB App.

    "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
  10. #6
  11. No Profile Picture
    Contributing User
    Devshed Regular (2000 - 2499 posts)

    Join Date
    Jul 2006
    Posts
    2,270
    Rep Power
    1736
    Originally Posted by Chucklez
    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 it went down, I tried creating my own. Lost interest and all; besides I had no resources for a test server. Anyway...

    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?
    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...

    And when it comes to the server, I am not entirely sure of the specs, but it is a dedicated server.
    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.
  12. #7
  13. Psycho Canadian
    Devshed Demi-God (4500 - 4999 posts)

    Join Date
    Jan 2001
    Location
    Canada
    Posts
    4,846
    Rep Power
    635
    Originally Posted by b3n
    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.
    Didn't know that, I learn something new everyday
  14. #8
  15. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2007
    Posts
    1
    Rep Power
    0

    Answer ?


    Originally Posted by Chucklez
    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
    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)
  16. #9
  17. <?PHP user_title("gimp"); ?>
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jan 2005
    Location
    Internet
    Posts
    7,652
    Rep Power
    6084
    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.
    Chat Server Project & Tutorial | WiFi-remote-control sailboat (building) | 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.”
    Use XXX in a comment to flag something that is bogus but works. Use FIXME to flag something that is bogus and broken. Use TODO to leave yourself reminders. Calling a program finished before all these points are checked off is lazy.
    -Partial Credit: Sun

    If I ask you to redescribe your problem, it's because when you describe issues in detail, you often get a *click* and you suddenly know the solutions.
    Ches Koblents
  18. #10
  19. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2006
    Location
    St. Louis, IL
    Posts
    57
    Rep Power
    9
    Originally Posted by gimp
    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.
    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.
  20. #11
  21. Prisoner of the Sun

    Join Date
    Jul 2004
    Location
    The Mews At Windsor Heights
    Posts
    5,309
    Rep Power
    2350
    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.
    .
    :: My blip.fm tunes :: Web Design Feeds :: Web Dev Feeds :: CheatSheets :: PHP :: MySQL :: 13 Moon FB App.

    "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

IMN logo majestic logo threadwatch logo seochat tools logo