Simple README and a first test running on OSX.

master
Zed A. Shaw 7 months ago
parent 8a78fffb5f
commit dfbae6043b
  1. 28
      README.md
  2. 2
      sfmldemo/meson.build

@ -1,3 +1,27 @@
# simple-cpp-game-study # Simple C++ Game Study
This is a simple game I'm writing to test the idea of using games to teach C++. This repository contains all of my research into C++ as the next intermediate language for Learn Code the Hard Way. You can read my first blog post _[Exploring the Replacement for C as an Educational Language](https://learncodethehardway.com/blog/26-exploring-the-replacement-for-c-as-an-educational-language/)_ to read my thoughts on C++ as a first test. The end goal of these projects is to learn C++ well enough to make simple 2D games for a course. The course will teach:
1. C++ Basics -- Just like all my other courses.
2. Game Dev Basics -- Keeping it simple and mostly as a vehicle to learn C++ and...
3. Defensive Programming -- Learning how to crash C++, prevent crashing, test it, etc.
Another way to put this is I want to teach people how to make games that don't crash, and C++ is a great language for learning both...because it can make games and tends to crash.
## Current Status
The `sfmldemo` currently contains a very bare build using [Meson](https://mesonbuild.com) to build a [SFML](https://www.sfml-dev.org) project. This currently builds on Windows with MinGW but I haven't tested it anywhere else. The build takes the [example code from imgui-sfml](https://github.com/SFML/imgui-sfml) and makes it work, so you have a game window with a working GUI in it already. That is actually remarkable feat on Windows.
To get this working the rough (ROUGH) steps are:
1. Get MinGW and Meson installed.
2. Run setup.ps1
3. `meson compile -C builddir`
4. `meson install -C builddir` -- Careful with this, it might install stuff in unwanted areas. On my computer it put them in `C:\` but I have to read the instructions on how to set the install location.
5. `./builddir/sfmlprog` -- That should run it and you see a window with ImGUI's demo panel.
I'll have more extensive instructions in a later blog post, but if you have time try this out and let me know how it went at help@learncodethehardway.com. Please let me know if you tried a different compiler, Windows version, etc. If you're on OSX or Linux it should work the same but Linux people might want to use their package manager instead.
## Next Step
Once this is mostly working and documented I'll start the process of learning C++ and then work on a bunch of silly little games to learn how it all works.

@ -1,5 +1,5 @@
project('sfmldemo', 'cpp', project('sfmldemo', 'cpp',
default_options: 'default_library=static') default_options: ['cpp_std=c++17'])
sfml_dep = dependency('sfml') sfml_dep = dependency('sfml')
imgui_dep = dependency('imgui-sfml') imgui_dep = dependency('imgui-sfml')

Loading…
Cancel
Save