Tutorial (Godot Engine v3 - GDScript) - [Prototyping update]

in #gamdev7 years ago

... Tutorials

... Prototyping continued

Hi all,

A quick update, as I'm still concerned that I've not posted tutorials recently. It's not that I'm working on it, on the contrary!


multiple formations.gif
If you see a white border, that's for my test purposes!

This is HOT and FRESH off the production line!

I've dropped some of the screen wrapping requirements and have found better ways to implement the code! In essence, I now have a generic Node that can be attached to ANY object that extends or is a base Node2D class.

It attempts to initialise the wrapping capabilities. If it can't, it gracefully aborts, leaving the Node2D to execute as-is, reporting issues to the console.

Once the configuration is correct, it interacts with the parent and ensures screen wrapping occurs!

I decided to drop the need for a 'Sprite' or 'Node2D' to be on both sides or all four corners of the screen. Instead, I realised the animation of formations is so fast that the player JUST ISN'T going to notice it!

They would on their ship, but by sacrificing the quality with it the code becomes hundreds of times faster! This allows me to chain over 500 sprites in a formation!

I kid you not, the code is now sweet as a nut.

I've also dropped all thoughts of using the Physics engine. It is extremely powerful, but what I'm building is a traditional sprite based game. I require SIMPLE collisions and complex movement, choreographed by code, step by step; this really isn't suited to Physics! The sheer volume of sprites swamps the engine due to the interaction with the objects that I need per frame.

I will discuss this more in detail in a future post, as I'd love to gather opinions from others; but for now, this is a decision made.

I'm now working on generating different formations with AI.

It's going to take me a few days before I can write something official up. I hope it is worth the wait.

Final

Please let me know your thoughts on this post.

Tutorials

Beginners

Competent