Points of Required Attention™
Please chime in on a proposed restructuring of the ROM hacking sections.
Views: 88,441,466
Main | FAQ | Uploader | IRC chat | Radio | Memberlist | Active users | Latest posts | Calendar | Stats | Online users | Search 04-20-24 10:32 AM
Guest: Register | Login

0 users currently in ROM Hacking | 4 guests

Main - ROM Hacking - Super Mario Kart AI New thread | New reply

Pages: 1 2

Xkeeper
Posted on 04-06-07 12:54 AM (rev. 2 of 04-06-07 01:19 AM) Link | Quote | ID: 23795


Level: 105

Posts: 1230/2846
EXP: 12022476
Next: 239784

Since: 02-19-07

Last post: 6054 days
Last view: 2791 days


I wouldn't be suprised if it just took the closest point and there was just some angle data otherwise to determine where to put you...

(Hell, it might even use the angle data to determine where to look for the next point, in case it gets lost..!)



(For those wondering, the lines are connected based on one check;

"Is the distance between the current point, and the previous point, greater than the current point and two points ago?"

Hence why 26-29 looks screwy. I'm sure it actually goes 26-28-29 and 25-27-29 but this won't ever determine that... )

____________________
I dealt with it.

Ninetales
Posted on 04-06-07 09:47 AM (rev. 2 of 04-06-07 12:17 PM) Link | Quote | ID: 23996


Panser
Level: 42

Posts: 175/338
EXP: 492049
Next: 29313

Since: 02-19-07

Last post: 5505 days
Last view: 4903 days
Does anyone know what the pointertable at 0x2019B is for? It's obviously AI/Lakitu-related, because editing the data pointed to/changing the pointer makes the AI act oddly, and sometimes crashes the game...

Edit:
Posted by GlitchCog
But there are issues with having different starting locations that don't match up, so I haven't had a successful AI track swap yet.
Swap the corresponding track pointers in both the pointer table at 0x2019B and at 0x201CB and the AI will follow the track that you've changed the pointers to perfectly, starting from the point nearest the starting line of the track you replaced.

i.e. change CB 0E at 0x201A9 (pointer for track 07, MC1) to 73 15 (pointer for track 0D, KB1) and change 5A 0F at 0x201D9 (pointer for track 07) to 26 16 (pointer for track 0D) and the CPU racers will turn around and race along the path of Koopa Beach 1.

Now if only the format of these second data clumps was known...

dirtbag
Posted on 04-06-07 10:29 PM (rev. 2 of 04-06-07 10:31 PM) Link | Quote | ID: 24128


Red Koopa
Level: 27

Posts: 25/128
EXP: 114623
Next: 1536

Since: 02-24-07

Last post: 3181 days
Last view: 3094 days
Posted by Ninetales
Does anyone know what the pointertable at 0x2019B is for? It's obviously AI/Lakitu-related, because editing the data pointed to/changing the pointer makes the AI act oddly, and sometimes crashes the game...


I don't think it has anything to do with Lakitu and his drop off points. It also does not seem to effect the track's item layouts or the location of the start finish line. The only thing it does do as you noted is either make the AI go crazy or crash the game when the track is loaded.

Xkeeper
Posted on 04-06-07 11:07 PM Link | Quote | ID: 24137


Level: 105

Posts: 1238/2846
EXP: 12022476
Next: 239784

Since: 02-19-07

Last post: 6054 days
Last view: 2791 days
One thing I've noticed is that the finish line is always between the last two points on the AI map, and always in a straight line (based on two courses only, this is obviously inconclusive)

It may simply be that which determines the location?

____________________
I dealt with it.

Sukasa
Posted on 04-07-07 08:12 AM (rev. 2 of 04-07-07 08:12 AM) Link | Quote | ID: 24286


Red Birdo
Level: 92

Posts: 136/2112
EXP: 7685679
Next: 71258

Since: 02-19-07

Last post: 4442 days
Last view: 3213 days
Interestingly, if you move point 16 on Koopa Beach 1 down 4 X points, the CPUs will almost always take the bottom path. If you switch 15 and this 16, the CPus will drive to 15, then to 16, then to the nearest next point, 17 or 18. Ninetales and I fiddled aroud to find this out.

Ninetales
Posted on 04-07-07 11:33 AM (rev. 2 of 04-07-07 11:33 AM) Link | Quote | ID: 24298


Panser
Level: 42

Posts: 181/338
EXP: 492049
Next: 29313

Since: 02-19-07

Last post: 5505 days
Last view: 4903 days
Posted by Xkeeper
One thing I've noticed is that the finish line is always between the last two points on the AI map, and always in a straight line (based on two courses only, this is obviously inconclusive)

