Here's some food for thought:
Can you even get a "true" blackjack game online?
The reason I ask is that even though the slots "casinos" here in PA offer electronic blackjack, it's not as if you're getting a true blackjack game with the appropriate expected HA, depending on the decks/rules of the game. They are setup to pay out just the same as regular slot machine, with about the same payout %....and we're talking about 90-91% as apposed to the 98+% you'd expect from a "real" blackjack game..It'd be interesting to see the overall payout report for not only 3dice's blackjack, but for other software, as well. For online casinos to group all table games in together and publish an overall payout % is just....well, you decide. I'd love for online casinos to break it down to each individual table game...
Obviously you can only ever have an electronic approximation of a real World system but here is the deal so to speak.
All game returns should have there return dictated by the paytable and nothing else.
For as closer game of real World Blackjack as possible we should have a virtual deck rather than the RNG just returning a number that represents a particular card, this is lazy and bad programming but it may well exist in some software just as weighting of slot reels exists.
If I were programming a game of Single deck Blackjack I would create a virtual deck that is virtually shuffled to try and best replicate real World Blackjack.
I will show how that is done in very simple terms because if I were to explain everything fully I would need to write code give a crash course in programming and give lengthy explanations beside each piece of code.
First I need to create a deck of 52 cards.
You could do this by simply having a variable "deck"(52) that contained all 52 possible values of a deck of cards.
(let's not worry about about Aces 1 or 11 or how to differentiate between J or Q and suits it is not relevant to this)
So I decide
deck(1)=1 (ace), deck(2)=2, deck(3)=3, deck(4)=4, deck(5)=5, deck(6)=6, deck(7)=7, deck(8)=8, deck(9)=9, deck(10)=10, deck(11)=10, deck(12)=10, deck(13)=10 *note 11 is Jack, 12 is Q, 13 is K but all value 10 in BJ.
*New suit
deck(14)=1 (ace), deck(15)=2, deck(16)=3, deck(17)=4, deck(18)=5, deck(19)=6,deck(20)=7, deck(21)=8, deck(22)=9, deck(23)=10, deck(24)=10, deck(25)=10, deck(26)=10
and so on until all 52 values have been assigned to our variable named "deck"
Now from here, as I explained, you could just have your RNG generate a number from 1 to 52 to deal a card but this is not very satisfactory.
I want to have a virtual deck that is shuffled so what I need to do is move the values in "deck" around.
To do this I can get Two random numbers from my RNG from 1 to 52 and swap the corresponding values in my deck.
So for example my RNG generates 6 and 23 so we take the value deck(6)=6 and place it into the value deck(23) so that deck(23) now =6 and not 10 but also deck(6) will now hold deck(23) old value of 10.
We have now shuffled 2 cards in our deck.
This process can be repeated many Thousands of times a second so a good shuffle can be easily achieved.
We then deal from the top of our virtual deck.
This system will give a closer approximation of real World Blackjack and is even a good way to make better use of a pseudo RNG because you should also randomize how long the deck is shuffled for.
For Two decks we would simply extend our variable range to deck(104)
Hope that gives some basic insight into how a fair online game of Blackjack may work.