Blackjack Island... 30 Days In


I make games part-time and am constantly wishing I had more time. These are the tales from the world in between my day job and family.

Blackjack Island...From Python to Godot to Unity

When I first had this idea, my initial concern was piecing together a deck class, card class, and dealer class. After cobbling something together in Python, it was apparent that to display the cards, I had to use PyGame's sprite system. I also needed a few more things to get things running: a hand class and a class that correctly displays the right face on instantiated cards. After poring through the docs, it seemed easier to begin the game using Godot or Unity.

Godot

I decided to try Godot, an untested-by-me game engine whose syntax, GDScript, was close to Python. I also opened a project file with Unity (which, by the way, thank Heavens I did! ...more on that later).

After getting my classes together, the app was running (of course, through debug outputs in the console): the 21 blackjack game was creating a deck, creating a card, dealing to the players' hands, but unfortunately, that was it—I was not able to figure out their Node system or an easy way to manage the built-in sprite system. Due to the lack of documentation, the Atlas Texture was difficult to implement through code and hard to figure out in the editor for the same reason. Not that I didn't find any information; the Godot forums are okay but again, not a lot of clear, direct help.

I did see the light with signals and how they work—a very cool and easy-to-use Godot events system. The problem was, I was not able to get a good feel for the Nodes, no matter how hard I tried. I was trying to set up a script that just displays the proper card face and was not able to get it to work properly. Either I was displaying the card back, the wrong face, or worse—no card at all.


Unity

What took me a week or two to put together in Godot came to fruition in hours on Unity. Just being able to unpack multiple sprites off of one PNG and have it fan out in the editor was a big upgrade to Godot's Atlas Texture/Region Rect system. Then again, having used C# in the past was a huge boost. While later on, I found out that the Godot Mono version was decently documented, the lack of good info online and the company's recent online freakout made me less enthusiastic about using the engine.

I am still with Unity, now able to represent all the cards as game objects and pop up with the right face—PROGRESS!!!!!!! But the UI remains very basic and also placeholder right now (non-functional), and I have been focusing a lot on the bread and butter scripts for this game before diving too far into UI and visuals. As long as I see the face of an "Ace of Spades" as an Ace of Spades and all the other scripts so far are working, building on top of that seems like a good idea.

Will post a "Vanilla Blackjack" playable when further along.

Thanks! Ninja Pirate Robot Alien

Leave a comment

Log in with itch.io to leave a comment.