I'm probably not going to go through the whole process of making a game here. I have a few goals I want to achieve here. If you've got some, too, share yours, too. This is what I want to learn how to do:
- UI stuff. Menus, dialogue, and so on. If you haven't done much outside of engines like the OHRRPGCE, you probably can't appreciate how much of a pain it is to do UI stuff. A good UI is necessary for every game ever, and this is especially true for menu-driven games like RPGs. Modern platforms have only made UI worse, since you can no longer make assumptions about the user's aspect ratio. I've been directed to this page as a resource.
- Support for various control schemes. Keyboard, controller, mouse, whatever. I'd like it to be fairly painless to support a variety of input methods.
- Mod support. Including localization. The asset library has a "Mod.io for Godot" extension, which sounds nice. Has anyone here used mod.io? I'm totally unfamiliar with it.
- Data-driven design. Mod support is pretty useless if you've hardcoded your entire game.
- Save/load. How hard is it to convert the current game state to/from a file? The community has several options available.
Let's get started
Use the "Download Latest" link on https://godotengine.org/. There's no installer, so put these files in your workspace directory. Create a subdirectory named TestProject. Launch Godot and create a new project in your TestProject directory in Compatibility mode.
Whoops! You're probably looking at a very confusing screen now. I sure am. Let's start going through the Godot tutorials, beginning with Step by Step. If you find that you're already getting lost, it may help to step back to Introduction, which defines some terms.
If you're reading along, you should quickly get to Creating your first scene, which shows the confusing screen we were looking at. It tells you to create a Label node, give it text, and then run. Hey presto! A few steps later, we've already launched our very first game. It's not interactive, but baby steps, you know? This is roughly the equivalent of filling in the first walkabout sprite and hitting "Run test game" on a fresh OHR project.
Next: the Instancing tutorial. I found that Godot froze for a few seconds when importing the project for this. I also found that while the "Main" scene did open automatically, it opened in 3D, and I had to click to 2D to get back to what the tutorial showed. This might be because I closed Godot between projects.
The tutorial instructs you to open ball.tscn and change the "Bounce" property. You have to open ball.tscn to do this: while the toolbar shows from the Main scene, you can't edit the PhysicsMaterial properties of the ball from there. (If you skipped the introduction, as I did, you may be surprised to learn that the ball is a scene. The introduction says, "A scene can be a character, a weapon, a menu in the user interface, a single house, an entire level, or anything you can think of.") The tutorial will then explain that PhysicsMaterial is a resource, and you can set direct properties of an instanced scene, but resources are shared between instances.
The next tutorial page, Scripting languages, does not contain any follow-along tutorial steps. Instead, it explains what your options are for scripting. Yes, there's no way around it: you will have to do some scripting to create a game in Godot. For the purposes of this thread, we'll stick to GDScript. It's not until the following page that we have any more tutorialing to do, so let's go there.
The instructions tell you to create a new project, but TestProject is fresh enough. Let's just jump back there and delete our Label node. The "Hello, world!" debug text from our _init function appears in the Godot engine window. After that, we're instructed to create a _process function. This is a fairly common paradigm in game engines: because the framerate is variable, and you want to maintain stable gameplay at any framerate, you have to be able to do your thing no matter how much time has elapsed since the last frame. In our _process function, that time lapse is the delta. In theory, you could remove the "* delta" from this line and see the rotation vary with the framerate, but in practice, the framerate is stable enough that you won't notice. (Also, the tutorial rotation is 180 degrees per second, and if we don't multiply by the delta, we're just rotating 180 degrees on each frame, which isn't going to do much for you visually.)
If you didn't reposition the sprite, it's going to be mostly offscreen. You can get back to the visual scene by clicking on "2D" at the top of the engine window. You can jump back to the script with the "Script" button. When adding the velocity stuff to your function, make sure it's indented like the rotation line.
We're almost done for today. Two more sections. First, Listening to player input. This is simple enough as long as you remember to put everything in the _process function by giving it the proper indentation. If you're just getting the hang of things, you can try making the sprite move backwards when you press down.
Finally, Using signals. This has you wire up a button to trigger set_process(not is_processing()) on your sprite. It took me a second to figure out what this meant. It's saying "set this object's 'should I run my _process function' property to the opposite of whatever it is now."
Godot is smart enough to let you access your new button via mouse or keyboard, which is encouraging. I can tell already that signals are going to be really important to getting a game of any complexity to work.
But that's good enough for today. Next time, I'm going to run through Your first 2D game.
If this thread is of any interest to you, please let me know! I'm not going to keep this going if nobody's reading. If you followed along -- especially if you ran into any trouble following along -- please let me know that as well.