A Flash Developer Resource Site

Results 1 to 9 of 9

Thread: Opinion - Online Game

  1. #1
    An FKer
    Join Date
    Sep 2005
    Location
    Ontario
    Posts
    1,167

    Opinion - Online Game

    Hi everyone,

    No, I'm not making an online RPG or some other huge project that is most likely to fail early on. I'm am making a simple board game that, when completed, would like to have my friend connect to through the internet.

    The game is 90% complete and works with multiple players, if played on the same computer. Since that's not very fun, I need opinions on how to run this game online:

    Is Smartfox Server the best and only option, or are there other ways to make Flash applications connect online? For someone who has never made an online game (Obviously), is something like a simple turn based board game simple as opposed to live action gameplay?

    Thanks!

  2. #2
    Senior Member UnknownGuy's Avatar
    Join Date
    Jul 2003
    Location
    Canada
    Posts
    1,361
    There are more options then just Smartfox.

    There is Electroserver:
    http://www.electro-server.com/overview.aspx
    and its Wiki:
    http://www.es-wiki.com/index.php?title=Main_Page

    And there is Colin Moock's Union server: http://www.unionplatform.com/?page_id=331

    I have worked with/for Electroserver/Electrotank, and actually wrote a chunk of the Wiki, so I am biased in saying I liked it, though I don't really have experience with the other server technology.

    UG

  3. #3
    Member
    Join Date
    Sep 2009
    Location
    UK
    Posts
    40
    Hi Osteel

    Yes, as you already figured a turn based board game will be considerably easier to develop (especially as a first multiplayer project) than a real time game.

    I don't have much experience with Electroserver, other than reading Joke Makar's first book and messing about with some of the tutorials in that. That was back in Flash MX days so quite a few years ago now, and I'm sure it's come on leaps and bounds.

    Smartfox on the other hand I have more recent experience with. I did a large project last year for a university who were using it as a teaching tool in one of their departments. It's quite powerful once you get your head around it but I found the lack of AS3 documentation to be a real hassle.

    Things might have improved (I'm sure they have) in the past 12 months, but I ended up using the AS2 docs as a basis and then figuring how to apply that in AS3 using what AS3 docs were available - project took me a lot longer than expected because of that, but the end result was very good and the client were really pleased with it so I would have no trouble in recommending it, just check out the AS3 docs first and make sure they have been brought up to date!

    Billy
    Flash game tutorials and articles at www.FlashGamesClassroom.com
    Viral Flash Games : Editable, rebrandable Flash games with FLA source files. Use them on your own sites, rebrand and sell to your clients, or use as learning tools!

  4. #4
    An FKer
    Join Date
    Sep 2005
    Location
    Ontario
    Posts
    1,167
    Thanks guys!

    I guess I should have mentioned that I'm programming AS2. I've been using it for years, and since this is a small project I just want to complete with for my friends, I'd rather not hassle myself with learning how to do it in AS3.

    But I'll get around to learning AS3 eventually. I already know all about OOP, so that should give me a good headstart.


    As for Smartfoxserver, I tried running it and it gives me some error about Java not being an executable file or batch file or something along those lines. Not sure what's wrong with that.

    In the meantime, I'll definitely check out that Electroserver.

  5. #5
    Senior Member
    Join Date
    Feb 2004
    Posts
    312
    Well since this project seems fairly simple and real time interaction is not the primary concern, you might want to look into simple php server polling.
    Just another suggestion

  6. #6
    Senior Member bluemagica's Avatar
    Join Date
    Jun 2008
    Posts
    766
    I would also suggest polling....since this is simple enough, and with polling it will be faster and easier to make at the moment!
    If you like me, add me to your friends list .

    PS: looking for spriters and graphics artists for a RPG and an Arcade fighting project. If you can help out, please pm me!

    My Arcade My Blog

    Add me on twitter:

  7. #7
    An FKer
    Join Date
    Sep 2005
    Location
    Ontario
    Posts
    1,167
    Sorry, but what do you mean by polling? (Sorry!)

  8. #8
    Senior Member bluemagica's Avatar
    Join Date
    Jun 2008
    Posts
    766
    write the data on your server using php (probably in a mysql database or a text file if you want) from both of your game instances, and then read it back. There are many tutorials out their on how to write a value to your database using php, so its really easy.

    basically, when your game starts, contact your server using php , write some "id" in your database to recognise yourself and your opponent. When you want to play with someone, just go through the ids registered there at the moment and pick one(kind of like a lobby), and get a time from your server, this is needed to synchronise the approx time between your clients. Next it's just checking the server every 10 secs or so and write the values like whose turn it is, what move they made during their turn, e.t.c.....and also read back this data from your opponent, to update your instance of the game.
    This technique is used in a lot of chat programs you see out there. Just keep in mind, that you should try to keep your server checks to the minimum you can, cause the faster your game repeats it's server checks, the faster your bandwidth will deplete. Oh and don't forget to read the timestamp from the server cause you need to keep your clients synchronised.
    If you like me, add me to your friends list .

    PS: looking for spriters and graphics artists for a RPG and an Arcade fighting project. If you can help out, please pm me!

    My Arcade My Blog

    Add me on twitter:

  9. #9
    An FKer
    Join Date
    Sep 2005
    Location
    Ontario
    Posts
    1,167
    OH!

    Ironically I JUST thought to do that last night and have been making a simple chat program to use in my board game. Haha.Niiice.

    I've run into some issues about messages repeating themselves, which I assume has to do with the fact that each person is not synched in time. But I've thought up and idea to get around it.

    I'll try it when I get home.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center