So this is going to be my first post.
I’ve been trying to work with wxWidgets, but it’s just so hard.
Anyways:
THIS IS FOR BEGINNING PROGRAMMERS!
This blog is going to be about my journey into programming, and, hopefully, game development. My first major goal is to create a game called Asylum, a 2D turn-based strategy with a control scheme similar to Fire Emblem, but done very different in its execution. For starters, the game will be focused around virtual combat with agents and viruses, and will be situated around the Asylum Virtual Solutions Co., an anti-malware software development company. Through the game, the main character, Drake, will encounter Isa, a very special character, and will attempt to uncover the mystery surrendering Isa’s existence.
Well, that’s nice. NOW I HAVE TO ACTUALLY LEARN HOW TO PROGRAM!
First of all, I’ve decided to begin learning C++ as my language of choice. I’ve scrambled in the past with HTML and Java, but C++ is a very powerful and relevant programming language. Hence, I will be learning C++, no matter how hard it may be.
However, once we get past “Hello World!” I need a Graphical User Interface (GUI). I need to create windows, draw pictures, gather user input, etc.
But there’s no in-built GUI into C++, unlike Java, which as Swing.
Thus begins the search for a GUI!
Now, in most programming languages, libraries are basically add-ons of code. Libraries are like books of existing code that you can use in your own personal code in order to add extra functionality. Let’s take the standard library that comes with C++: often times, in the Hello World console program, you’re going to want to write a sentence or phrase to the console screen. But there is no basic function in C++ that allows you to do so! However, C++ comes with a standard library that comes with a function like this. Within the C++ standard library, there is a file called “iostream.h” or so that you can include into your program at the very beginning. The code looks like this:
#include <iostream>
Within <iostream> is the code that allows users to output to the console screen: cout. Other libraries, such as SDL, can do much more complex things. OpenGL is also a very popular graphics library.
I’ve looked into two separate third-party libraries: SFML, and wxWidgets. SFML stands for Simple Fast Multimedia Library, and it can handle everything from graphics to sound to user input and so on. The only problem is that it cannot create “actual” windows. Yes, this means that I won’t be able to have menu bars and scroll bars and other conveniences like the such. While I can draw circles and set background colors, SFML lacks the ability to create windows and frames that mimic Windows, Mac, and so on. This is a problem; even Paint has a “File” menu.
While SFML’s lack of a “native-window” kit to build “real” windows with is a downside, it’s not that big of a deal. This is because SFML is not meant to be an all-encompassing library. Instead, I am using wxWidgets to help encapsulate SFML so that I can use both at the same time–wxWidgets will allow me to make regular windows while SFML can handle graphics, events, etc.
The only problem is that wxWidgets is basically impossible to configure and implement.