Talk:Drow, an action RPG/@comment-71.88.163.26-20150503033602/@comment-7603355-20150504041131

I made a mistake in my last post. I said the last variable is for experience points, but this game doesn't even have XP, lol. That variable is actually used for the color palatte.

As long as you understand as much as you need to, we can proceed. I've programmed the game so there can be six enemies per screen IIRC. Of course the game could handle more without slowdown but it would require a lot of recoding.

Now for stairs. If you go to a screen that has stairs, such as the room 1 south of your house (@R21), between the map data and enemy you'll see stairs data, BG0=1, ST=1, and then the stairs' coordinates.

If you jump to @STAIRS you'll find lines like:

If R==21 then OLDR=67

The line above basically says that the stairs in screen 21 goes to screen 67 and vice versa. Btw, if you ever need to know what screen your on, just type ?R on the console. You should also note that there are 6 screens in a row, like this:

0,1,2,3,4,5

6,7,8,9,10,11

12.13,14,15,16,17

So in the above map, if you go one north of room 8 you go to room 2, etc.


 * Technically confusing section warning: There are a few relevant lines of code in this area that are necessary to copy each time you make a new staircase. The reason is because is how scrolling works. The screen you are currently in is always one of four quadrants- think of them like this:

A1,A2

B1,B2

When you go from A1 to A2 it refreshes all the sprites in B1 and B2. When you use a staircase to warp, you have to make sure you go to the proper quadrant, otherwise you'll have sprites writing over each other, leaving you with a garbled mess.


 * end technically confusing section

Good luck!