DEV Community

tidanneels
tidanneels

Posted on • Edited on

How I created a mobile online game from a traditional card game

๐ŸŽฅ Trailer video

https://drive.google.com/file/d/18Fp9bgSJ4kSVdzrQxuxn7ZPeIiGbQmy4/view?usp=drivesdk
Note: Contrary to what is indicated in the video, the game is not available in the Play store/App store


Hello everyone, I am a french high school student passionate about programming, and in this post I will introduce you to Boursicocotte, a mobile game that I recently developed with Godot Engine.

It is the porting of a card game on mobile and online, to play it remotely. Initially I was just making this game to play with my friends, but I thought that it would be interesting to show it to the developers community.

๐Ÿƒ The original game

The original name of the game is Kuhhandel, and it was invented by the German Rรผdiger Koltze. It is an auction game in the theme of the farm, from 3 to 5 players, which gives a very important place to bluff and strategy. The goal is to get as many animal families as possible, either by winning them at auction, or by stealing them from opponents with cunning. I'm not going to go back over the rules, but you can find them at this link: http://www.gamecabinet.com/rules/Kuhhandel.html . I really liked it when I played it for the first time and I had the idea of โ€‹โ€‹programming it so that I could play it remotely with my friends!

๐Ÿ–ฅ๏ธ The port

As mentioned earlier, this is a card game; and it is very fun in view of its simplicity: the cards are limited to 4 animals per species (10 species) and money cards of values โ€‹โ€‹from 0 to 500. As for the "gameplay", it is turn-based with 2 possible actions per turn: auction or animal claim. It is therefore at first sight fairly simple to program.

I also specified that the game is online: here I opted for the centralized server solution (rather than peer-to-peer) for several reasons: speed of requests, simplification of the code, simpler troubleshooting in case of problem in game. The code on the server side is quite simple: I'm not trying to make an ultra-advanced code if it's just for playing with friends. In addition, in terms of how the code is made, first of all it is in PHP, and the data is provided in the form of JSON code. There too I opted for this solution (and not a higher level API, with function calls for example) for several reasons: simpler synchronization of clients when restarting the game, simpler code on the server side, etc.

As you can imagine, most of the work is done on the client side (written in GDScript which is similar to Python, on the Godot game engine). In fact, communications with the servers are made via 2 HTTP Request objects: one which continually collects information of the game to synchronize the client, and the other which takes care of sending data. This solution is obviously not perfect (the server cannot support thousands of players) but it is more than enough for normal use.

๐ŸŽฎ Visuals and release

I am not a graphic designer, and so much the better since this game does not require a lot of visual elements, only the design of the UI that I realized with an open source pack (credited in the game), an icon free for commercial use and a logo made on powerpoint.

โœ… Conclusion

Originally this game was supposed to remain for personal use, but I am thinking of the eventuality of editing it. If you are interested or know a mobile game editing company which could be, don't hesitate to contact me via private message. You can also contact me if you want a copy of the game just to try it!

Thanks for reading, greetings form France!

Top comments (1)

Some comments may only be visible to logged-in visitors. Sign in to view all comments.