Show HN: Classic Video Poker

2 years ago (lfgslots.com)

I'm a Unity 3D refugee, certified expert, started in 2005 when it was a two man-band with Joachim and David.

I've been lucky enough to make a good living out of Unity with my own consultancy over the years making data visualisation applications (Wind Energy) and innovation projects (Visualising accounting data for Wolters Kluwer etc.).

Godot is pretty amazing in my opinion. Wrote this game over a few days and was productive in Godot basically instantly. I couldn't get up and running in Unreal despite trying a few times.

It's my ambition to start a niche agency developing 80's style games of skill and chance for the corporate world.

So... If anyone has any leads for making Space Invaders for Nike - please help! Happy to pay 5% on whatever work I get.

The visuals are perfect, looks very much like a CRT...nicely done.

I think I found a bug though...pair of Aces doesn't pay as "Jacks or Better": https://imgur.com/a/78B3oPV

  • Indeed, I encountered the same. Rock solid otherwise, so far!

    Something at the end (bankruptcy) besides just locking up (other than the mute button) would be a nice touch.

  • Aces are the low card in the game. You are not the first person to say this! I need to look at the math again to make them high cards...

    However in my opinion (at risk of getting everyones ire) - I think the ace is the "1" card.

    • Ace needs to act like 14 for Jacks or higher purposes, and both 1 and 14 for straights.

      Very cool and nostalgic app. I remember playing this for hours on my great-uncle's little pocket game.

    • ... That's not how poker works though. I haven't had the luck to reproduce it, but is 10-J-Q-K-A also not recognized as a straight?

    • So if aces are considered "1", how do you think a Royal Flush works? It wraps back around to 1?

    • After it's fixed you can add an option for "around the corner" straights, which count an ace both ways and wrap. For example: Q-K-A-2-3

    • > However in my opinion (at risk of getting everyones ire) - I think the ace is the "1" card.

      Except that poker is an established game with clear rules where the ace is the highest card?

  • I imagine it would be disorienting to actually play this on a CRT.

  • Honestly, I've never seen a CRT fisheye as bad as someone aping the aesthetic.

    I also have a similar rant about VHS video filters.

I think it found an infinity money gltich. I held a 2 of hearts and a 3 of clubs on the far left and far right and it glitched out and did not give me 3 cards. Instead it gave me 3 black boxes, a royal flush and says I won "$"aHROcHM6Ly".... Now my cash keeps counting up, it is at over $2,000 now.

I feel the same. I've worked with Unity for quite some time (though gladly don't anymore), but always had trouble trying to learn Unreal. Recently I tried godot and I found it quite easy to get started!

I love the game. Had a lot of fun playing for some time. but just one question, shouldn't pair of A be considered "higher than jacks"? Because it looks like it's not: https://imgur.com/a/ov2UP1D

Ended on a hand of: K J A A Q and did not receive the Jacks or Better $1 payout. According to a brief search about the rules of video poker, a pair of aces is considered better than a pair of jacks.

Awesome.

I remember when everybody played basically this exact machine in middle school when we used to sneak to the market during recess. There used to be all kinds of different varieties of slot machines at basically every market and gas station in Finland, regulated by a sanctioned monopoly called RAY. Nobody really cared if you played one at whatever age, especially in the 90's. Wild times.

  • People cared even less on cruise ships. Those were mainly using paf machines though, probably for legal reasons. Search "paf joker poker" for images of the classic machine. Nice features was the joker and double or nothing.

    I played this kind of games a lot since I was 7 years old because we used to travel a lot. One time I made a win sharing deal with my brother to reduce risk of an unlucky streak, but I immediately hit the jackpot after that. Good times.

This is more a question of curiosity than one of judgment: why does it take so long to load? I guess I expected it to be very fast because of the relative simplicity. Forgive me, I know nothing about Godot or Unity. This is still very cool.

