Player (203)
Joined: 1/24/2011
Posts: 108
Layla is a classic Famicom game that is kind of like a mashup of Atlantis no Nazo and the anime Dirty Pair. You play as a cute space girl shooting everything that moves on eight different asteroids in a quest to save your partner Iris and defeat some mad scientist. There are lots of secrets in this game, many of which are timesavers. For my test run, my plan is to get as many Roller Skate items as I can ASAP. Each one you get raises your maximum running speed, and you can have up to ten, so there's no reason not to stock up. As far as weaponry goes, I intend to get weapons that don't require me to go too far out of my way. Having too many different weapons makes switching between them take longer, though. I did a quick test run of the first stage, Asteroid 1: check it out on YouTube if you're interested. Here are some of my notes on it: I get my first two speed-ups by destroying some crates with a grenade. It takes a little time to wait for it to explode, but I think the long-term advantage of extra speed will make up for it. Getting power-ups can be frustrating because the game sometimes doesn't let you pick them up when you're right on top of them. You have to stop and turn around and/or jump in order to grab them. Hopefully there's some technique to get by this. I get my second set of skates right after riding the elevator to the base. I also perform a wall jump because whatever I do I have to lose momentum at that point, and walljumping appears to be the fastest technique to use there. In the next room, I shoot a path through a wall and get more skates and some weapons. I have to stop in order to pick up the weapons - we'll see if I end up needing them after the test run is over... In the green room, I grab an item that powers up all my weapons by one level. AFAIK there is one in each level, and it seems like they're required to beat the game. This one is right on the route to the boss, but maybe some of the later ones can be skipped... The boss fight takes longer than it should because I was unable to get an axe power-up to appear anywhere. I'm not sure how the item drops work yet, so I can't deliberately manipulate them. I take him down with the machine gun instead, which is pretty fast, but not nearly as fast as the axe - one hit is all it takes with that baby! After each level is a bonus shoot 'em up stage, much like the ones from Galaga in which you shoot enemies flying in formation. There doesn't seem to be any way to skip them, so I'll try to make them as entertaining as possible. I'm looking forward to diving deeper into this game. There's a fan site (in Japanese) that has lots of good info on the game: http://laylairis.web.fc2.com/index.html. So far it's proven invaluable for this run, and I'm just getting started.
Rayas wrote:
Dunno if I'm really clear. I need to drink more.
<br>
adelikat wrote:
The idea was to kill off my family to avoid lost time to them getting sick and other inconvenient things.
Dwedit
He/Him
Joined: 3/24/2006
Posts: 692
Location: Chicago
I always wanted to see this game get TAS'd! Keep up the good work.
Player (203)
Joined: 1/24/2011
Posts: 108
I'm redoing the first stage because there appear to be NO axes on my route through stage 2, and I really need the axe for the stage 2 boss, much more so than before. I'm also starting to figure out some of the game's little quirks:
    It's possible to control the bouncing action of your grenades to a certain extent. By moving while the grenade is bouncing, you can change how it rebounds against walls.
    I'm getting the feeling that the item pickups aren't random - they're just randomly disguised as "?" panels. For example, sometimes when I'm getting the first two skate items in stage 1, they appear as "?" panels but they have the same effect. If this is the case, I should be able to get an axe in stage 1 without losing any time: in my previous run I clipped through the "?" panel which appeared where the axe should have been. Whether all "?" panels give the same items remains to be seen: the axe situation should be a good test of this.
    Layla is one of those games that generally treats every other frame as a lag frame, which can be pretty annoying sometimes. This means that you can't autofire your weapons. For all the weapons I've tested, it looks like the fastest shooting speed you can get is every six frames for the pistol, bazooka, and SMG. Grenades are much slower since you have the throwing animation to deal with, and I haven't tested the sword or axe yet.
    I inadvertently managed to crash the game. In the middle of stage 2 there must have been too many enemies on the screen at once and the game froze. I tried to avoid the freeze by killing one of the enemies, but it still froze because he dropped a slice of cake that was bouncing around the screen. Killing a second enemy managed to prevent the crash, though.
