Advertisement

Graphic Interface for Text-Based Game

Started by December 22, 2020 05:12 AM
4 comments, last by indie_evolution 3 years, 10 months ago

Wassup Guys,

I am starting a small game project. I am going to be developing a text-based boxing game in C++. I would like to create a graphic user interface for this game. I was curious if you guys would recommend technology or a library for C++ that would simplify creating a graphic interface.

Indie

None

Things like SDL2 or SFML give you a plain canvas where you can draw anything you like. Been a while since I worked with these, so you may want to check how difficult it is to draw text on them.

Another option is of course the standard GUI toolkit of the platform of choice. If you want to be portable across platforms, that may be a bit tricky though.

I am not sure why you settled on C++. Being text-based it sounds like overkill, sort of using an F1 car to drive to the local grocery for doing some shopping. Without knowing what's inside the game, my first guess would be that Python is a feasible alternative which gives you options like PyGame. Python can also be used for making a GUI application, at least for Unix, so I am guessing it can also handle Windows GUI.

Advertisement

@Alberth Thank you for your response. I will look into SFML. I actually remember using this library before for a project at work. We were taking data from a source and using it to create a graphic map. I don't know why I didn't think of this as a solution for making a GUI.

I decided to use C++ for this project because I enjoy working in this language. In college and in my professional career I would say that 60% of m work has been in C. Another 30% in C++ and about 10% in Python. I have always found C++ enjoyable to work with. I am also building this game on a state machine implementation that I had already written in C++. For the GUI part of the game, I plan on creating an asset manager but, I am hoping that each component I create from this game will be reusable in future projects.

None

FYI, Python and C++ are far from mutual exclusive.

With Python being a glue language based on C, and things like https://github.com/pybind/pybind11​ you can have a very happy marriage between Python and C++ (11) .

But in the end it's all about what you prefer, so have fun, and stay safe!

@Alberth Safe…C++. Wish me luck lol. I am sure that I will have plenty of fun. I was surprised at how easy it was to get SFML up and running. Thanks for the advice.

None

This topic is closed to new replies.

Advertisement