My latest private project
My latest private project is a level editor for 2D platform games. I started working on it today and I have decided that I would post about my experiences in implementing the project.
The motivation is basically life-long interest in game development. As a child I designed a lot of platform games and made sketches using pen and paper. So far, I have not implemented any of these drafts. A level editor would be a good basis to change this.
I am working with Visual C++ 2015 and OpenGL. I am using code from the website NeHe for window handling and bitmap drawing. Basically, I am re-using the code of my 2D shooter game "Evolution" since it is a good basis for such a project.
The first thing I wanted to change was the shape of the mouse cursor. First of all, in "Evolution" the mouse cursor was disabled. I looked up on MSDN and found out that the mouse cursor can be displayed by writing
ShowCursor(1);
in the window method. Then I searched for information on how to change the appearance of the button and found some advice, but in the end it turned out to be even simpler: In NeHe_Window.cpp, there was the line
windowClass.hCursor = LoadCursor(NULL, IDC_ARROW);
which simply had to be changed to
windowClass.hCursor = LoadCursor(NULL, IDC_CROSS);
Afterwards, I just modified the window size, toggled fullscreen mode off and then wondered why it was possible to run the program from command-line but not straight from Visual Studio. My first intuition was proved right: all I needed to change was the Working Directory in the Configuration Properties, section Debugging.
Now I'm done with what I originally wanted to do on day one. I'll think about the next steps and am very excited about this project.
Kommentare
Kommentar veröffentlichen