TMO Games cofounder and developer. I love every area involved in game creation
We've started "Godoting" our game and the results are really nice, I've rewrite a lot of times the player class, even I switch from Godot 2.1 to 2.2, and back to 2.1; now we are happier with the results. But everything is subject to changes, though.
During the coding for the player I had to learn how to do many things in Godot (coming from Cocos), and I really liked the methods move(), move_to(), test_move() and revert_motion() (so many moves and the revert is a motion, :) ). They are simple, for the smart guys, so I had some (long) time trying to fully understand how to control these things. The worst part is when you add some slopes, and in the middle of that issue I've discover Godot 2.2 with its move_and_slide() method. This method simplify another method: the slide() function, the one that helps you with the slopes. Here is an image from the Godot docs:
See? slide() is a genius. Anyway, why I switch back to 2.1?...
Haha, too dramatic, right? But well, is true. The stable branch right now is the 2.1, and the 2.2 is being developed slowly (they are full-time with 3.0). So, go back to 2.1 and the classic move() and normal.slide().
I've coded the player class to be very flexible, loading the character and also the character has its animations in a separated scene. So the player class has a character skeleton, and this skeleton has an AnimationPlayer (class). I also did a "states" class that manage each state for the player, can be locked or not, can have a next state defined or not, and so on. I don't think I'm a good programmer, so all suggestions are welcome.
If you are not familiar with Godot, I can tell you that it uses a dedicated script language called GDScript (with a syntax similar to python), and the engine is written in C++, and is really easy to make custom modules for it. And that's another reason that lead us to choose this engine. If we have problems with performance, then we can do a C++ module. And about GDScript, think that for godot each node you create is a class, so if you create an "States" node, you are creating a class. I've used this feature to organize my code.
As you can imply the character has skeleton animations, before we had spritesheets, but we started to see how those spritesheets started to get bigger, so we changed that.
The player node doesn't have any predefined character... Recently I saw a "Placeholder" option in Godot, could be useful for this?
And in other node I have the actual character, hopefuly will be a lot of characters... finger crossed!
Ok, the switch to a blog format is done... don't forget to read the "Day-1" article.
No blogs were found matching the criteria specified. We suggest you try the blog list with no filter applied, to browse all available. Join now to share your own content, we welcome creators and consumers alike and look forward to your comments.
A group dedicated to indie and standalone game development.
We are a 2 people team (sometimes more!), doing games for fun and... profit? Enjoy!
No groups were found matching the criteria specified. We suggest you try the group list with no filter applied, to browse all available. Start a group and help us achieve our mission of showcasing the best content from all developers. Join now to share your own content, we welcome creators and consumers alike and look forward to your comments.