This is fun, but the game doesn't seem to accept that a pair of aces is a winning result. Aces specifically, other face cards work as intended.

Lovely game and art style, and the idea of 80s style games is great!

I would throw in my two cents with the following idea: I would love a modern, well made collection of classical games such as the one linked, available on many platforms, with cloud saves, even to the point of which game was picked. I would love to decompress by playing Solitaire for 5 mins in my lunch break on my iPhone, come home, open the computer and finish the game up on the big screen and enjoy the cards jumping all over the place.

I really like Godot so far but the debugging tools are massively inferior to any other IDE and language I've ever used. I waste so much time trying to track down bugs. Proper variable inspection would be a life saver, for instance.

  • And this is the magic of open source and the current situation. There will be many like you and a few with the dedication and skills to make that happen for the benefit of us all.

    The Unity move was VERY silly considering the state of Godot and Unreal.

    Literally treating your entire user base like that.

    I spent $400 for the Pro license when I was a poor Uni student back in '09 and it didn't translate to the newer versions - I just cut my losses and never looked back.

    • Unity is an advertising company that also has a game engine hobbyists use - I don't think what they did was necessarily a bad financial move, they just shafted the part of their userbase that doesn't generate much money and then wound it back when they realized it was really bad PR.

    • > There will be few people with the dedication to benefit us all > The Unity move was VERY silly considering the state of Godot and Unreal

      In my opinion, opposite, Unity just pulled its oligopoly strings. It wasnt bad management or desperate business choices; they knew the state of the industry.

      1 reply →

  • I have no clue about game development, apologies for the basic question. When does one use Unreal and when does one use Godot? Or does it not matter?

    • I'd summarize it as: The Unreal Engine, especially in the 3D realm, gives you a far higher ceiling of possibilities, but it requires a lot more work and effort to use it. Godot, Unity, GameMaker, RPG Maker, RenPy and many more limit your options, but also need less work to get something going.

      If you have 1-10 people trying to make something cool, you'd never reach for the Unreal Engine because it is just so much stuff to lift and juggle. If you're a large AAA studio looking to make Fallout 5 though... Godot might end up a bit limiting.

      1 reply →

AH, memories. Card faces are from real machine - Novomatic American Poker 2 - back in time did lot of hacks on this platform. Even wrote a emulator in x86 assembly to speedup the development.

This Godot game is quite good to recreate the atmosphere of the ancient video poker machine. Lacks only cards autohold and sound could be a bit more polished, but these are minor things that could be easily improved.

  • Thank you! Yes, I wondered about auto-hold but in the end decided that it was a bit more engaging and fun not to do that...

It's remarkable how divisive CRT shaders are. Some love them, some hate them, very little middle ground.

  • depends on your year of birth maybe ? Mine allows me to appreciate them much!

    • I also grew to associate scanlines with sci-fi, which I love. I remember loving the original Ubuntu boot splash logo which had the line effect. And then was disappointed when it was changed to smooth and crisp.

  • They give me PTSD flashbacks to my parents' awful old TV, which they got in the mid 80's and didn't replace with a modern flat screen until ~5 years ago.

There are alternatives to Godot, in particular I'll mention ZimJS https://zimjs.com/about.html#features

Like you, I recently created an online casino game, Cheat at Blackjack https://play.cheatatbj.com/

and used ZimJS for all of the animation. I considered Godot but found it simpler to do everything in client-side JS.

