• plixel@programming.dev
    link
    fedilink
    English
    arrow-up
    2
    ·
    edit-2
    4 hours ago

    I understand where you’re coming from. AI can be a learning tool to help fill in some gaps in knowledge, however the moment you don’t understand what it’s doing and just copy and paste the code, it no longer become a tool but instead a crutch. Instead of copying and pasting code you can take the time to look into why it’s doing what it’s doing. For Godot in particular they have really good documentation and there’s plenty of resources to learn. GD script is a pretty easy language to learn on a surface level. You should do some research into game design patterns and basic programming concepts.

    I did take a look at your code and while you do have your main.gd organized, having a large monolith like that with 1100+ lines of code that has multiple responsibilities is certainly a choice. Typically you want your scripts to handle specific responsibilities, that way each script and each object that contains that script has a single responsibility. This helps with efficiency and debugging since you have smaller scripts running and if something breaks you know what broke without everything else falling apart. You employed that partly with your save manager and notification manager etc. But you could certainly pare down your main script. Also considering how much it’s handling I’m curious as to what the structure of your game looks like. Godot likes to have nested objects but based off your code yours doesn’t seem to be conducive to that. Also there appears to be some needless abstractions with your variable storage.

    Anyways I think taking the time to research and learn some basic programming principles and game design patterns would go a long way to help you. Coding can be difficult and seem like a black box when you first get started, and AI can seem like a way to pierce through that, but if you don’t learn why it’s recommending the code it is then you’ll never really understand what your own game is doing and that’s not helpful to you or your players.