måndag 3 februari 2020

Fast UI

Lately I have been finishing up the base code for my connect four game. The game logic along with a basic controller went really fast to complete. I am using C# to code this, and it's convenient to use. Perhaps it's not suitable for super-optimization like C++, but it's not often that anyone notice a difference for simple applications. I think C# is perfect for creating logic for board games. Although, the AI would benefit from being created separately with C++ and then linked via a DLL. My current AI only make random moves so there’s nothing to worry about there yet when it comes to performance. Creating a good AI can hog quite a bit of CPU resources. Anyways, the basics of the game is working. Also, I created a way to ping sweep a LAN (with some help from StackOverflow). I do that to retrieve all IPs that are easily available. These addresses are used to make it possible to easily find and play the game with others on the same network. The ability to manually connect to an IP might be added, but I think this will only benefit advanced users that are familiar with port forwarding. I did things a bit overly complicated by using UDP instead of TCP for internet connection. UDP is good to get used to if I plan to make real-time multiplayer games. Right now, most if not all important things work smoothly. The internet part could be fixed somewhat for handling special cases like loss of connection. The main thing that remains now is to add visuals. I could do a full-scale 3D app, but it would take some time doing it with C++, OpenGL and GLFW. Therefore, I did some research online and found an API called Win2D. Win2D is a free to use library that makes it simple to render 2D graphics and UI elements. I was first considering using Unity to quickly create 2D games, but I felt that Unity would be overkill for board games, and I also don't want to have to pay Unity money in the long run.

I haven't started using Win2D, but I will check it out. I think once I get a grasp of using it, I will quickly be able to create a standard UI that I can use for other upcoming games as well. Then, I will be able to produce maybe one board game per week and release them for free on the Microsoft Store. There already exist many board games on the MS store, but I hope to gain attention with my "FullRune" trademark and internet capabilities. Once I have become popular, I may be able to charge money for in-game items. At the very least this ought to boost my CV as a .NET C# developer. My favorite language is still C++ nonetheless.

Inga kommentarer:

Skicka en kommentar