Zim's web site is definitely a bit "out there" but the animation features are quite good and it allowed me, a terrible artist, to program my game quickly and add a lot of visual flair -- dealing the cards, the dealer checking for blackjack, chips sliding, the bouncy result status, etc.

  • Fun game, but I might have encountered a bug. I played fair and were allowed to split 3 times. This made the UI crash after I won so that I couldn't continue. The buttons "repeat bets" and "collect" wouldn't show anymore:

    https://imgur.com/TcpHzT5

    Checked the console, not sure if this caused the error, but here's an error trace: https://imgur.com/g75OXgJ

    • Thanks for the info, and for trying the game. I think the game saw you splitting 10s, realized how irrational that was, and that's what crashed it :)

  • Interesting idea. Is this being played at any casinos yet? I'm curious how you sell them on the house advantage being real (e.g. a white paper, or some kind of insurance guarantees?).

    One thing your game could use is a "repeat bet" button.

    • There's a big "repeat bet" button following every hand.

      Casinos and regulators require a game's house advantage to be "certified" by one of two specific third-parties. A big expense (both cost and time) when I am sufficiently qualified to calculate the long-term house advantage of the game (and spent lots of hours tweaking the rules and running models to reach a very specific result goal), but no way around it if you want to be in a b-and-m casino.

This is amazing! Thank you for building it.

Please fix the bug with a pair of Aces. I fell like I'm getting robbed each time it happens.

Also, here's the correct payout odds and basic strategy for "full pay" jacks or better that most people are familiar with: https://wizardofodds.com/games/video-poker/strategy/jacks-or...

An option to reload/restart without having to hit browser refesh would be nice.

An option for basic strategy hints might also be cool but certainly not original/authentic.

Looking good, except no payout on a pair of Aces like others mentioned.

I'm in the market to learn Godot, and have already done a couple tutorials. What did you find was the best resource for learning Godot? And do you code in C# or GDScript while using it?

Thanks for sharing! This is really well done.

I was wondering if you would be willing to put the source code for this on GitHub? I've been meaning to learn Godot for a while for a simple 2D RPG and I'd love to see how you did things here.

All that's missing is the cigarette smoke and the sense of small-town desperation.

Side remark, but it is always intriguing to see what can be achieved with wasm technologies. There seems to be still significant potential in this direction and Godot's html5 export gives a good example of how to tap it.

Lol. Awesome theming. For a minute I was stuck wondering "why is there a link to a screenshot on the HN frontpage"?

This is amazing work, well done! I haven't seen such a great CRT effect but I would love to see that kind of effect available as something you could overlay on old retro arcade games.

  • This is available! Check out retroarch (or retropie if you have a pi 3 or 4 laying around) - it’s pretty great! Lots of shaders to choose from but pi-crt has a similar look to this and performs well

Nice, very fun! Did freeze after playing a few hands. These are the logs:

Failed to load resource: net::ERR_HTTP2_PROTOCOL_ERROR /classicvideopoker/vpg2.php?hold=00101&session_id=8941b3fb202e51e9b20a3f4a40d9013a:1 Failed to load resource: net::ERR_HTTP2_PROTOCOL_ERROR

TypeError: Failed to fetch at Object.create (index.js:9:273127) at _godot_js_fetch_create (index.js:9:274152) at HTTPClient::make_request(HTTPClient::Method, String const&, Vector<String> const&, unsigned char const*, int) (06371b4a:0x1c75df) at HTTPClient::request_raw(HTTPClient::Method, String const&, Vector<String> const&, PoolVector<unsigned char> const&) (06371b4a:0x452bef) at HTTPRequest::_update_connection() (06371b4a:0x45177c) at HTTPRequest::_notification(int) (06371b4a:0x452689) at HTTPRequest::_notificationv(int, bool) (06371b4a:0xe8b414) at Object::notification(int, bool) (06371b4a:0x4d563) at SceneTree::_notify_group_pause(StringName const&, int) (06371b4a:0x1b1818) at SceneTree::idle(float) (06371b4a:0xacf3f1)

