提供游戏室帮助 [英] making game rooms help

查看:43
本文介绍了提供游戏室帮助的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如何为自己拥有的游戏腾出空间
只有一个用户可以进入游戏,而他在游戏中
没有人可以进入吗?
thx:D

How is it possible to make rooms for a game i own so
only one user can enter the game and while he is on it
nobody can enter?
thx :D

推荐答案

首先,我认为这只是微不足道的,但后来我开始思考您的想法.因此,我设想了以下两种情况可以满足您的需求:

1.您真的想要一个解决方案,其中只有一个用户可以登录并使用游戏"

解决方案:根据您的要求,将游戏室的状态(使用与否以及由谁使用)存储在文件,会话或数据库中,并且在占用游戏室时,禁止其他所有用户登录.

2.您需要一个解决方案,使许多用户可以玩游戏室,但不能在该游戏室中进行交互.

解决方案:您需要跟踪哪个用户当前正在哪个游戏室中玩,并防止他们互动

您的问题确实很广泛,因此很难找到一个好的解决方案.将用户锁定在特定情况下并不难,但是您确实设置了您的要求.

对不起,我不像平常那​​样连贯,简洁,但我快要被解雇了,即使按照我自己的标准,也已经吸收了很多东西.

干杯!

-MRB
First I thought this was just to trivial, but then I got to thinking what you are really on about. So here are two scenarios I envision which might accommodate to your requirements:

1. You really want a solution where only one user can logon and use a "game"

Solution: Depending on your requirements store the state of the game room (used or not and by whom) in a file, the session or a database and while the room is occupated keep all others from logging in.

2. You want a solution where many users can play a game room, but they can''t interact in that room.

Solution: You''ll need to keep track of which user is currently playing in which game-room and keep them from interacting

Your question is really broad, so it''s kind of hard to find a good solution. Keeping users locked out from a certain scenario is not that hard, but you really have youre requirements set up.

Excuse me for not being as coherent and concise as I usually am, but I''m close to hitting the sack and have already imbibed quite a quantity, even at my own standards.

Cheers!

-MRB


感谢您的答复,
我正在尝试使其与会话,应用程序一起使用
thank you for the long answer,
i am trying to make it work with sessions, applications


这篇关于提供游戏室帮助的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