realbasic-games
[Top] [All Lists]

Re: player location

To: REALbasic Games <realbasic-games at lists dot realsoftware dot com>
Subject: Re: player location
From: Phil Mobley <phil at mobleybros dot com>
Date: Mon, 20 Dec 2004 15:43:11 -0800
Delivered-to: realbasic-games at lists dot realsoftware dot com
References: <EC01FF7D-52CC-11D9-8025-000A95688BEA at neuropop dot com> <1A0B8996-52D6-11D9-BAF9-000A95DB6C90 at fireyesoftware dot com> <8DBB2E59-52CE-11D9-8025-000A95688BEA at neuropop dot com>
On Dec 20, 2004, at 1:31 PM, LMSpam at neuropop dot com wrote:

I was sort of thinking along that line... now, I'm leaning toward a "World Name" approach. So each world ("Punk World", "Rock World", "Tekno World", "Britney World", etc) would report everybody to everybody else within it. Then the X,Z problem is sort of solved (since it's simply ignored), and leaves me expansion capabilities for my soon-to-be bazillion users...

As an extension to what Asher said, I would do it like this for a 2D, 2.5D or third-person 3D game:

Divide the user's visible game area into 9 zones for a 3x3 grid. The size of one grid space is your game zone. For a 1024x768 visible game area, this would mean that a single zone would be approximately 341x256 pixels. A character would be located in a single zone. Of course, multiple characters can be in the same zone.

If the user's character is always displayed in your game at the center of their screen, then he would always be in the center zone.

As a character travels from one zone to another, the maximum visible zones can increase up to a 4x4 grid, but of course the edge zones will only be partly displayed. So for your user's computer to be aware of characters off the edge of the screen, it needs to be aware of a 5x5 grid: -2, -1, 0, +1, +2 for both rows and columns from the player's current zone.

You can adjust this as you feel it is necessary... you can have the visible area as a 5x5 grid and extend the awareness to -4 and +4 for a total of a 9x9 grid. It just depends on what your game is like.

First person shooters are different, but similar concepts can apply.

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

<Prev in Thread] Current Thread [Next in Thread>