Gran Turismo 4

  • Thread starter Thread starter Jonhline
  • 12 comments
  • 884 views
So this isn't coded with Ai?
Screenshot_20261013_011954_Firefox.webp

If so it might be worth advertising this since so many AI projects have came out recently. The possibilities of new cars and tracks are interesting and as good as GT4 can look nowadays I'm sure graphics improvements will be really nice.
 
So this isn't coded with Ai?
View attachment 1570946
If so it might be worth advertising this since so many AI projects have came out recently. The possibilities of new cars and tracks are interesting and as good as GT4 can look nowadays I'm sure graphics improvements will be really nice.
They upfront disclosed it was on the top of the repo's README.md:
The project is developed with heavy AI assistance.

The issue here, as with most recomps/"fan ports" that had "heavy AI assistance" like this, is that it ends up producing sloppy, spaghetti code that no outsider developer can understand to debug/analyze.
 
Last edited:
Certainly interesting how the line "No emulation" is used but there's a source file dedicated to Emotion Engine functionality (src/ee/ee.h) and EE syscalls all over the place. Why would you need that if you're actually porting the game to native code? Could we perhaps get a non-AI explanation of why?
 
Certainly interesting how the line "No emulation" is used but there's a source file dedicated to Emotion Engine functionality (src/ee/ee.h) and EE syscalls all over the place. Why would you need that if you're actually porting the game to native code? Could we perhaps get a non-AI explanation of why?
Fair question, src/ee is just for testing. I use it to run the original PS2 code and compare the results with my C version. The actual game doesn't use it. Some stuff like physics still uses the PS2 memory layout to make comparisons easier.
 
I must say I'm impressed if you can read and work with that code, as in my eyes it's minified to the point of unreadability with plenty of magic numbers and unnamed offsets in structures. Also, what's up with comments in the code like: 'Parts not rewritten yet run the original'?

You've also got bits and pieces scattered around that aren't actually from the game or even correct, like the 'ASSIGN_OLD' name for one of the adhoc instructions that was implemented by Nenkai in his disassembler to disambiguate it from an instruction in later versions, which is surely clear from just reading the name. What proportion of the code have you written yourself, and what's your own level of understanding of the internals of GT4?
 
I must say I'm impressed if you can read and work with that code, as in my eyes it's minified to the point of unreadability with plenty of magic numbers and unnamed offsets in structures. Also, what's up with comments in the code like: 'Parts not rewritten yet run the original'?

You've also got bits and pieces scattered around that aren't actually from the game or even correct, like the 'ASSIGN_OLD' name for one of the adhoc instructions that was implemented by Nenkai in his disassembler to disambiguate it from an instruction in later versions, which is surely clear from just reading the name. What proportion of the code have you written yourself, and what's your own level of understanding of the internals of GT4?
Thanks for the feedback, and sorry about the state of the code, you’re right about it. I’m honestly not very experienced with reverse engineering, I just really love this game and got a bit carried away. I’m already working on changes to make the code readable and easy to maintain without AI. I’d really appreciate a chance to show it can get better. I’m focused on making this a good project and bringing real improvements to the game, like new features down the line. Thanks again!
 
I’m honestly not very experienced with reverse engineering, I just really love this game and got a bit carried away. ... I’m focused on making this a good project

Not to be rude, but my biggest advice to make a project like this something genuinely of quality is to spend some time learning and getting really proficient in games development, C programming, and reverse engineering, then coming back and tackling it from scratch with your own knowledge. It will take years, but the only way to write quality and maintainable software is if you yourself fully understand the architecture of the application and the purpose of every line of code. If you take shortcuts and have a machine generate code instead, you won't be able to accurately judge whether that code is any good or not, fundamentally undermining all of your efforts.
 
Not to be rude, but my biggest advice to make a project like this something genuinely of quality is to spend some time learning and getting really proficient in games development, C programming, and reverse engineering, then coming back and tackling it from scratch with your own knowledge. It will take years, but the only way to write quality and maintainable software is if you yourself fully understand the architecture of the application and the purpose of every line of code. If you take shortcuts and have a machine generate code instead, you won't be able to accurately judge whether that code is any good or not, fundamentally undermining all of your efforts.
I completely agree with this. While the idea of a reverse engineered GT4 really excites me. We can already play GT4 perfectly fine on PC via emulation. So, to make a reverse engineered version of the game truly worthwhile, the code needs to be written and structured in a way that other people (not AI) can read, understand and edit it. That way, you can end up with a version of that game that can break the limits native to the PS2. A GT4 where you can have larger grids, no limit to the number of events. Import completely new car and track models and so on. When this finally does happen, it will be amazing, and I really hope you @Jonhline manage to achieve it one day.

Your best bet is to learn the code yourself. AI can make a lot of what I said above happen, but it will be an unreadable mess and you'll have to fudge the code with AI again and again to make every change you want. It won't be an open platform that other people can mod and add to. AI can certainly help, it can help you find errors, it can help you learn, but if it writes everything for you it won't.

I've used AI to help when I'm doing backend work on our workflow software at work, as I'm not a programmer and everything I learn about programming (which is fairly limited) is fully self taught. But when I need to change something and I don't know how, I research what I want to do and how to do it, I write the code and functions, then if it doesn't work I try to fix it. Depending on how I'm doing, at some point I may paste the code which I've written that I'm struggling with into an AI for suggestions. But the key is, I wrote the code and I understand the changes the AI is suggesting as a result. Some people may frown on that, but that's where I personally find the benefit of AI without it just creating something I don't understand and can't learn from.
 
Thanks for the advice and for taking the time to look through the code. I understand your concerns, and I know there's still a lot for me to learn. I've decided to take OpenGT4 out of the public eye and keep it as a personal hobby project, where I can continue learning at my own pace and enjoy playing the game. Thanks again for the feedback!
 
Back