It may simply be that which determines the location?
This doesn't determine the location, no, but if the last point isn't directly in front of the finish line some of the computers will drive backwards around the track instead of forwards as they should. It's kind of odd, really.

duffjr
Posted on 04-15-07 07:52 AM (rev. 2 of 04-15-07 07:55 AM) Link | Quote | ID: 26852


Micro-Goomba
Level: 11

Posts: 1/16
EXP: 5045
Next: 940

Since: 04-15-07

Last post: 4547 days
Last view: 4547 days
Do you have a list of where the starting line data is located? I'd really like to use that, so I can race a track backwards. There should be two values for this: one which tells where the drivers should start and the other which tells the boundaries of the starting line, extending towards the walls.

dirtbag
Posted on 04-15-07 01:19 PM Link | Quote | ID: 26882


Red Koopa
Level: 27

Posts: 29/128
EXP: 114623
Next: 1536

Since: 02-24-07

Last post: 3181 days
Last view: 3094 days
I don't understand why you would move the start/finish line to race backwards. Or you plan to move the line to the other side of the starting grid?

Or do you mean you plan to make a mirror mode?

Anyway I don't think that anyone knows where this data is stored yet. I hope I'm wrong tho'

duffjr
Posted on 04-15-07 09:44 PM Link | Quote | ID: 26968


Micro-Goomba
Level: 11

Posts: 3/16
EXP: 5045
Next: 940

Since: 04-15-07

Last post: 4547 days
Last view: 4547 days
yea, the problem is all the courses that start on the left don't go to the extreme right where the courses that start on the right begin and finish, so there would be crazy lapskips and laps that wouldn't count if i switched up the courses; although there are exactly 10 that go left to right and 10 that go right to left, with the one problem being position and not direction.

GlitchCog
Posted on 04-16-07 03:58 PM (rev. 2 of 04-16-07 04:00 PM) Link | Quote | ID: 27259


Micro-Goomba
Level: 9

Posts: 4/11
EXP: 2878
Next: 284

Since: 04-03-07