I'm just starting the improved test run of stage 1 at the beginning of the stage 1 base and I'm already about 32 frames ahead 157 frames ahead thanks to an extra "?" panel that turned out to be roller skates. I'll get a video up once it's done.
Rayas wrote:
Dunno if I'm really clear. I need to drink more.
<br>
adelikat wrote:
The idea was to kill off my family to avoid lost time to them getting sick and other inconvenient things.
Player (203)
Joined: 1/24/2011
Posts: 108
Level 1 improvement is finished, and I'm 408 frames faster than before. Here's the YouTube link. It turns out that I had run through the axe power-up last time - if I had just stopped for a moment I could have gotten it. Since it looks like any items can be disguised as "?" panels, I'm going to have to take a careful inventory of the levels to make sure I'm not missing any more easily-accessible speed-ups.
Rayas wrote:
Dunno if I'm really clear. I need to drink more.
<br>
adelikat wrote:
The idea was to kill off my family to avoid lost time to them getting sick and other inconvenient things.
Joined: 5/14/2007
Posts: 525
Location: Pisces-Cetus filament
Nice run. I had never heard of this game, but it is a good choice. I look forward to the submission and will check anything you post here in the meantime. Good luck.
AzumaK wrote: I swear my 1 year old daughter's favorite TASVideo is your R4MI run :3 xxNKxx wrote: ok thanks handsome feos :D Help improving TASVideos!
Player (203)
Joined: 1/24/2011
Posts: 108
Here are encodes for asteroids 2 and 3. The boss of stage 2 falls to a single axe hit, but the stage 3 boss is immune to most of the weapons. I end up taking him out with the machine gun. Since this is just a test run, I plan on making optimizations after it's done, particularly on this boss battle, since I'm sure it can be done more quickly with a few well-placed jumps.
Rayas wrote:
Dunno if I'm really clear. I need to drink more.
<br>
adelikat wrote:
The idea was to kill off my family to avoid lost time to them getting sick and other inconvenient things.
Joined: 7/2/2007
Posts: 3960
Cute game. I look forward to seeing your progress. :)
Pyrel - an open-source rewrite of the Angband roguelike game in Python.
Player (203)
Joined: 1/24/2011
Posts: 108
Progress Update: I've completed the cave section of level 4 and am currently working on the base. More importantly, I've been diving into the game's RAM and learning much about its inner workings. Here's a sample of my findings:
MOVEMENT

Layla's speed starts at 0 (standing) and, when moving, increases by
4 every other frame up to its maximum. Speed is stored at 0031.

When no directional buttons are being pushed while moving, Layla's
speed will decrease by 2 every other frame until it reaches zero.
When the opposite direction is pressed, Layla's speed will decrease
by 4 every other frame instead. Layla will only change the direction
she's facing when her speed is 0.

When the screen is not scrolling, Layla's X position at 002D is
altered by her movement. The screen is divided into three zones
as denoted by byte 002E. When Layla is on the left side of the
screen, 002D < 255 and 002E is 0. Once Layla crosses the center
of the screen and 002D rolls over from 255 to 0, 002E increases to 1.
When the screen stops scrolling, it's possible to run up 002E to 255
by running against a wall. It is unknown what function this might serve.

Screen scrolling progress is stored in 0016. Two screens are stored
in memory at the same time, and when the scrolling counter rolls over
from 255 the byte at 0017 switches between 0 and 1 to indicate which
screen is currenly in use. The screen scrolls when 002E equals 1 and
002D equals 32.

WEAPONS

There are two memory zones in which the screen positions of the various
projectiles are stored.

Memory Zone 1: X 05B0 - 05B3 Y 05C0 - 05C3
Memory Zone 2: X 05B4 - 05B7 Y 05C4 - 05C7

Each zone contains four bytes, thus you can have up to four bullets
on-screen at once from a weapon that uses a particular zone.
It is possible to have eight bullets on-screen at once - four from
a zone 1 weapon and four from zone 2. This may be useful in the
third stage boss battle.


   NAME   |   Type   |   Speed   |  Height   | Delay |  Boss  |  Memory  |
