AWS Logo
Menu
Smashing Potato

Smashing Potato

A tribute game develop entirely by Amazon Q

Published Jan 13, 2025
I
I started my journey with a clear goal, well first issue arouse, - a bit of context I am using VSCode with the extension Amazon Q, not sure why it does not provide an answer if I don't have an workspace open??
Let's start again ...

...
I forgot something I am broke :)
Adding a bit of related info:
I was thinking about Smashing Potato a game made for children with a bit of education purpose in between...
Smashing Potato

Aaaa ok that is a start ...
It does not move it does nothing but roll the obstacles..
V0.1 is A bit better but the main features don't work the:
- currently, only the jumper the bar works, and the bar comes from the right to left
- collisions must kill or restart the game - the game works indefinitely
- we must save the progress for multiple users at the end of the game

v1 is somehow finished the problem is that it is a single file logic that is difficult to expend and you cannot go to the next level as it gets stuck
The game is deployed at https://constantinpricope2013.github.io/aws-game/ using Github Pages recommended by Amazon Q as a free tool and the code is available at https://github.com/constantinpricope2013/aws-game/tree/main (on main branch)
Let's go a bit further and ask for a nice organization so we can separate each component of the game. Let's go with version 2 and try to create a real live project. I started with a nice structure ... Unfortunately although other times the assistant Amazon Q let me do it - it did not provide the changes view that it usually gives:
That is a nice structure. The problem is that there were a lot of empty files, the logic was totally missing, and the game did not work at all.
That is in theory not an issue as long as you have an AI assistant.
Well, it is...
This is where Amazon Q broke my heart.
Amazon Q 💔I
It looks like the assistant if I tried to select and refactor something directly refactor the code, the problem is that it did not allow me to specify what should be refactoring.... So how does the AI assist refactors if it does not know what to refactor???
My previous ex the Github Copilot(the VSCode extension) did a better job to be honest as it allows to select code and tell how to refactor.
The good news is that on adding code (a small addition of a function) Amazon Q gave the impression that is more accurate in the generated code.
So far so good let's see how it handles in the chat 'requests from clients', well again not so good, on every file missing that I ask to fill in it changes the structure, the architecture, and the coding style, and it is not aware of the context provided by the so for example instead of this.game.isRunning is looking at this.isRunning and uses that in the code generated so basically it creates a lot of bugs...
Ok, let's try and use it as an assistant to guide me rather than lead me and try to fix the errors...
Well when for example running and provided the error the assistant fails to give the reason behind the error. Even if it gives the reason it provides a lot of changes instead of focusing on the class function and why is happening so to be really specific it usually provides a long list of changes that require code style, and architecture changes. It changes some pieces of code that are not entirely dependent on the error and fails to understand the workspace/ the project that is already over my disk and to change just the line that has the bug.
When creating big chunks of code it fails to implement all the methods/functions that the code generated is calling....
When the bug is cross files with different functions and it requires multiple changes it is impossible to fix it with the help..
We fix the game and try and make it a customizable player. The good part is that the panel was added as it should but still had a few errors which I fixed ....

After a few fixes, the player customization worked as it should (basically commands) was able to pick a color to change expressions/faces quite a few things...
But this change requires my intervention a lot ...
I tried and make running game but at this points I think I completed all the aspects that I could with the Amazon Q. I completed the survey from the competition and I think there is quite a few important aspects that could definitely improve. In both cases Amazon Q and Copilot I don't get why they are not aware of the architecture, coding styles, the structure of the projects, I mean there are other extensions that let you easily navigate from definitions to function calls over the entire project and can prompt you with the correct path imports without making mistakes as each of the assistants does.
It helps in some way as is a good way of asking for info but in regards to helping the code is limited.
That's it, folks
 

Comments