Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.

Architecture advices for a multi-player game with LCCS

Avatar

Level 1

Hello everyone,

I've been looking at LCCS for a while now and got a project that i can use it with. I've been watching the videos, looking at the examples sources and I'm still wondering what could be the best "architecture" for my application. When I say architecture, i'm talking about the CollectionNodes, SharedCollection and stuff, I can handle the Flex code with no problem.

Here is the situation:

- I have N users in a "main" room, let's call it the waiting room.

- Each user need to have some properties attached to it, nor just a displayName. Let's say a UserProfile object, with like a lat / lng coordinates or a score.

- Any user can look at another user's UserProfile and start a "fight" with him. It's only 1v1.

- Once the user on the other side accepted the fight, they would be in a separate place where the fight can take place.

- The fight is essentially a turn by turn match, so i can use a Baton / BatonProperty to handle which user needs to play.

- I need to store basic informations about the match, health / damage levels for instance.

- Once they are in a fight, both users are out of the waiting room.

Things that would be cool:

- If i could write 0 server side code, that would be better. I've seen some examples that create a room on the fly, using the PHP server-to-server API. This room would be separate from the waiting room surely cause it is easier to manage but I don't really want to have to deal with that.

- In the ManagingGroups LCCS example, groups are formed by the admin (registering a node) and then, the group is registered in a StreamManager instance. I didn't really understand that part, I thought StreamManager was for A/V

Can experienced LCCS users can give me a word of advice please? I can handle the code creation, it's just that I would like to know what's the best way to go.

Thanks a lot !

Fabien

3 Replies

Avatar

Level 1

After digging a little more in the examples, I found out that I can use userManager custom fields to store my "UserProfile". Will be a lot easier already.

Now the big question is :

How do you group 2 opponents together so that they can have their fight without having too much stuff in the main waiting room. If anyone can give me a little help

Thanks,

Fabien

Avatar

Employee

For the second part, You might have to use server side LCCS scripts to create rooms on the fly and push your players to the new room.

There are features to create rooms based on a template's and delete the room once the game is over. Explore our sample apps for more information and code samples.

Thanks

Arun

Avatar

Level 1

Hello Arun and thanks for your answer. I'm currently in the process of doing what you suggest, seems like the cleanest way to do.

Thanks for your help !

Fabien