Most my code is in the protected section, some in private and a few function in in public, like paying the player things that have to be publlc.
Yeah, that is what i am doing when the number comes in. I just insert the number and it knows what slot on the mesh that is, like you said 2 tris faces Yeah i have all my model slots named just as i need, so the names get checked right, then we just insert what number it is and walla, its changed and done and save that dynamic instance to be reused when you hit that meshes slot to be used again. In the file i have a bunch things going on. Few timers checking besides in tick i have that controlling wheel speed and slowing it each frame by a tad and same goes with ball speed, only thing i do not have fully working yet is that actual ball shooting out. I have it stickng to the slot on the wheel when i need it to but i need to get a better ball approach so the RGN part looks good. Then when not in RGN mode i want it to be real ball physics dropping it into the what ever slot it stops at like real life. i get that done this table game will be really close to finished , Then i going to make a craps table and turn this room into a casino with table games and slots eventually. Figured start with roulette and if all went well. I would make the rest and grow the thing into a complete full on gambling game.
No.
If you do every number as a different slot then you just killed performance about as much as if you separated the meshes out.
And you might as well separate the meshes at that point.
Each material slot is a drawcall.
You can split the UV into even numbers, and assign an area to each face.
Basically making heavy use of mod and frac.
Look into any sort of uv tiling tutorial.
You have rows and columns.
Solve for the specific number you need by dividing it by the number of rows and using the remainder as the column or vice-versa.
Alternatively look at the built in sprite sheet stuff.
That could be helpful here too as it’s essentially doing the same thing?
I think that may be why you are having issues.
You have an MID for each number on the table if I understand you correctly?
Yeah, I made each number mesh in the model as its own. along with the display numbers and the outside stuff, like even, odd.
I will look into the sprite things. Yes, basically once that number has been called i make a dynamic instance for it save it off for later use so that slot on the table never needs another made unless the game stops completely. It finishes its spin then check in tick is the game started and are there players at the table, if there are we start a new session, if not it sets in tick rechecking until a player joins then the sessions starts and will continue until all players leave the table. So as long as 1 player is at the table that table will keep going and not stop.
Also notice that the array i use to save the players at the table in if i do not use this-> before it. It gets that array messed up between tables. basically anything in the constructor i made needs to have the this-> in front of it so each table knows which is whos. Other wise it gets messy real quick and weird stuff starts happening, lol
Seems like a waste of resources really. To instantiate each square.
However, is this also supposed to be network replicated?
Doesn’t change much.
If you do the material properly then the clients can receive the change from the server regardless.
Yes, it should work over the network. The tables are server controlled. I made it so when you connect or go to place a bet. it checks if you are a client or not, to run server code if needed. It is all network friendly need to go make a save account for the money you make and your name. So every time you play you can increase your money or lose it depending if you suck at it or not, Then get rid of the gun and replace it with a chip in hand and use the crosshair to help place the bet. lol
Just for anyone who might do this. When you make your model and you give your model slots names. Make sure you do not do a double underscore __ in the model and a single _ in code. That causes a bug that is so hard to find. It was crashing the game about 10 minutes into it. Took most the day before i finally found what was causing the crash. I know it is fixed now, i fell asleep with it running and woke up this morning and it was still running and spinning numbers.