SCRIPT ERROR: Invalid get index '13' (on base: 'PoolStringArray'). onPrintError @ index.js:369 index.js:369 at: _http_request2_completed (res://scripts/game.gdc:281) - Invalid get index '13' (on base: 'PoolStringArray').

Crash when 4 cards held (attempting to deal 1):

Failed to load resource: net::ERR_HTTP2_PROTOCOL_ERROR index.js:369 TypeError: Failed to fetch at Object.create (index.js:9:273127) at _godot_js_fetch_create (index.js:9:274152) at HTTPClient::make_request(HTTPClient::Method, String const&, Vector<String> const&, unsigned char const*, int) (06371b4a:0x1c75df) at HTTPClient::request_raw(HTTPClient::Method, String const&, Vector<String> const&, PoolVector<unsigned char> const&) (06371b4a:0x452bef) at HTTPRequest::_update_connection() (06371b4a:0x45177c) at HTTPRequest::_notification(int) (06371b4a:0x452689) at HTTPRequest::_notificationv(int, bool) (06371b4a:0xe8b414) at Object::notification(int, bool) (06371b4a:0x4d563) at SceneTree::_notify_group_pause(StringName const&, int) (06371b4a:0x1b1818) at SceneTree::idle(float) (06371b4a:0xacf3f1) onPrintError @ index.js:369 index.js:354 SERVER RESULT 2 = index.js:369 SCRIPT ERROR: Invalid get index '13' (on base: 'PoolStringArray'). onPrintError @ index.js:369 index.js:369 at: _http_request2_completed (res://scripts/game.gdc:281) - Invalid get index '13' (on base: 'PoolStringArray'). onPrintError @ index.js:369

as an aside: I'm currently a low-level systems programmer working on distributed database internals, but I'm looking to transition into 3D animation / game design because the combination of programming, visual creativity, math & physics sounds attractive to me. How much time would it take me to start creating non-trivial content and be able to charge for my work?

  • I’m not OP but I’ve been doing game dev for 15 years professionally for the same reasons you mentioned. I’ll be honest up front though, it’s not a great field if you’re going into it trying to make money, but it can be incredibly satisfying.

    As far as how long it’ll take, that depends on what kind of things you want to make and how much time/effort you’re willing to put into them, especially on the visual polish side of things.

    The hardest part of learning game dev is learning how to program, and it sounds like you already have a good foundation there. The current tools, especially Unity and Godot, are very quick to get up and running with. You could learn the basics in a dozen hours, and be making (bad) games in less than a month. Game design is a skill that is hard to learn except by doing it. Reading books and watching youtube videos about it only goes so far.

    For making games that you can actually sell, you’re looking at spending months per game, usually at least 6 months… though often the games you think are going to take 6 months often take much longer!

    The number one tip I would give is to actually finish your games, even your little early experiments. In game dev the “last 10%” takes way more than 10% of the effort.

  • > non-trivial content

    You mention "3D animation" and "game design" as areas of focus.

    For the former, there are established learning paths, so perhaps quite easy to estimate when you'll get to a point where you're delivering industry-standard work.

    For the latter (game design), perhaps the answer is a bit different. If you study game design at, say, university, the learning path might be a combination of reflective practice (studying games, writing critically/analytically about them), prototyping, making a bunch of games (including the final major project), and doing lots of experimentation (and maybe also going deep into a particular unexplored game mechanic, world building, character design, etc).

    Even if you finish university, you'll still have to make plenty of games to hone your craft.

    And the, for both of these areas of focus, to actually stand out from the crowd, would require something special. Maybe innate talent, maybe a new way of seeing the world. This is difficult to estimate.

    (But perhaps you've been sculpting 3D models and making small games in your spare time anyway, and maybe you're already quite good, so who knows? :)

    > charge for my work

    You're competing with a lot of other people for gamedev work :-) Most gamedev programming jobs don't pay as well as other programming jobs. You'll be doing it for the love of it!

    Someone I know worked at a gym, but made games in Unreal in their spare time, then did a 2-years remote masters in indie game dev, and got a job as a technical artist at a small indie studio. AFAIK he still just uses blueprints. I don't know how long he spent before university working on games in his spare time, but the 2 years of fast-tracking his knowledge really helped.

  • If you want to combine your interest in programming and visual creativity, but still make money, may I suggest front-end development? Whether it be web stuff or mobile, there's a lot to chew on there plus it pays great.

Very cool. And I agree about Godot. Small suggestion if you could make the crt less blurred it would be an improvement.

Very simple, very good. I love the CRT effect. And being able to immediately play in the browser like this, even from mobile, is amazing.

Also serves as a stark reminder of why video pokers are a bad idea, as I immediately lost everything, then proceeded to do so 5 more times.

> So... If anyone has any leads for making Space Invaders for Nike - please help! Happy to pay 5% on whatever work I get.

Our partner built a game for Nike that had a big audience - https://appmana.com/watch/lbxx

This is a streamed Unity experience built on our unique infrastructure: unlike WebGL or Stadia, it loaded instantly and supports all browsers. This means it can work as an ad destination, and it's why we have a partnership with Meta.

You should feel right at home!

Feel free to reach out on our contact page at https://appmana.com/contact

  • Visually, this game is pretty cool. On the other hand, this is the least fun ‘game’ I’ve played.

Awesome. Please make your games supportable in Linux(or Proton) as well if your game ships natively.

  • If you extract the (I think) data.pck file, you can run it with the normal godot engine wherever it's supported. (as long as there's no missing features the game uses on that platform.) It'd be easier for the developer to do it, but anyone can theoretically.

Besides fixing the low Ace value, I would suggest allowing the player to use the keyboard play.

It looks like the space bar does trigger a deal. Perhaps 1-2-3-4-5 selects and deselects cards and plus/minus allows the bet to increase or decrease.

Yeah, applying some realization about learning instruments, I'm currently more or less forcing me to just do stuff in Godot. More focus on doing and learning, less focus on the result.

It's part struggle with other programming mindsets I have from backend servers for game and other web applications - "Oh, just shove all data into this system" is a valid answer, and "really, really just do what you need right now" is a good idea.

And having implemented some of this on straight up SDL, it's pretty impressive how something that would cost you like 1-2 days to make fall down to... 10 minutes of clicking around in a tileset editor.

  • I have a hard time actually making games. Not in Unity or Godot specifically, but games in general. I end up going down rabbit holes in the infinite. Like, I was making a puzzle game, where you need to move pieces in a way to move from A to B. I ended up theming it as crossing a river where A and B are on different sides. I think I've spent 95% of my effort on that game on writing a water shader with the look and feel I'd like. But it's inconsequential to the actual gameplay. I could have just copied some code online or bought an asset and moved on.

    But at the same time, I'm enjoying myself. I like learning this stuff, and perhaps my goal is really to have fun rather than actually ship something. So it's OK.

    • IMO it all depends on the goal. If you're just noodling around on the guitar to have some fun, you're not strictly trying to pick better. If you're doing picking exercises, you're not exploring what a new pedal can do. If you're exploring a pedal, you're not trying to learn a specific song.

      For example, I'm currently deliberately moving slower in an idea to figure out good ways of doing things in Godot as well as reading a lot about thes systems. And I've learned a few things along the way. However, if I was in a Ludum Dare mode of working, I could've had something doing the same things I have now much, much faster, because if you don't have core game mechanics working in 8 - 12 hours you're utterly doomed in that context.

This looks great. Audio's left-speaker only? Might be a problem on my end.

I will learn video poker, and get good at this. I wouldn't mind an option to disable the CRT simulation, but it's outstanding anyway.

Video Poker! just yesterday a video on YouTube was interviewing a old man about his years as an enforcer for an active New York City organized crime group - video poker was explicitly one of his stories about how they ran the gambling rooms. The machines were part of gambling equipment that they were supplied with from another crime group, in exchange for a cut of the profits. Not long after, the "pizza-gate" events happened and changed the business a lot.

Ummm why didn't my two aces qualify for jacks or better? Also if I changed enough settings (moving the bet up and down) then the game glitched out on the first deal.

Just me or is it super unintuitive that you HOLD rather than dismiss cards? Happened like a dozen times now that I throw the cards I want to keep.

I’m curious about your experience with GDScript - which I presume is new to you - because it’s been a stumbling block for me trying Godot.

  • Its possible he also used the C# variant of Godot. I find GDScript easier for myself, though I come from a Python background. I highly recommend learning Python basics. There are nuanced differences, I think of GDScript as a Python / JavaScript type of language, has the syntax of Python but has some JS / TypeScript things to it.

    • "ERROR: Mono: Core API hash mismatch." is a strong clue that it's using C# instead of GDScript. (I was on the lookout because the same error appears in my own game. Apparently it's benign.)

    • The current V4 of Godot doesn't support web export via C# - unless it's on a dev branch maybe?

  • GDScript is very similar to Python with the additions of signals and slots, which is nice. Except for some minor quirks which I don't remember from the top of my head, it nicely gets the job done.

    I haven't tried Godot 4 yet, but from what I read, they improved GDScript even further, which should be nice.

    If you think GDScript is holding you back, you can always try C# or C++.