__________|__________|___________|___________|_______|________|__________|
Pistol    |Shot      |   4px/f   |   +6px    |   2   |Yes     |  Zone 1  |
__________|__________|___________|___________|_______|________|__________|
SMG       |Shot      |   6px/f   |   +9px    |   2   |Yes     |  Zone 2  |
__________|__________|___________|___________|_______|________|__________|
Grenade   |Thrown    | 1-2*px/f  |  -2/+8px  |   18  |Yes     |  Zone 1  |
__________|__________|___________|___________|_______|________|__________|
Flame     |Shot      |   3px/f   |   +9px    |   2   |No      |  Zone 1  |
__________|__________|___________|___________|_______|________|__________|
Axe       |Thrown    |   3px/f   |  +0/4px   |   18  |Yes     |  Zone 1  |
__________|__________|___________|___________|_______|________|__________|
Bazooka   |Shot      |   6px/f   |   +6px    |   2   |No      |  Zone 1  |
__________|__________|___________|___________|_______|________|__________|
Sword     |Thrown    |   8px/f   |   +10px   |   18  |No      |  Zone 1  |
__________|__________|___________|___________|_______|________|__________|

*Grenades travel at 2 pixels per frame when they're first
 thrown and slow down to 1 pixel per frame after their
 first bounce. They explode 91 frames after they first
 appear if they do not come in contact with any enemies.
 They start out two pixels below your character's Y position
 and arc up to 8 pixels above Y at a rate of 2 pixels per frame
 until they hit the apex.
