Hi, I’ve just started using GDevelop and have run through the cannon tutorial. I’ve made a couple of small games in Stencyl before but now I want to work on a larger project and I just don’t think Stencyl will be able to handle it so I thought I’d switch to GDevelop. So far I really like the structure (although it takes a bit of getting used to coming from something as simple as Stencyl) and the way you can quickly throw events together.
The game I’m planning is going to be a top-down space combat game, a similar to Elite (more like AsciiSector actually) but with less focus on trade and more on pirate hunting and performing missions.
Because it’s potentially going to very complex (ships stats and equipment, procedurally generating NPC ships in a sector when the player arrives and pathing them all, etc,) I’m trying to plan out as much of the structure as I can before I start hacking away. This has thrown up a few questions that I need to answer before I go too far down what may be a dead-end path.
So firstly, thinking about the player’s ship, I’ve started building some ship sprites in Inkscape and I’ve deliberately left them with empty weapon mounts rather than include them with each ship (more on that in a bit). Once I’ve got a sprite/animation for every player ship in the game I plan on adding them as objects and giving each one a bunch of variables (possibly as a Structure) to determine their base stats (hit points, turning speed, number of weapon/engine/shield mounts, ect).
So far so good. The question then is how do I tell the game which ship the player owns. I think I can do this with a global variable (another structure) which will hold all the details for the player (cash, ship owned, any systems on the ship, cargo, faction respect/hostility levels, etc). The question is, can I simply use the Ship_Type global variable to store the name of the particular object and use that to spawn it at the start of a scene (i.e. when a player jumps into a new sector or launches from a planet/station)? That seems the simplest idea to me but I’m not sure if GDevelop can interpret a text string in a variable and apply it to an object in that way.
Assuming it can, then it would follow that I can also create all the different ship systems as further objects (although any internal systems won’t have sprites associated with them) and refer to those from the same global variable/structure to generate the entire ship loadout when the scene is created.
This throws up another question, which is how do I deal with the differences between larger and smaller hulls. If, for instance, the starting ship has two gun hardpoints I could have Hardpoint01 and Hardpoint02 as child variables and populate them with specific weapon objects (say, “20WM_laser” and “missile_launcher”). But what happens when they buy a new ship with 3 hardpoints? Can I dynamically add/remove child variables from the global structure or should I build the initial structure to include the maximum number of possible child variables and then some force each individual ship to limit how many they can use?
And, final question (for now): My current plan is to represent interchangable weapons on the ship sprites themselves. This not only looks better but, in theory, allows me to create each weapon object with a sprite and a standardised event that holds all the actions for it firing while the specific numbers used for each variable (damage, range, rate of fire and which projectile object to spawn) can be held in the weapon’s own structure variable which seems like a good way to handle it. I also like the fact that I can define particular points on the ship sprite and my plan is to designate those as hardpoints and then, when the ship is generated upon entering the scene, spawn the appropriate weapon sprites and attach them to the hardpoints. The only question is I’m not at all sure that is possible under GDevelop. They problems I can think of are forcing the Z-order correctly (some ships may have mounts on the underside with only a small part of the weapon visible from the top-down perspective) and that while I may be able to spawn the weapons at the correct point, they may drift off by themselves when the ship starts moving so I need to know if there’s a way to “stick” them to the ship. Under Stencyl I would have used the weld joint from the joints extension but I’m not sure what the equivalent is for GDevelop. I probably need to make my way through some more tutorials but I’d like to get some answers so I know if all this is going to run into serious technical limitations before I even start. If so I can probably rethink how to do it.
Any help or advice will be greatly appreciated and I’ll probably have some follow-up questions depending on the answers to these.