EagleEye
20-04-2006 00:59:20
I am curious about how I can manage the objects of my game using the PLSM.
I want to be able to localize updates to the clients that are connected. Needless to say, I don't want chat messages being heard all across the world, nor do I want to have each and every client constantly being sent each and every world object's updated information every time something changes in the world...
It occured to me that the PLSM may have a method for finding out the current page an object is in, and maybe even the current tile... (I hope I have the terms right... the world is made up of pages, and each page is made up of tiles, right?)
If I can get the page ID and Tile ID within that page, it should be quite easy to group objects together, and use those IDs as indexes for lookups.
I could narrow it down to something like: If you're talking normally, people in your current tile can hear you... (assuming tiles are relatively small)... if you're yelling, people in surrounding tiles can hear you... that kind of thing.
Or with objects... object changes position or orientation, and all connected clients in the same tile are notified of the change. But clients in surrounding tiles are only notified of position changes, not orientation. When moving from one tile to another, the client would THEN get the new orientation information... that's just the theory I'm working on right now, but I would like to know if what I'm saying is possible.
Mainly I guess my question is: Are there methods in the PLSM to determine the current page and tile?
I want to be able to localize updates to the clients that are connected. Needless to say, I don't want chat messages being heard all across the world, nor do I want to have each and every client constantly being sent each and every world object's updated information every time something changes in the world...
It occured to me that the PLSM may have a method for finding out the current page an object is in, and maybe even the current tile... (I hope I have the terms right... the world is made up of pages, and each page is made up of tiles, right?)
If I can get the page ID and Tile ID within that page, it should be quite easy to group objects together, and use those IDs as indexes for lookups.
I could narrow it down to something like: If you're talking normally, people in your current tile can hear you... (assuming tiles are relatively small)... if you're yelling, people in surrounding tiles can hear you... that kind of thing.
Or with objects... object changes position or orientation, and all connected clients in the same tile are notified of the change. But clients in surrounding tiles are only notified of position changes, not orientation. When moving from one tile to another, the client would THEN get the new orientation information... that's just the theory I'm working on right now, but I would like to know if what I'm saying is possible.
Mainly I guess my question is: Are there methods in the PLSM to determine the current page and tile?