IMO the most interesting discovery is the fact that the machine gun uses different memory addresses than the other weapons to store bullet positions. I'm not sure why the game would do this. At any rate, I should have level 4 finished and encoded in a little while.
Rayas wrote:
Dunno if I'm really clear. I need to drink more.
<br>
adelikat wrote:
The idea was to kill off my family to avoid lost time to them getting sick and other inconvenient things.
Joined: 7/2/2007
Posts: 3960
Perhaps the machinegun was originally intended to use both memory addresses to allow for 8 projectiles onscreen at one time?
Pyrel - an open-source rewrite of the Angband roguelike game in Python.
Player (203)
Joined: 1/24/2011
Posts: 108
Derakon wrote:
Perhaps the machinegun was originally intended to use both memory addresses to allow for 8 projectiles onscreen at one time?
Following further investigation, your hypothesis appears to be correct. Of course, the question now is, "why did they use the secondary addresses for the first four shots rather than using the same addresses as the other weapons and breaking out the secondary ones for the last four shots?" Then again, with what I'm finding in the game's RAM, nonsensical memory usage seems to be the norm here. I'm working on finding enemy screen positions and (maybe) their HP. I've found a large block of memory that appears to hold their screen positions several times over, so I'm working on turning that into visible hitboxes with lua. So far I haven't found anything that looks like HP values for enemies, bosses, or even the main character, so maybe it's calculated differently than the "subtract damage from HP" type of thing I had expected... Anyway, I'm a little stuck at the end of stage 4 due to some health management issues. I think I'm going to have to pick up a piece of cake or some ice cream in order to get through the last part of the stage, which involves some unavoidable contact with enemies.
Rayas wrote:
Dunno if I'm really clear. I need to drink more.
<br>
adelikat wrote:
The idea was to kill off my family to avoid lost time to them getting sick and other inconvenient things.
Player (203)
Joined: 1/24/2011
Posts: 108
Finally, the test run of Asteroid 4 is done: check it out! Health management is going to be a priority during my optimizations of this run, especially since it's kinda tough to grab cake and ice cream while blasting through asteroid caves on ten pairs of rollerskates. I'm also going to spend much longer makingthe boss fights shorter... right now, I'm just trying to get a rough draft that I can compare my progress to later on. Also, I'm having a hell of a time trying to find any HP values for anybody - the bosses, the regular enemies, or even my main character. I'm not sure how this game stores this information in the RAM, but it sure isn't in any obvious manner. Being able to see enemy HP would make the boss battles much, much better...
Rayas wrote:
Dunno if I'm really clear. I need to drink more.
<br>
adelikat wrote:
The idea was to kill off my family to avoid lost time to them getting sick and other inconvenient things.
Joined: 7/2/2007
Posts: 3960
Wow, that's one annoying low-health beep. Also, "it's kinda tough to grab cake and ice cream while blasting through asteroid caves on ten pairs of rollerskates" needs to make it into the publication description somehow. :) Perhaps damage counts up instead of down? I.e. death is when damage >= damage capacity, not when health <= 0. At around 00:14 you run into a barrier before jumping onto it, thus killing your horizontal speed. And at 00:34 you enter the elevator from the right instead of from the left, though in that case I could believe that doing so was faster (assuming you needed whatever it was you picked up from the crates). Otherwise, I don't have any argument with the run.
Pyrel - an open-source rewrite of the Angband roguelike game in Python.
Player (203)
Joined: 1/24/2011
Posts: 108
Derakon wrote:
At around 00:14 you run into a barrier before jumping onto it, thus killing your horizontal speed.
The previous jump over the pit had put me in an awkward position for clearing the pillars, and all my other options had me taking damage from those two gingerbread-man-looking guys there. This will most likely be changed in the final movie, though, since there's probably a faster path that doesn't involve slamming into a wall.
Derakon wrote:
And at 00:34 you enter the elevator from the right instead of from the left, though in that case I could believe that doing so was faster (assuming you needed whatever it was you picked up from the crates).
The blue "floor" under the platforms and the crates is actually a pit, and the fastest way seems to be to go through the crates, turn around, and get the elevator from the right. This does waste a frame (I have to turn around eventually, since my direction is saved between screens) but the platform placement doesn't allow entry from the left. My turning around could be optimized, though - I'm sure there's a faster way to do it. Anyway, thanks for the feedback. It's nice to know that someone's keeping tabs on this project. It's not the most well-known game but it's been a lot of fun to run so far. Level 5 should be finished within the next few days.
Rayas wrote:
Dunno if I'm really clear. I need to drink more.
<br>
adelikat wrote:
The idea was to kill off my family to avoid lost time to them getting sick and other inconvenient things.
Player (203)
Joined: 1/24/2011
Posts: 108
Okay, so it looks like ammo and health management are getting to be a bigger problem in world 5 than I had anticipated. Therefore, I've decided to go back to the beginning again, make a few improvements, and try to pick up more ammo for the SMG and Bazooka along the way. I just shaved 12 frames off the beginning of stage 1 by throwing the grenade earlier, allowing me to pick up the two rollerskates more quickly. It will be good to get some of these little optimizations out of the way. I'm also going to start working on the bonus stages this time. IMO they're the low point of the game: the designers wanted to have a little Galaga-style bonus game, but they went way too far, since each bonus stage involves TWENTY waves of enemies, and there's one after each level. There's only so much I can do to make them entertaining. I shouldn't aim for shooting down all the enemies, since that would waste frames due to an extra "Perfect!" message after the last wave. I hope the bonus stages don't kill the entertainment value of an otherwise interesting game...
Rayas wrote:
Dunno if I'm really clear. I need to drink more.
<br>
adelikat wrote:
The idea was to kill off my family to avoid lost time to them getting sick and other inconvenient things.
Joined: 5/14/2007
Posts: 525
Location: Pisces-Cetus filament
Hey Tanooki. Have you made any progress? This TAS looked promising!
AzumaK wrote: I swear my 1 year old daughter's favorite TASVideo is your R4MI run :3 xxNKxx wrote: ok thanks handsome feos :D Help improving TASVideos!
Player (203)
Joined: 1/24/2011
Posts: 108
Yeah, I still think it would make a good run, but the long and boring bonus stages are kind of a problem. If the game didn't have those, the run would be awesome, but 20 waves of Galaga-style enemies between each stage really kills the pacing. There's only so much you can do to make something like that entertaining. As far as the actual gameplay is concerned, the biggest obstacles right now are ammo and health management, which can be more easily dealt with.
Rayas wrote:
Dunno if I'm really clear. I need to drink more.
<br>
adelikat wrote:
The idea was to kill off my family to avoid lost time to them getting sick and other inconvenient things.