[Plugin] Photon Cloud

Post your completed addons to share with the community

Post » Sat Dec 23, 2017 5:45 pm

@ThePhotons i would also like a little more insight into interest groups,the example capx are good and they cover about everything except interest groups

@digitalsoapbox Yea that's exactly what i meant,selecting only the players within a certain area around the player to send information too
B
40
S
28
G
60
Posts: 111
Reputation: 34,196

Post » Mon Dec 25, 2017 2:08 am

Phacanu wrote:@ThePhotons i would also like a little more insight into interest groups,the example capx are good and they cover about everything except interest groups

@digitalsoapbox Yea that's exactly what i meant,selecting only the players within a certain area around the player to send information too


Then just compare the distance of the players from the distance of the player you're checking against. Look up distance() in the C2 manual to see how it works, it's pretty straightforward.
B
99
S
55
G
27
Posts: 555
Reputation: 23,841

Post » Mon Dec 25, 2017 4:00 am

@digitalsoapbox I already created a system for that https://streamable.com/42221,in this case it's for rendering but yea it looks like it can easily be used for this too
B
40
S
28
G
60
Posts: 111
Reputation: 34,196

Post » Mon Dec 25, 2017 10:13 am

Your distance implementation is severely lacking in oversight, none of the players will see each-other and so have nothing to calculate distance with. Hence interest groups. For instance groups, you can send your location to rounding your position to the nearest like 256 multiple or seomthing , and then choosing the nearest 8 cells, looking up the cell's interest zone in a dictionary that you made by indexing all of the possible cells, putting those interest zones when you send your event.

Then comes the hard part of creating and deleting players when you enter new interest zones and leave them and looking up their player data and appearance without having everyone pop in and out of existence and making sure someone isn't out of another player'S interest zone and attempting to shoot at them offscreen but not creating any bullets or things like that
Image
B
50
S
17
G
4
Posts: 42
Reputation: 5,153

Post » Mon Dec 25, 2017 7:54 pm

eleanorawesome wrote:Your distance implementation is severely lacking in oversight, none of the players will see each-other and so have nothing to calculate distance with. Hence interest groups. For instance groups, you can send your location to rounding your position to the nearest like 256 multiple or seomthing , and then choosing the nearest 8 cells, looking up the cell's interest zone in a dictionary that you made by indexing all of the possible cells, putting those interest zones when you send your event.

Then comes the hard part of creating and deleting players when you enter new interest zones and leave them and looking up their player data and appearance without having everyone pop in and out of existence and making sure someone isn't out of another player'S interest zone and attempting to shoot at them offscreen but not creating any bullets or things like that


None of that's really necessary if the only important variable for gameplay is the distance of other players from the local player. Whether or not they can "see" each other can be handled locally.
B
99
S
55
G
27
Posts: 555
Reputation: 23,841

Post » Tue Dec 26, 2017 12:05 am

eleanorawesome wrote:Your distance implementation is severely lacking in oversight, none of the players will see each-other and so have nothing to calculate distance with. Hence interest groups. For instance groups, you can send your location to rounding your position to the nearest like 256 multiple or seomthing , and then choosing the nearest 8 cells, looking up the cell's interest zone in a dictionary that you made by indexing all of the possible cells, putting those interest zones when you send your event.

Then comes the hard part of creating and deleting players when you enter new interest zones and leave them and looking up their player data and appearance without having everyone pop in and out of existence and making sure someone isn't out of another player'S interest zone and attempting to shoot at them offscreen but not creating any bullets or things like that


None of the players would see each other if the data area is small,but if the data area is big enough to cover the players screen then expand outwards a little bit it should be fine,since the players would pop into the users interest area before appearing directly on screen,thus preventing players just popping in and out of the users active view range
B
40
S
28
G
60
Posts: 111
Reputation: 34,196

Post » Sat Dec 30, 2017 5:41 am

@ThePhotons Will we be able to get access to the self hosted variable via the eventsheet in the future? with the current set up you can only connect to one server unless you build multiple games just for a location so i dont think that'd work in full on production.
And i read that
Several client libraries have built-in "Network Traffic Stats" that should help you to answer these questions.
will that also be available for js/c2 ?
B
40
S
28
G
60
Posts: 111
Reputation: 34,196

Post » Wed Jan 03, 2018 11:24 am

digitalsoapbox wrote:
ThePhotons wrote:@Phacanu @digitalsoapbox
Another option may be dividing game field in interest areas and assigning interest group to each. Subscribe player to interest group as he enters and unsubscribe as he leaves the area ("Change groups" action). In event, specify interest group which area better matches player position.


That seems like it would be more useful for something like a board game where interest groups would be more likely to remain static than what was being asked about, which is more about selecting remote Player objects around the local Player's position. Unless I'm missing something? Does dividing the playfield by interest areas also work dynamically? I haven't spent much time w/ interest areas so any additional insight would be appreciated.

Interest groups is the way of sending data to a group of players w/o explicitly specifying players ids in event. You can group player by any parameter including position. Dynamic interest areas (with interest groups mapped to areas) is also possible of course. The question is how do you update groups subscriptions dynamically. In case of static areas, player subscribes or unsubscribes as he changes position. That way, he does not need to know other players positions.
B
9
S
2
Posts: 192
Reputation: 1,115

Post » Wed Jan 03, 2018 3:12 pm

@thephotons

Pretty cool! I haven't played w/ dynamic interest areas yet, sounds useful.
B
99
S
55
G
27
Posts: 555
Reputation: 23,841

Post » Sun Jan 07, 2018 6:49 am

Deleted the content since my problem was fixed
Last edited by Je Fawk on Mon Jan 15, 2018 10:26 pm, edited 1 time in total.
Black Bobby The Hole RPG game Greenlit with 303 votes.
B
44
S
10
G
1
Posts: 193
Reputation: 3,546

PreviousNext

Return to Completed Addons

Who is online

Users browsing this forum: No registered users and 1 guest