This is amazing! Totally nailed it. Do you plan on releasing the source? Even if it’s not open source I’d like to take a peek.

There's a video poker version, which I played on a machine years ago, where after being dealt a winning hand we have an option to infinitely double the winnings if we correctly guess if the next card is higher or lower than 7. Does anyone know what I am talking about and what the name of this poker variation is called?

How did you miss the fact that a pair of aces qualifies as ‘jacks or higher’? Did you even play the game?

Game froze for me:

index.js:369 SCRIPT ERROR: Invalid get index '13' (on base: 'PoolStringArray'). onPrintError @ index.js:369 index.js:369 at: _http_request2_completed (res://scripts/game.gdc:281) - Invalid get index '13' (on base: 'PoolStringArray').

Any way for me to listen to all the different jingles? I've been able to hear all the jingles through 4 of a kind, but I have no hope of hearing the straight flush/royal flush jingles without cheating somehow.

Great nostalgic implementation, took my money for sure. One suggestion I'd make to make it more like the real thing is make a number press of 1-2-3-4-5 hold/unhold their respective card on desktop.

Pretty nice, though feels a bit slow to me... on my 10980xe which is kind of painful I guess given that it's mimicing a late 80s/early 90s video poker machine

  • That might be side effect of using godot. It's apparently just a lot slower than unity and unreal.

This works very well in a mobile browser. Super impressive! Only issue I had was a slow initial load time. Not sure if that is due to Godot, or the size of the assets.

You nailed the aesthetics perfectly! I've been using Godot for years now so I was happy to see such a huge influx of developers after the Unity drama.

I am very interested in discussing visualization solutions with you. I was planning to do what you mentioned here in Unreal to visualize financial data.

Wow, reminds me of going to the bar with my dad after I turned 21.

Now if you could just find a way to include faint, bad, country music and the taste of cheap whiskey.

You have a memory leak somewhere; I came back to this after the tab was open overnight and it was using 3GB of RAM in firefox 118.

Is there a reason it's only playing sound effects on the left side? Using macOS/Chrome/Earbuds there's nothing on the right.

Nice work! Good to see another Godot convert on here as well :-)

It is great how quickly you can get something up & running & then iterate on it.

Looks like you exported your project in debug mode, you probably want to export in release mode.

The screen seems somewhat distorted/deformed when displaying on my phone browser.

I guess you could tractably compute the optimal policy for every hand. What is it?

the number of comments about aces is astounding. well done! any advice for new devs tryin to get used to godot? i have been writing phaser games for 7 years

over a few days is pretty good. not sure you are onto a winner here given that every junior game programmer should be able to make something like this in a day or less.

It's nice but the CRT filter in a big monitor burns my retinas. CRTs didn't look like that unless you got too close to the screen. I guess I'm supposed to move away from the screen but then I can't reach the mouse, :)