An issue I was having was that as the update method for each table is run at 60 Updates per second, the actions taken when the mouse is clicked were also happening 60 times. To avoid this I added a clickLock, which disables a table from being clicked again for a second. The update method then decreases the lock each cycle until it hits zero.
if(Mouse.getButton() == 1 && clickLock <= 0){
if(Mouse.getX() + Screen.getxOffset() >= x
&& Mouse.getX() + Screen.getxOffset() < x + sprite.SIZE
&& Mouse.getY() + Screen.getyOffset() >= y
&& Mouse.getY() + Screen.getyOffset() < y + sprite.SIZE){
timer += 300;
clickLock += 60;
}
}
This snippet is my way of debug adding a state change to the table that is clicked. At the moment the tables update based on an increment per update and switched based on time passed in this manner. In future the tables cycle will update state based on the time and the personal preferences of the guests.
Each guest will be created with a set of randomly generated times such as how long it takes them to make an order, to eat and any "sitting and chilling" time after the service ends. These numbers will create some variation between tables as they will not all sit and end in a predictable pattern. If your group consists of two guests and one takes longer to order, they will both have to wait for an order to be placed. If you have a table of four people and they all decide quickly, the amount of time before an order can be made could be much shorter. In many games based on "cafe" or "restaurant" settings, the guests are very copy paste and fall into guest "types". I would rather have a guest be defined by their own set of preferences and also variables such as cash on hand and time available. A guest who is trying to get a quick bite should be seen to be ordering, eating and leaving quicker than a guest who is in for a social meal.
My noteboook, ideas on UI and button themes |
Keeping this information in the lower left will keep it away from the main action in center screen but not out of the way enough to be a hindrance to glance at. Keeping status related, non-interactive information at the base of the screen should be natural for many users, while any modifiable or quick changing status on the upper portion of the screen.
The right side of the page was a few ideas I had about button types(management, lists, menu edits etc), while the next doodle was an idea I had about using Aura Buttons such as in World of Warcraft and other RPG games to switch between styles of play. For example a moving around mode, an inspection and statistics mode or simply a way to switch between controls relating to staff, management and logistics. This may add a way to switch input without having to find and select certain actor types, and instead control the game as a whole. An example of this could be that in "waiter" mode, you are able to click on flagged tables and service stations to prompt a staff member to act sooner on that task, while in management mode you are able to dish out morale or efficiency buffs to staff and boost the happiness of a group of guests with some fun product knowledge.
No comments:
Post a Comment