Post subject: Question on optimizing 3D games
Skilled player (1707)
Joined: 9/17/2009
Posts: 4952
Location: ̶C̶a̶n̶a̶d̶a̶ "Kanatah"
For anyone who has/are TASing 3D games (Super Mario 64 type of 3D, not N3DS), how exactly do you optimize movement? Currently, for things like general gameplay, I play through it slowly in real time, then based on the time obtained from that, slowly reduce it with savestates/frame advance. For things like turning, I focus on one turn at a time (rather than focusing if it slows down several turns/corners later). I'm aware this approach has flaws; for the former, any TAS-only tricks would be mostly infeasible even at slow-motion without frame precision/luck manip, and for turning, something fast for 1 turn may be slower overall. Also things that require constant changing directions mess it up. I want to improve upon this, but I'm having difficulty finding a better approach. Tl;Dr - How do you folks optimize 3D game movement efficiently?
Editor, Skilled player (1506)
Joined: 7/9/2010
Posts: 1317
Optimizing the general movement in "3d" game is a problem is most of the time a problem with two optimization parameters (X and Y coordinate), sometimes a third parameter is there, e.g. when there's non-constant jumping height or flying freely on all 3 axises. Going from one place to another is an easy problem, even with an crazily rotating camera. Most of the time you only need to work on one frame, it's very unlikely that a frame will saved by going into a suboptimal angle initially or manually rotating the camera. Since most TASers only use the very outer range of the analog stick to adjust angles, their work is not as optimized as it could be. Using all coordinates on the analog stick doesn't make it any harder, you just use a line drawing algorithm on the analog stick to calculate the next x,y pair. While going around corners you need to test two scenarios: let speed drop to go in a tighter angle or don't let speed drop. Both can be done by the same algorithm as above. For the latter you try the most tight angle that doesn't drop speed, for the first you need to decide when an how much speed should be dropped. You should consider the level layout as well when deciding which approach you want to make.
Favorite animal: STOCK Gt(ROSA)26Sortm1.1(rtTA,EGFP)Nagy Grm7Tg(SMN2)89Ahmb Smn1tm1Msd Tg(SMN2*delta7)4299Ahmb Tg(tetO-SMN2,-luc)#aAhmb/J YouTube Twitch
ALAKTORN
He/Him
Player (99)
Joined: 10/19/2009
Posts: 2527
Location: Italy
You TAS 3D games the same way you TAS 2D games. RAM Watch and Lua. Get model angle, motion angle, XYZ, XYZ speeds and then for good measure use a Lua that calculates the difference between XYZ pos between 2 frames to see how much you’ve moved. Find the angle that is the straightest and optimize speed for it, if you have to go around a turn figure out how to do that in the best possible way based on your game’s limitations.
Mitjitsu
He/Him
Banned User, Experienced player (532)
Joined: 4/24/2006
Posts: 2997
For basic movements, if you want to efficiently find the optimal way to hold the analogue stick. You should be able find it within 6-7 attempts. Firstly, you need to estimate within 45 degrees which direction to move in. I'll give you a working example, we'll assume the optimal angle is 6 degrees, but we've yet to figure this out. First try zero degrees Second try 23 degrees Third try 12 degrees fourth try 6 degrees After going through that process, you're going to want to test 5 and 7 degrees. Before concluding 6 degrees is optimal. Hopefully, you'll see by using a mixture of approximation and division you can figure out any angle fairly quickly. Admittedly, that advice is pretty basic. In reality you're going to want obtain memory addresses which provide you with both the speed and direction you're character is facing.