Last post: 6165 days
Last view: 6143 days
I think this is all the AI data now. Before each AI track map is dirtbag's angle (?) data with an unknown format. It's touchy, so you can crash the game when it tries to load the track if you modify it incorrectly. Filling the data with zeros seems to crash it more than with FFs. (For example, change the 06 06 at 0x610CF to FF FF and the AI will mess up after leaving the first AI track point on Mario Circuit 1, but replace the 06 06 with 00 00 and it'll crash. 02, 04, and 08 seem to work well as replacements too.)

Offsets: (Including a 0x200 byte header)
0x60726 - 0x6083E Mario Circuit 3 Angle Data
0x6083F - 0x608F2 Mario Circuit 3 AI Track
0x608F3 - 0x609C6 Ghost Valley 2 Angle Data
0x609C7 - 0x60A4D Ghost Valley 2 AI Track
0x60A4E - 0x60B0A Donut Plains 2 Angle Data
0x60B0B - 0x60B7C Donut Plains 2 AI Track
0x60B7D - 0x60CBD Bowser Castle 2 Angle Data
0x60CBE - 0x60D83 Bowser Castle 2 AI Track
0x60D84 - 0x60E15 Vanilla Lake 2 Angle Data
0x60E16 - 0x60E6C Vanilla Lake 2 AI Track
0x60E6D - 0x60F47 Rainbow Road Angle Data
0x60F48 - 0x60FD1 Rainbow Road AI Track
0x60FD2 - 0x6106D Koopa Beach 2 Angle Data
0x6106E - 0x610CA Koopa Beach 2 AI Track
0x610CB - 0x61159 Mario Circuit 1 Angle Data
0x6115A - 0x611B3 Mario Circuit 1 AI Track
0x611B4 - 0x61292 Ghost Valley 3 Angle Data
0x61293 - 0x6131C Ghost Valley 3 AI Track
0x6131D - 0x6141C Bowser Castle 3 Angle Data
0x6141D - 0x614B5 Bowser Castle 3 AI Track
0x614B6 - 0x61547 Choco Island 2 Angle Data
0x61548 - 0x6159E Choco Island 2 AI Track
0x6159F - 0x61646 Donut Plains 3 Angle Data
0x61647 - 0x616AF Donut Plains 3 AI Track
0x616B0 - 0x61727 Vanilla Lake 1 Angle Data
0x61728 - 0x61772 Vanilla Lake 1 AI Track
0x61773 - 0x61825 Koopa Beach 1 Angle Data
0x61826 - 0x61891 Koopa Beach 1 AI Track
0x61892 - 0x6195D Mario Circuit 4 Angle Data
0x6195E - 0x619D8 Mario Circuit 4 AI Track
0x619D9 - 0x61A82 Mario Circuit 2 Angle Data
0x61A83 - 0x61AEB Mario Circuit 2 AI Track
0x61AEC - 0x61B8D Ghost Valley 1 Angle Data
0x61B8E - 0x61BF0 Ghost Valley 1 AI Track
0x61BF1 - 0x61CA0 Bowser Castle 1 Angle Data
0x61CA1 - 0x61D09 Bowser Castle 1 AI Track
0x61D0A - 0x61D95 Choco Island 1 Angle Data
0x61D96 - 0x61DEC Choco Island 1 AI Track
0x61DED - 0x61EA8 Donut Plains 1 Angle Data
0x61EA9 - 0x61F1D Donut Plains 1 AI Track

Sometimes the angle data fills with FFs at the end until the ai track data begins. I also expanded the area of some of the AI track offsets here to include the "FF FF 03" filler at the end of the data like Mario Circuit 3 does from 0x608B7 to 0x608F2.

As for trying to figure out the formatting...

These angle data seem to correspond with the AI track map points in order. You can divide it up to match the points using the patterns (it usually starts with a 00 and is about five bytes long), and when you mess with it, the AI will glitch out when it hits the corresponding point.

Here's how I have the angle data divided up for Mario Circuit 1 so far along with the relevant AI track points and some descriptions/angles/etc, but I still can't figure out how it works. I added some extra spaces into the data which creates some interesting vertical columns of increasing or decreasing values. Maybe it's tendencies to go left, right, up and down increasing and decreasing to create a circular track?

Anyone have any other ideas?

On a side note, there are some acceleration data for the 50cc AI controlled characters located at 0x200DB - 0x20160.

Stifu
Posted on 04-16-07 04:07 PM Link | Quote | ID: 27263


Cobrat
Level: 56

Posts: 85/666
EXP: 1360640
Next: 37536

Since: 02-22-07

Last post: 679 days
Last view: 301 days
Great work GlitchCog.
I still haven't managed to find the time to even have a look at all this...

As for my editor, it's still not much to look at for now.
I implemented all the base classes (which import pointers from the ROM and stuff), and it can also use the Lunar Compress.dll file to directly extract tracks from the ROM, but that's it... I haven't started work on the graphic interface yet, and that's what's blocking me for now (I'm most likely going to use Visual C++ 2005 to build it).
Only one month before deadline (I'm probably not going to implement AI support in the version I'm going to present at the university)...

dirtbag
Posted on 04-16-07 07:26 PM (rev. 3 of 04-16-07 08:02 PM) Link | Quote | ID: 27279


Red Koopa
Level: 27

Posts: 31/128
EXP: 114623
Next: 1536

Since: 02-24-07

Last post: 3181 days
Last view: 3094 days
Awsome work GlitchCog.

Time to start playing around again I guess!

GlitchCog
Posted on 04-17-07 04:14 PM Link | Quote | ID: 27617


Micro-Goomba
Level: 9

Posts: 5/11
EXP: 2878
Next: 284

Since: 04-03-07

Last post: 6165 days
Last view: 6143 days
The southern island track split on Koopa Beach 1 has some interesting stuff in it. I added the Koopa Beach 1 data to http://matt.yanos.com/smk_ai_data.html.

This is the order it's in, both on the AI track map and this unknown data, where it alternates between the top track and the bottom track.

00 2C 2B 05 10 - Last point before the split

00 24 2A 08 06 - Top track
00 24 30 08 09 - Bottom track

00 1F 26 05 0B - Top track
00 1F 31 05 0D - Bottom track

00 1B 25 04 0C - Top track
00 1B 34 04 0B - Bottom track

00 16 25 05 0E - Top track
00 16 35 05 0B - Bottom track

00 10 29 06 0B - Top track
00 10 34 06 0B - Bottom track

00 0C 2D 04 07 - Top track
00 0C 34 04 09 - Bottom track

00 08 2D 04 10 - Point that joins the split tracks back together

So for the split tracks the same data is used for the second and fourth bytes for coupled points.
Here's a picture of the split with the unknown AI data next to the points it goes with.

Also, I've noticed that messing with the last byte of each of these points tends to mess with the graphics for on-track items. Would sprite pointers for bananas and shells be hidden in the AI data?
Pages: 1 2


Main - ROM Hacking - Super Mario Kart AI New thread | New reply

Acmlmboard 2.1+4δ (2023-01-15)
© 2005-2023 Acmlm, blackhole89, Xkeeper et al.

Page rendered in 0.027 seconds. (340KB of memory used)
MySQL - queries: 87, rows: 119/120, time: 0.017 seconds.