Working with AI, but still creating my own thing... Is that possible?

To get a better understanding of javascript, I am creating a 100% text based adventure (using Visual Studio Code and a HTML canvas... So I don't use RPG maker for this).

I know how to create objects, and how to manipulate them, and I felt like that is all I need to know... Well, it is not. So, I opened gemini (the chat GTP version pushed by google) and asked me to help. I asked them to make me an example of a function I need, so I can study how they did it, and then do it myself in-side the game.

I do NOT copy-paste things over, for a few reasons:
  1. I want to create the game myself. I don't want an AI generated game.
  2. I create this game to learn javascript. And I won't learn from copy/pasting.
  3. I want to understand every single line of code in my own game,
The way I do this, most effectively, is I use google docs to save a copy of my code in, this copy can be read by Gemini. Then I clearly tell Gemini what my problem is and I ask for suggestions. In this case I asked to write a function to create 'decks' with all the names of all objects inside a certain object... (I hope I use the right terms here...) I also tell gemini I want them to not show me the full code including the solution (what it would do by default) but only give suggestions or examples.

Here is an example of a conversation between me and gemini, which took place just now. (Note that there might be some time between replies, because I study the solution they gave me while we chat.)
ME:
Please write me a function that creates an array containing the names of all loot cards (items and equipment)
So, the result should now be ["party nose","beer"]
But when I have much more items in those objects, the array should show all items.
You don't have to repeat the whole code, just show me the function.

GEMINI:
Show thinking

Here's the function to create an array of all loot card names:
Get All Loot Card Names
Jun 9, 1:28 PM

This function will go through your gameData.loot.equipment and gameData.loot.item objects and collect all the names (keys) into a single array.


ME:
Great, this is exactly what I was looking for.

GEMINI:
Show thinking

That's great to hear! I'm glad the getAllLootCardNames function in the Canvas is exactly what you were looking for.


ME:
What does this if statement do?
for (const itemName in gameData.loot.item) {

GEMINI:
Show thinking

This for loop iterates over the enumerable properties of the gameData.loot.item object. In simpler terms, it goes through each item that is defined within your item category in gameData.loot, assigning the name of each item (like "beer") to the itemName variable in each iteration.



ME:
But you never define "equipmentName" or "itemName"

How does that work?

GEMINI:
Show thinking

You're asking how equipmentName and itemName are defined in the for...in loops within the "Get All Loot Card Names" Canvas.
In JavaScript, the for...in loop is designed to iterate over the enumerable string-keyed properties of an object.
Here's how it works for the selected line:
  • for (const itemName in gameData.loot.item):
    • This statement tells JavaScript to look at every property (key) within the gameData.loot.item object.
    • For each property it finds, it assigns the name of that property (which is a string) to the itemName variable for that particular iteration of the loop.
    • So, if gameData.loot.item contains { "beer": { ... } }, in the first iteration, itemName will automatically be assigned the string "beer". If there were more items, like "potion", itemName would then be "potion" in a subsequent iteration.
The same logic applies to equipmentName in the loop above it:
  • for (const equipmentName in gameData.loot.equipment):
    • This loop iterates through the properties of gameData.loot.equipment.
    • For each property, its name (e.g., "party nose") is assigned to the equipmentName variable for that iteration.
So, equipmentName and itemName are implicitly defined and updated by the for...in loop itself with the property names (keys) of the objects they are iterating over. You don't need to declare them beforehand because the const keyword within the loop declaration handles their scope and assignment for each iteration.



Me:
I do use the "itemName" and "equipmentName" in my code already, for other funtions. Will that not clash?

GEMINI:
Show thinking

You're asking if using itemName and equipmentName in other functions will cause a clash, given how they are used in the getAllLootCardNames function in the Canvas.
No, it will not clash. Here's why:
The const keyword, as used in for (const itemName in gameData.loot.item), creates a block-scoped variable. This means that itemName (and equipmentName) only exist and are accessible within the curly braces {} of their respective for...in loops.
Once the loop finishes, those specific itemName and equipmentName variables are no longer in scope. You can safely use variables with the same names in other functions or in the global scope without them interfering with the ones defined inside these for...in loops. Each time the loop runs, a new const binding is created for the variable within that iteration.



ME:
I thought a const binding was permanent?

GEMINI:
Show thinking

You're right to question that! It seems like a contradiction at first glance.
You're correct that a const binding is permanent, meaning once you assign a value to a const variable, you cannot re-assign that specific variable.
However, in the for (const itemName in gameData.loot.item) loop within the Canvas, a new itemName binding is created for each iteration of the loop. It's not that the same itemName variable is being re-assigned.
Think of it this way:
  • Iteration 1: A new const itemName is created, and it's assigned the value of the first property name (e.g., "beer").
  • Iteration 2: The itemName from the previous iteration goes out of scope, and a new, separate const itemName is created for this iteration, assigned the value of the next property name (e.g., "potion" if it existed).
So, while each individual const itemName binding is permanent for the duration of its single loop iteration, a brand new const variable is declared and initialized for every subsequent iteration. This prevents re-assignment errors and allows const to be used safely within loops like this.



ME:
But in my code, I use "var itemName = lowerCommand.substring(6);"
That isn't conflicting at all?

GEMINI:
Show thinking

No, that is not conflicting at all.
Here's why:
  1. const itemName in getAllLootCardNames() (the function I provided): This itemName is declared with const inside a for...in loop. Variables declared with const (and let) are block-scoped. This means they only exist and are accessible within the curly braces {} of the block where they are defined (in this case, the for loop). A new itemName variable is created for each iteration of the loop, and it ceases to exist once that loop iteration is complete.
  2. var itemName = lowerCommand.substring(6); (in your existing code): This itemName is declared with var. Variables declared with var are function-scoped (if declared inside a function) or global-scoped (if declared outside any function). This itemName exists and is accessible throughout the entire processCommand function.
Since these two itemName variables exist in completely different scopes (one is confined to a loop block, the other to a function), they do not interfere with each other. They are treated as separate variables, even though they share the same name.



ME:
Okay, so when it is declared within a function, it only exists within that function?

GEMINI:
Show thinking

Yes, that's correct!
When you declare a variable using var inside a function, that variable is function-scoped. This means it is only accessible and exists within the boundaries of that specific function. It cannot be accessed from outside that function.



ME:
I get it. Thanks. As you can probably tell, I am still learning. (That is why I don't allow you to alter the code for me. Then I don't learn how to do it, and I won't understand my own code anymore)

GEMINI:
Show thinking

That makes perfect sense! It's a great approach to learning to understand the code deeply rather than just having it handed to you. I'm here to help explain concepts, answer questions, and guide you through the process, so you can build that understanding yourself. Feel free to ask anything, no matter how basic it might seem.

In this example, I ask gemini to create an example of a function, so I can see how gemini does this. And as you can see, I don't just copy the code and am happy with the result, I keep asking gemini questions until I understand everything in the example they provided. Then I apply it to the actual game myself. I need multiple of those, (this one is for loot, but I need a similar one for locations and one for monsters) so I need to do this a couple of times. That is great practice, because I have to put in practice what I just learned, 3 times.

In many other cases, when I walk into an issue, I ask Gemini to identify what I did wrong. Just like here on rpgmakerweb, it is very helpful to share the console log with Gemini to have them identify the bug accurately. Of course I try to solve the problem myself first (because I do believe that is how I learn the fastest), but when I can't figure out what I did wrong, I can trust that Gemini will.

So, I didn't just make this post to share my chat history with Gemini. I want to show you how I use AI when creating the game. I don't have Gemini writing the game for me, or solve my problems for me... I ask them to show me an example, and then ask questions about the things that confuse me.

Before I had to google my questions, and if the answer was not clear enough for a noob like me, I had to experiment or if that didn't work I had to ask people. This is the reason why I don't have any javascript related questions lately...

In this particular case, I don't use RPG maker, simply because this is to learn more about javascript. And I want to learn more about javascript so I can make more complex plugins. That is the whole reason I am doing this.

So, what I want to ask is: What do you think of the way I use AI? Because when people say they use AI to create code, then their audience often think they are taking short cuts. And is some way I do... I don't have to look up the answers elsewhere anymore. I don't have to wait for replies by members on the forums. (In at least 90% of all cases that was Caethyril, ever since I first tried to create my very own script call. Without them, I would still be eventing everything...)

And do you use AI at all? And if so, how do you use AI? Is that similar to what I do, or do you have AI generate the full code? Or the full database?

Spoiler: You can also put AI in your RPG maker game!!
Oh, and did you know it is super easy to put an api for Gemini (or chatGPT if you prefer) in your game? You need an api key for that, but it is free. You can easily have AI re-tell your dialogue. This means you only write dialogue once, but because gemini retells it, the NPC will say the same thing in a different way every time. Like, you write: "Welcome to the Central Trader. Can I help you, or are you just browsing?" AI will say: "Come in, come in, and browse my goods. Let me know if I can help you with anything." and the next time you interact with them, they will say: "Nice to see you again. Do you want me to show you todays specials, or were you looking for something in particular?"

The message stays the same, but the dialogue is completely different... I've been experimenting with this for a while, but it distracted me from my goal, so I've put it in the fridge for now. But this is another way you can use AI, while still creating your own thing. It is not like you have AI do all the work, you just integrate AI in your game without releasing you from your duties as a developer. I just LOVE this idea, specially for games with a lot of text, and I will certainly come back at this later. But for now, I will use AI to learn.

When I am ready to take the next step, I will write a detailed tutorial on how you can put AI in your game, to make dialogue more dynamic. There are a few things I have to figure out first. Like, you are required to hide the api key in a node.js server or something similar. It is rather easy to do it when the api key is in the code directly, but to hide it in a virtual server is a whole new level for me.

Ps: If you are using Gemini to learn, let Gemini know you use it to learn. Otherwise it will just rush to the solution. In my example, I asked for a funtion, because I knew it was just going to be a few lines I had to study, but for more complex questions, I specifically ask gemini to not go directly to the solution, but to take me there step by step, answering all my questions along the way. That way, Gemini is like a personal teacher.
You should probably do a javascript course then try coding on your own if your goal is to learn it. Using AI to ask specific questions is very good too, but using AI to generate the entire code and then copy or type it will not be effective for learning.

In the context of RPG maker game dev you can use AI for a lot of things: Generate backgrounds, enemy/actor sprites, actor faces/busts, dialogs, background music, sound effects, plugins, animations, translate to several languages etc. Tilesets and charsets I had no success with so far. For animation sheets you can generate a square video and get the frames you want.
I generally only use AI for translations, but I guess now every time I Google, Gemini shoves an AI answer in my face anyway.

If I need a code sample for a game, I don't need AI. if it's RPG Maker I just open one of my plugin files that I know does something similar and see how they did it. For my GDevelop game there's 100+ template projects for almost any mechanic that I can just open and grab code from.
I generally only use AI for translations, but I guess now every time I Google, Gemini shoves an AI answer in my face anyway.

If I need a code sample for a game, I don't need AI. if it's RPG Maker I just open one of my plugin files that I know does something similar and see how they did it. For my GDevelop game there's 100+ template projects for almost any mechanic that I can just open and grab code from.
Then you know more about javascript than I do. 😛 If I want to do anything, and just look at a plugin to see how they did it, it turns out they set up everything so differently then how I set things up, that it takes me ours to understand what they did. That means I need to do a lot of googling to explain the plugin I try to understand.

With AI as a tutor, I can ask everything and get a useful answer most of the times. It just sucks that I have to keep reminding AI to not do it all for me, because if I forget to mention they are not allowed to change my code, they will quietly make changes or even add a full database.

So many times I found items in my code that I never put there. Like loot chests, which don't make sense in my game at all. 😛 Or I suddenly find parts of my game in Dutch. 😛

I don't know if you did read the whole conversation with the AI (I woudn't blame you if you didn't. It's a lot) but I wonder what you think of the way I communicate with AI to achieve my goal?
I wonder what you think of the way I communicate with AI to achieve my goal?
If you need help having code (or any concept) explained and want instantaneous answers, it can be ok. Personally I take AI answers with a grain of salt and independently verify anything it tells me.

I am not amazing at javascript. I just know all the basic data types and how they're formatted. Plugins all follow the same format: declare the variables, declare the functions, then manipulate variables and properties with the functions. If I don't know where the variable or function came from or what it does I Ctrl + F it. If it's not in the plugin file maybe it's from the core engine so I search the folder where the core engine files are. If it's not there either then maybe it's a javascript method so I Google the data type and function.
I'm not a programmer, but for me it looks simillar as looking at stackoverflow. And you have a valid point of not having to wait for reply with explanation that might never come because author of the solution is no longer on that forum. I am sure that it even takes solutions from there and simillar sites. Except that AI can give wrong answers so you need to double check if it's advice actually works. AI's can be superbad for certain tasks. Like, once i asked deepseek to find a rhymes to a certain line i was struggling with, and... the results were beyond terrible. It does not understand the concept of poetry, so it's unusable for that purpose. I also once tried to ask it to find specific command in RM plugin and... it also gave me a non-working solution.
I'm not learning Javascript but here is how I learned ruby using AI.

I use Microsoft Copilot for most of my code-learning needs. Copy/pasta typically works.

You can ask it to make a simple script (or at least something with simple functionality), copy/paste it to your game, tell the AI about any errors you get, then when it works perfectly, you ask it how it works line-by-line, word-by-word like "hey, can you explain this line-by-line and word-by-word?" You can also do this by giving it an existing script you know works and asking it that way.

For example, for the longest time, I did not know how the following worked: Arguments (I only kind-of got it), Hashes, classes. I learned how hashes and classes work because I could slap in an existing script and ask it to explain to me the classes and hashes.

Now I've learned enough that copilot is relegated to cleaning up my scripts, and even then, by watching the AI do it and see it working, you can learn more efficient ways to do what you were doing which would mean you would notice the AI cleaning up less and less as you get better until you don't need it anymore. I now only ask it to do the monotonous stuff in a script where I tell it to essentially make a foundation and then I fill it in with my own code.

Now I use AI mostly to get over writer's block if anything with only the occasional coding question.


TLDR: Looking to AI for answers is fine, imo. I do recommend Microsoft Copilot for your AI needs (especially for coding). Using AI feels a bit more dynamic because you're learning as you need it which makes it easer to connect dots in the grand scheme of things on how everything relates to each other.
If you need help having code (or any concept) explained and want instantaneous answers, it can be ok. Personally I take AI answers with a grain of salt and independently verify anything it tells me.

I am not amazing at javascript. I just know all the basic data types and how they're formatted. Plugins all follow the same format: declare the variables, declare the functions, then manipulate variables and properties with the functions. If I don't know where the variable or function came from or what it does I Ctrl + F it. If it's not in the plugin file maybe it's from the core engine so I search the folder where the core engine files are. If it's not there either then maybe it's a javascript method so I Google the data type and function.
Oh yes, for the sake of sanity: Don't take anything AI says for true. 😛 Gemini even lies about my own code. Tells me there is a certain monster or for some reason often chests, which are placed in places in the game, that I left intentionally empty. My game doesn't even use chests. The only way to get loot is to defeat monsters.

Yet, if I tell Gemini that my code does not have a chest, it will even show me a snippit of my own code including that chest... Even though in my own copy of the code there is no chest. AI will tell me I am wrong, it will assure me they didn't make it up and sometimes it goes as far as to call me a liar or to tell me they "understand I get frustrated".

Yeah, you have to check everything AI tells you, cause it says a lot of bullshit. 😛

I'm not a programmer, but for me it looks simillar as looking at stackoverflow. And you have a valid point of not having to wait for reply with explanation that might never come because author of the solution is no longer on that forum. I am sure that it even takes solutions from there and simillar sites. Except that AI can give wrong answers so you need to double check if it's advice actually works. AI's can be superbad for certain tasks. Like, once i asked deepseek to find a rhymes to a certain line i was struggling with, and... the results were beyond terrible. It does not understand the concept of poetry, so it's unusable for that purpose. I also once tried to ask it to find specific command in RM plugin and... it also gave me a non-working solution.
AI taking examples of different sites might be true, when you ask for complete systems or maybe graphics or stories. It will base their complete work on excisting work. Gemini itself is already known with the full javascript library, and has it's own understanding.

The function in my example, for example, was probably just generated by gemini itself without the need to search for it. If I want to make sure, I can click "show thinking" which shows the entire thinking process before they come to the right solution. Only rarely I see it search for answers online, and those are never code-related.

DeepSearch is a great tool, to gather information. But it won't help you generating a rhyme dictionary. Even though Gemini is great for giving feedback on the poems I wrote, it doesn't seem able to understand rhyme and rhythm. They even told me the order of my words were not how people actually speak, or comma's were placed in weird places. I had to explain to AI that is done intentionally to keep the flow going.

If you do a deep search, it is also recommended to put as much detail as possible in your prompt. The more details you've put in your prompt, the better your results will be. Deep search can really be amazing, if you use it for the right things.

So yeah, I found out AI isn't the best poet as well. 😛 For programming it is a much better tool in my opinion. Probably because you don't need to have emotions and feelings to write code.

I'm not learning Javascript but here is how I learned ruby using AI.

I use Microsoft Copilot for most of my code-learning needs. Copy/pasta typically works.

You can ask it to make a simple script (or at least something with simple functionality), copy/paste it to your game, tell the AI about any errors you get, then when it works perfectly, you ask it how it works line-by-line, word-by-word like "hey, can you explain this line-by-line and word-by-word?" You can also do this by giving it an existing script you know works and asking it that way.

For example, for the longest time, I did not know how the following worked: Arguments (I only kind-of got it), Hashes, classes. I learned how hashes and classes work because I could slap in an existing script and ask it to explain to me the classes and hashes.

Now I've learned enough that copilot is relegated to cleaning up my scripts, and even then, by watching the AI do it and see it working, you can learn more efficient ways to do what you were doing which would mean you would notice the AI cleaning up less and less as you get better until you don't need it anymore. I now only ask it to do the monotonous stuff in a script where I tell it to essentially make a foundation and then I fill it in with my own code.

Now I use AI mostly to get over writer's block if anything with only the occasional coding question.


TLDR: Looking to AI for answers is fine, imo. I do recommend Microsoft Copilot for your AI needs (especially for coding). Using AI feels a bit more dynamic because you're learning as you need it which makes it easer to connect dots in the grand scheme of things on how everything relates to each other.
That is pretty much what I do with gemini, only I don't copy/paste anything. Even if I think no changes are needed, I type everything out myself. Simply as a good practice.

Like in school, making cheat notes was a good practice and if you made your own cheat notes, you probably didn't need the cheat notes anymore. Because you already know all the answers from making the cheat note.

Even the writers block, I do that as well! Well, when I have writers block, I generate audio overviews. This generates a podcost of +/- 10 minutes, which is 2 AI hosts discussing my work. It is fun to listen to, but they also point out flaws... Like when they say Pauline and Mike are brother and sister, while they were supposed to be lovers, then I know this wasn't clear enough, just to give a stupid example.

If you like to discuss your own work, no matter if it is stories, non-fictional or poems, or even a collection of all your work, I would like to do a recommendation right back: Try NotebookLM

It is an AI that ONLY uses data taken from the pieces you uploads. So no external influences. It can also quickly generate different overviews, like this:

1749491664073.png


This is an overview of the data in my own game, but this can be used for schoolbooks, whitepapers, newspapers, speaches, poem bundles, tongteksts... anything that is written down. And this is just one of the many different overviews it can give.

NotebookLM also has the audo overview, which is exactly the same as in gemini, but this time doesn't use any info that you didn't provide.

I don't understand the TLDR, since you reply completely on topic. 😛

You should probably do a javascript course then try coding on your own if your goal is to learn it. Using AI to ask specific questions is very good too, but using AI to generate the entire code and then copy or type it will not be effective for learning.

In the context of RPG maker game dev you can use AI for a lot of things: Generate backgrounds, enemy/actor sprites, actor faces/busts, dialogs, background music, sound effects, plugins, animations, translate to several languages etc. Tilesets and charsets I had no success with so far. For animation sheets you can generate a square video and get the frames you want.
Oh sorry, I missed your reply the first time... Yeah, I don't copy/paste. There is no learning in that. And to follow online tutorials was never my thing.
Can you check spelling and grammer for me?


  • line 26: "rhe player" should be "the player"

  • line 40: "avarage" should be "average"

  • line 40: "three feet, they are stronger" should be "three feet, they're stronger"

  • line 42: "comes handy" should be "comes in handy"

  • line 42: "That comes handy when they need to flee. They have +1 for all dice rolls." should be "That comes in handy when they need to flee. They have +1 for all dice rolls."

  • line 45: "dwarves. They can not wear large, heavy, or two-handed weapons." should be "dwarves. They cannot wear large, heavy, or two-handed weapons."

  • line 46: "creatue" should be "creature"

  • line 50: "lenght" should be "length"

  • line 55: "nonsemse" should be "nonsense"

  • line 57: "The teddy bear just lies there while you wait for your penalty. You wonder how you could have lost a fight against a teddy bear. You've once seen a baby beating up a teddy bear using another teddy bear as a weapon, yet you lost from such a teddy bear. Nothing really happens, but this knowledge should be punishment enough." should be "The teddy bear just lies there while you wait for your penalty. You wonder how you could have lost a fight against a teddy bear. You once saw a baby beat up a teddy bear using another teddy bear as a weapon, yet you lost to such a teddy bear. Nothing really happens, but this knowledge should be punishment enough."

  • line 61: "clown... But I guess that was what you are going for?" should be "clown... But I guess that's what you're going for?"

  • line 67: "excisting game" should be "existing game"

  • line 67: "usen when equiped" should be "used when equipped"

  • line 79: "equip the ${itemName}, before you can use the ${itemName}" should be "equip the ${itemName} before you can use it"

  • line 113: "thousand years. Legend tells those dungeons" should be "thousand years. Legends tell those dungeons"

  • line 114: "terrifying" should be "terrifying."

I do not agree to all the pointers they have. I mean, "they are" is not wrong, AI just seems to prefer "they're". And there are a few similar cases. I don't agree with line 79 either... Repeated use of the ${itemName} was intentional. It's not a grammar or spelling issue. Other than that, I love to use the AI to point out my mistakes like this. I rather have AI find them all at once, then players finding them one by one...
When it comes to learning a coding language, I recommend to do an online/youtube course. There's loads of free resources for javascript, and it's really easy to learn.

As for ownership, I accept that the work you made is yours. At the end of the day, you are using AI to help understand the code you write. The most important thing is consideration, which I can tell that you have given a lot of.
When it comes to learning a coding language, I recommend to do an online/youtube course. There's loads of free resources for javascript, and it's really easy to learn.
But why? If this seems to work for me, why am I supposed to do a course? I can't ask questions to a youtube video. Everything question I get from watching a video, means I have to google more and more. So, why would a youtube tutorial or an internet course be better?

The thing is... When I tried learning javascript through video's, I lost interest, because the video's didn't show me what I wanted to know at that moment. It is really, really hard to find a tutorial that explains exactly what I was looking for at that moment. In so many cases, I watched a 1.5 hour tutorial, and in the end still didn't know what I was looking for.

I learned everything in RPG maker by experimenting. And sure I google my questions every now and then, and I even have to ask for help once in a while, but I don't think I would have been able to create the systems I've created in the past, if I learned it all from tutorials.

No, I absolutely prefer learning through AI over learning through tutorials en video's. The only thing that would be better (for me) than an AI teacher, would be an actual personal teacher, who'd be ready to help me 24/7.

I do understand how others have great support from tutorials and such, but that isn't me.

As for ownership, I accept that the work you made is yours. At the end of the day, you are using AI to help understand the code you write. The most important thing is consideration, which I can tell that you have given a lot of.
Yeah, that I completely agree with. I communicate with AI as with a teacher. A good teacher will give examples, and from that example the student learns before they try to do it themselves.

And my golden rule is: If I don't understand the code, I won't use it. Even a single line... If I don't know what it does, then it is not going in my code. 😛 Like, in the conversation in the first post, the AI wrote me an example function, which I didn't completely understand. So I ask the AI to explain the lines, before I can be able to use it.

The thing is, if I would copy/paste it over, without knowing what every single line does, I would have to ask AI again, when needing a similar code, and again, and again.
Learning javascript is not the correct mindset, if I may.
You need to learn "how to code"

javascript is a language, so is Lua, Python, C++
The difference between them is not the way you code (well, minor differences, but hey) but the syntaxes they are using.

I think AI is good at patching knowledge gaps (very good for syntaxes when you need to find any), but for the pedagogic aspect courses might be more helpful, as they guide you through "really understanding" how code works and why it works rather than simply giving you the code you need.

If you'd speak french, I would totally recommend sites like "Gamecodeur.fr"
But there are alternatives in English such as "GameDev.tv"


And on the core of the question : "Yeh, it's totally possible to use AI and build your own thing"
AI's code is just that, code 😀
Learning javascript is not the correct mindset, if I may.
You need to learn "how to code"

javascript is a language, so is Lua, Python, C++
The difference between them is not the way you code (well, minor differences, but hey) but the syntaxes they are using.

I think AI is good at patching knowledge gaps (very good for syntaxes when you need to find any), but for the pedagogic aspect courses might be more helpful, as they guide you through "really understanding" how code works and why it works rather than simply giving you the code you need.

If you'd speak french, I would totally recommend sites like "Gamecodeur.fr"
But there are alternatives in English such as "GameDev.tv"


And on the core of the question : "Yeh, it's totally possible to use AI and build your own thing"
AI's code is just that, code 😀
While I read this comment, I am on the phone with my nephew, talking about coding and programming, and we just came to the exact same conclusion, right before I opened this reply.

Timing? Or a higher connection between geniuses?
I asked GPT a very specific question with as much detail about the context as I could give it, to show me how to build an entity in Hammer (which I've been using since 2005).

it suggested I use an entity which doesn't exist.

I corrected it twice about the wrong entity.

It acknowledged it being wrong, showed me a completely wrong solution, which I also corrected, and it doubled back to suggesting me the non-existant entity again.

I spent a whole week trying to crack that problem, by visiting various sites and asking all variations of the same question to different modders.
I ended up tinkering with Hammer for a whole day until I figured it out, and it only works because of a weird quirk with the software.
I'm never bothering asking GPT anything important again. Either it can be done, or it can't. The only way to find out is to break the system.
Whahaha. Yeah sometimes it s not responding the way we hope. O... and AI lies... A lot!! Gemini tells me Biden is president, and when I tell them that Trump is president, they tell me I shouldn't spread fake news. 😛

Or sometimes they tell me something about me own code, which I know is wrong. They keep imagining loot chests in my game, that really do not exist. When I tell them there is no loot chest in my game, they say that I am wrong, and even show me a snippit of my code including the loot chest, which isn't actually in my code.

They show me an edited snippit from my own code, to proof itself right. It lies about my own code, and forges proof to back it up. Yeah... AI is gonna kill us all.
Personally, I don't think using AI for code is a shortcut; in fact I think it's usually more time consuming and tedious than learning to code yourself, due to how often AI messes up.

The thing is... When I tried learning javascript through video's, I lost interest, because the video's didn't show me what I wanted to know at that moment. It is really, really hard to find a tutorial that explains exactly what I was looking for at that moment. In so many cases, I watched a 1.5 hour tutorial, and in the end still didn't know what I was looking for.

In cases like this, I'd suggest looking up the specific keywords/syntax relevant to what you're trying to do, on like w3schools or something. Much faster, and you can just ctrl+f the parts you need.
w3school is very awesome, and I think I used that one even back when I tried to make my first HTML table back in the dark ages. But now, with AI, I get a similar answer, and if I don't understand their solution, I can directly ask specifically about the part I don't understand.

Here is how I used to learn:

Step one: I try something with the knowledge I already have.
Step two: If that fails, I search google, and try again.
Step three: Ask you guys for help.

Then it shifted:
Step one: I try something with the knowledge I already have.
Step two: If that fails, I search google, and try again.
Step three: Ask AI for help. (Faster answer, and I can ask as much as I need)

Then I started to skip step 2... AI turned out to be a great teacher, at least for me, and I learn javascript faster than ever before.

But, please note: Even though I write this whole project to learn javascript, and I use AI to do learn it, it doesn't mean I let AI just do everything. Step one is still the most important learning step for me. Pretty much everything I learned about RPG maker, I did by trying, experimenting, failing and trying again. And by doing that over and over again, I taught myself to event things that even I thought was impossible with just eventing. That knowledge plus the yanfly library was all I needed to make everything I could think of, for a long, long time.

I never really watched tutorials. I can't learn following a program or listening to tutors... I learn to try. I learn to do. If I want results, I won't stop until I get results. If I fail, I try again. If I'm stuck, I keep breaking my brains until I get it done. There is a name for that: Autodidact. (A person who teaches themselves) And funny enough, I didn't teach myself that term, I was taught that in school, when teachers explained I am Autodidact. 😛
See, things like this just go so much faster when using AI.

Me:
I am creating a plugin for RPG maker, and I try to use the Fisher-Yates shuffle algorithm to shuffle an array, but it doesn't work. What am I doing wrong?
(Code provided was removed from the message to make it about 2000 lines shorter.)

AI:
I looked at the code you provided, and I see a small issue in your shuffleArray function that's preventing the Fisher-Yates shuffle from completing.
Here's the problem:
In your shuffleArray function, you have return array; inside the for loop. This means the function will return after the very first swap, only shuffling one element and leaving the rest of the array unchanged.
To fix this, you just need to move the return array; statement outside of the for loop, so it returns the fully shuffled array after the loop has completed all the necessary swaps.

I just couldn't find the problem. And the worst is... I've used this algorithm a lot the past few weeks... So I should have been able to fix it myself, but I just didn't see the mistake. (Which was 2 lines being swapped around. I probably hit alt+↑ by accident, which moves the current line 1 line up in VS Code.)
I'm using AI to assist me with my game as well. I'm not a coder, though, and some peeps that have tuned into the streams when I brought it up also advised against it, so I figured: "If it's a tool, how can I utilize it given what my strengths are?" So, I figured that if I am already proficient in creative writing and similar tasks, I could relegate them to menial tasks, such as databasing skills and weapons, and focus on refining my speeches. Additionally, I could get proofreading done and verify that my story beats flow thematically as I think they do. End of the day, I think it boils down to if you are using it like a tool or like a servant, if that makes sense?
I like to use AI mostly as having someone to talk about my project. It helps me keep motivated.

When I am not at my computer, working at my code, I have Gemini on my headset so I can discuss the code or the story I am working on. And I tweaked the AI to not be positive all the time. I want it to point out my flaws. (Something you specifically have to ask for, or it will say everything is fantastic)

There is a huge difference between using it as a debug and feedback tool and using it to write the code or story for you.

For the longest time I didn't want to use AI, because I thought it would just generate the code for me and that isn't what I want. Now I know AI can do so much more.

Original thread: https://forums.rpgmakerweb.com/threads/working-with-ai-but-still-creating-my-own-thing-is-that-possible.178215/