Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. RealTime browser games

RealTime browser games

Scheduled Pinned Locked Moved ASP.NET
questiondatabasegame-devsysadmindata-structures
3 Posts 3 Posters 2 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Offline
    I Offline
    il_manti
    wrote on last edited by
    #1

    Hey all, Me and a couple of friends are developing a browser game similar to Travian (as in, jobs are tackled in real-time not turn-based). Now, we have been trying to see what's the best way to do this real-time thing online where the user can logout and whatever is queued will still be executed once the time passes. The only way to solve this that we thought of is to: - have a table with logs as to what is queued and what event to fire when the time ends - every second have some software running on the server which will check if any logs have expired and execute their event then delete from the queue The problem with this is that we need to have some software hitting the database every second, which doesn't make much sense. What do you all think? Is there a different way of doing this which we're not seeing?!?! Thanks a lot

    In life truth does not matter. What really matters is what others believe to be the truth. (The Up and Comer - Book)

    P M 2 Replies Last reply
    0
    • I il_manti

      Hey all, Me and a couple of friends are developing a browser game similar to Travian (as in, jobs are tackled in real-time not turn-based). Now, we have been trying to see what's the best way to do this real-time thing online where the user can logout and whatever is queued will still be executed once the time passes. The only way to solve this that we thought of is to: - have a table with logs as to what is queued and what event to fire when the time ends - every second have some software running on the server which will check if any logs have expired and execute their event then delete from the queue The problem with this is that we need to have some software hitting the database every second, which doesn't make much sense. What do you all think? Is there a different way of doing this which we're not seeing?!?! Thanks a lot

      In life truth does not matter. What really matters is what others believe to be the truth. (The Up and Comer - Book)

      P Offline
      P Offline
      Paddy Boyd
      wrote on last edited by
      #2

      I'm a bit sleepy after lunch, but... Could you not just hold a log of what a user has queued, and when they hit the server execute everything that they have queued that would have happened up to that point? Providing that they're not interacting with others while they're offline...

      1 Reply Last reply
      0
      • I il_manti

        Hey all, Me and a couple of friends are developing a browser game similar to Travian (as in, jobs are tackled in real-time not turn-based). Now, we have been trying to see what's the best way to do this real-time thing online where the user can logout and whatever is queued will still be executed once the time passes. The only way to solve this that we thought of is to: - have a table with logs as to what is queued and what event to fire when the time ends - every second have some software running on the server which will check if any logs have expired and execute their event then delete from the queue The problem with this is that we need to have some software hitting the database every second, which doesn't make much sense. What do you all think? Is there a different way of doing this which we're not seeing?!?! Thanks a lot

        In life truth does not matter. What really matters is what others believe to be the truth. (The Up and Comer - Book)

        M Offline
        M Offline
        Matt Cavanagh
        wrote on last edited by
        #3

        What I would maybe do(hence, is probably wrong :-/ ), is execute all the jobs at the same time with threads and let them battle it out. Or maybe im totally misunderstanding

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups