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:
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.)
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?
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.
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:
- I want to create the game myself. I don't want an AI generated game.
- I create this game to learn javascript. And I won't learn from copy/pasting.
- I want to understand every single line of code in my own game,
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.)
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?
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.
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.