Handheld <-> Home Console?

Discussion in 'Game Development General Discussion' started by Piglet, Jul 26, 2008.

  1. Piglet

    Piglet Spirited Member

    Joined:
    May 28, 2008
    Messages:
    175
    Likes Received:
    0
    I am looking into a multiplayer game for GBA,DS & Wii. Now, the problem as I see it is that in Japan & N.America, TVs run at 60Hz (so do the hand-helds) but in Europe they run at 50Hz. How the devil do you get multiplayert between them? I mean, most modern TVs will accept a sync from the box so yes, they will swap to 60Hz, but is this implicit in the design of the Wii?

    Ta,
    P-)
     
  2. Calpis

    Calpis Champion of the Forum

    Joined:
    Mar 13, 2004
    Messages:
    5,906
    Likes Received:
    21
    It would make the most sense for online play to be arbitrated in software, and for competitive games in a way thats fair for any region. As long as the game speed is the same (which should happen in any localization) regardless of the actual frame rate, the games can be synchronized. I don't get why you're getting into actual TVs, do you mean when you play with someone in NTSC land your TV switches to 60Hz?
     
    Last edited: Jul 26, 2008
  3. mairsil

    mairsil Officer at Arms

    Joined:
    Apr 20, 2005
    Messages:
    3,425
    Likes Received:
    153
    Exactly, you do not necessarily need to be running your update (physics, AI, input, etc.) routines at the same rate as your draw functions.
     
  4. Piglet

    Piglet Spirited Member

    Joined:
    May 28, 2008
    Messages:
    175
    Likes Received:
    0
    While I agree with your logic, i you have a game running in 1 frame (50Hz Wii, 60Hz DS) then the DS is going to drop 1 frame in 6. I cannot help but think that somewhere the Wii documents will have a solution.
    Also, coding for different frame-rates is a total pain in the ass. I have done it before, but boy, the trouble I had. I've not actually seen a DS<->Wii game playing. I suspect that seeing it in action would tell me a lot...
     
  5. mairsil

    mairsil Officer at Arms

    Joined:
    Apr 20, 2005
    Messages:
    3,425
    Likes Received:
    153
    I haven't had the chance to program on the DS or Wii, so I cannot account for how they handle locked timesteps. However, if you code towards an unlocked timestep using variable elapsed time intervals instead of using a fixed timestep, then it wouldn't matter what your screen refresh rate is. Sure, it requires a little bit more time interval tracking for physics and AI calculations, but it is certainly common. Just think about having to deal with multiple refresh rates on the PC (60, 72, 120, etc). As far as synching between platforms, if you use a bit of speculation/prediction, you can get away with network updates at a longer interval, such as on even second intervals.
     
  6. smf

    smf mamedev

    Joined:
    Apr 14, 2005
    Messages:
    1,255
    Likes Received:
    88
    Alot of network games don't allow people running in pal & ntsc to play against each other. If you try then it will probably look jerky.
     
  7. alphagamer

    alphagamer What is this? *BRRZZ*.. Ouch!

    Joined:
    Jun 25, 2008
    Messages:
    3,255
    Likes Received:
    10
    pal & ntsc tv standards do not apply to DS and PSP iirc.

    they are all the same in every region.
     
  8. andoba

    andoba Site Supporter 2014

    Joined:
    Sep 13, 2006
    Messages:
    1,256
    Likes Received:
    4
    PAL TV's run at 50 Hz but you can of course run them at 60 Hz. For example, in Dreamcast games, if you wanted to play against Japanese or American players you had to play at 60 Hz, if your TV didn't handle it you we're forced to play against PAL dudes.
     
  9. mooseblaster

    mooseblaster Bleep. Site Supporter 2012, 2014

    Joined:
    Aug 27, 2006
    Messages:
    1,568
    Likes Received:
    4
    Quite a games now in PAL-land ask for 60Hz only (no option of running in 50Hz), so I think you could get away with it.
     
  10. Piglet

    Piglet Spirited Member

    Joined:
    May 28, 2008
    Messages:
    175
    Likes Received:
    0
    I'm thinking that these days, there will be only a tiny number of PAL tv's that won't take an external Vsync.
    Updating the logic for a 2D, 60Hz game won't really work since what was being displayed by each screen wouldn't be the same. 3D, not-in-a-frame games certainly do that.
    Of course, even IF your supposedly running at the same speed, hand-held machines use a clock. Clocks are not accurate so each machine runs at a slightly different speed. The way I got around this on the GBA was to wait for the slowest machine. It did drop the occasional frame, but not so much that it was noticable...
     
  11. smf

    smf mamedev

    Joined:
    Apr 14, 2005
    Messages:
    1,255
    Likes Received:
    88
    All tv's take an external vsync, otherwise they don't know when the frame starts and ends. However old tv's couldn't cope with the interval between the vsync from being different to your local tv standard.
     
  12. mooseblaster

    mooseblaster Bleep. Site Supporter 2012, 2014

    Joined:
    Aug 27, 2006
    Messages:
    1,568
    Likes Received:
    4
    An old TV being 15+ years I'd assume, as all the TVs I've encountered including my cheap Sanyo one from around 10 years ago are happy showing 60Hz stuff. NTSC... now that's a different question.
     
  13. Piglet

    Piglet Spirited Member

    Joined:
    May 28, 2008
    Messages:
    175
    Likes Received:
    0
    I don't think that 60Hz automatically means NTSC. One is a refresh rate, the other an encoding technique. Old OLD really OOOLLLD TVs use the mains AC value to refresh the screen (I assume there must have been some kind of stabalisation since it's rarely exactly 50/60Hz). I think most things in the last 20 years take the sync from the input so it SHOULD be OK.... hope so in any case.

    As I said before, how do you sync an 'in a frame' 2D action game between 50 & 60Hz. I mean, you cannot do the refresh & display logic seperatly like you can in 3D...
     
  14. mairsil

    mairsil Officer at Arms

    Joined:
    Apr 20, 2005
    Messages:
    3,425
    Likes Received:
    153
    Vertical hold setting?

    Well, run everything at 300Hz and you'll be fine. :lol:

    Honestly, I still do not see a gamebreaking problem here. So what if your logic is running at two different speeds as long as the algorithms allow for a flexible timestep. Hell, you don't even have to have a full variable time step if you want to go through and code two sets of "update" variables for your physics, AI, etc. The only (simplified) real concern with multiplayer games is syncing up the data, and that you can do on "matching" boundries, say every 5/6 frames (50/60 Hz respectively).
     
  15. Piglet

    Piglet Spirited Member

    Joined:
    May 28, 2008
    Messages:
    175
    Likes Received:
    0
    :nod: 300Hz it is :dance:
     
sonicdude10
Draft saved Draft deleted
Insert every image as a...
  1.  0%

Share This Page