What's new
Roleplay UK

Join the UK's biggest roleplay community on FiveM and experience endless new roleplay opportunities!

Putting An NPC in the Casino

Rees

Member
Location
UK
Brief Summary:

Similar to what there is at the Mines and Trucking having an NPC to explain things

Detailed Suggestion:

There's some bugs that occur at the casino such as a visual glitch that tells you a different number to what you actually have and one where you place your chips down at the last few seconds where it takes the chips but does not give you the cards to participate in the round. By implementing an NPC that could give hints of this it will help confusion for all players on what not to do and what to go with in these situations. I fell for the first of these myself and by having someone/thing to tell me what to go with it it can help cut down unneccessary compensation requests whilst the devs look for a fix if there even is one. Also can let people know of other things such as the difference between the tokens and the difference of the tables.

The Pros:

Helps both players and staff in making sure people do not lose money due to a glitch less often

The Cons:

None 

Does this suggestion change balance on the server ?

No

 
Is the visual glitch on the table the only bug your experincing?

 
@Mike Polo theres one that I haven't experienced where people will place chips down too late and it takes there chips and gives them no cards and then some tables bug out sometimes where youll get no ui and it has to reach the end of the betting time even when everyone has placed there bets

 
Both these bugs are on my to-do list of fixes, and they are both royal pains in the ass.

The first one - the 'out-of-sync cards' only seems to happen on the very first time you play a hand on a new table, I think, and is something to do with the setup of the game whilst others are in progress. Because it only seems to happen rarely, and at the beginning of a session (or possibly when changing table), it's proving really hard to locate the fault. Eventually, I will - but it is several thousand lines of code to wade through, most of it asynchronous, and running in multiple threads (whilst there is only one 'core game loop' it runs once for every table, for every hand, for every player, so it is very much a set of loops inside loops inside loops. Right pig to find edge-cases like this.

The other one is a timing issue - the dealer (who is the server's puppet, but who appears to you as a 'shadow' running on each individual player client, and thus may be a few milliseconds out of sync with what the server is doing) effectively acts as the controller of the game, but really it's the server itself that directs everything. The server decides there are X seconds to wait for everyone around the table to place a bet, and is supposed to not accept bets after that time - but the problem is, your client can have a slightly different perception of that time, especially if your client is a bit slow/substandard PC, etc. We try to minimise the back-and-forth 'conversations' between client and server to the minimum needed to securely accept a bet, rather than ping-ponging every single animation/HUD change (in order to avoid lagging/desyncing the server when every table is fully loaded). As a result this means that if a bet is placed milliseconds before your clock reaches zero, your client says "timer is ok, server please take the money" and the server duly does that. But the server has already at this point decided 'bets are closed', in a separate thread, and begins dealing - and of course, you are already 'out of the game' at that point, and don't get any cards, or a chance to hit/stand. I will eventually work out at what precise point to tie in the 'bet-taking' thread with the 'checking the **server's** perception of time, vs the client's perception, and add some kind of 'belt and braces' lock to ensure we never take cash from a last nano-second bet. But, as always, if only it was that simple. Every time I look at that network of code, I lose several days of my life and nearly die of cringe. 😄

TBH, though, these solutions are better than adding an NPC whose only job would be to explain what things are broken, really. NPCs aren't meant to be there to tell you what stuff is borked; they're supposed to be there to explain working items, or things that need clues in order to operate **properly**. These points are bugs... and so they will (eventually) need to get squelched. So when I can, I will! But no ETA... lots of plates spinning atm.

 
Back
Top