Thursday, May 26, 2011

A follow up to the previous questions...

Hi Beth,

Wow, you presented that information like Bam, Bam, and BAM!!   I love it!!!  

To the point, very detailed, awesome!! You’re incredible with this stuff.

You know the weird thing about it; I think I'm actually getting it! The more I read on this stuff, "and boy am I cramming this stuff in" the more it starts to make sense!   Slowly... Yes, but it's starting to make sense.

I lucked out because one of the Assembler books I have is an exercise book that uses examples from the DOS TOOL KIT exclusively, which I was able to get a working copy of.  This is perfect and I have been able to do a couple of the exercises and they have successfully run through the assembler!  Yippee!!!

Boy, you really have me thinking about what you just sent me and since it is very detailed I will be chewing on this for a while. Also, the testing and examples I get to do are perfect! This is what is going to make it all come together for me. I need to program it, process it, and see it function! Pretty soon a light bulb is going to go off and then explode with all the realization that is going to rush in.

I just have one question so far:
I know that you talk about a normal tile with a pixel range of 7x8, which is basically the area that all the books talk about, but how do I do this for groups of tiles that form one large tile? Since the tiles in Ultima 1 are 14x16, should I just rethink all the info you gave me and do everything in a 2x2 format? What I mean is, since a tile in Ultima is made up of 4 - 7x8 tiles, at least I think this is how they did it, should I just rethink the process you gave below and work it so I'm using two tiles next to each other and scroll by [2] UP/DOWN/LEFT/RIGHT?  

I hope I'm saying this correctly but I think you know what I mean.

I will first practice through the info you gave me and get it to a working model with just 1- 7x8 tile, then see if I can move groups of 4 [2x2] tiles.

Thanks so much for all of your help! You are a godsend!

Your gracious grass-hopper,

Joe
Joe,

I’m glad to hear you’re making progress! Keep it up, that’s very cool.

You’re exactly on the right path with the 1x1 vs. 2x2 tiles. It’s easy to subdivide the screen into 1x1, 2x2,  or even 4x4 groupings. Ultima used 2x2 groupings.

Doing a 2x2 is just an extension of 1x1. Instead of 7x8 (8 bytes) your tiles are 14x16 (32 bytes) in size. You end up copying two bytes into each row, then incrementing down, copying the next two, etc. And you do that for 16 rows instead of 8 rows. Otherwise, it’s exactly the same idea.

From the perspective of your program, you might as well treat a graphical 2x2 region as a single “game tile”. Don’t get hung up on trying to make the game understand that each tile is actually a 2x2 set of smaller regions – leave that part for the graphic engine drawing to handle. You just tell it “put a mountain at 1,3 and another at 2,7” and let it handle positioning to the rows you want and drawing the larger tiles as though they were single things. (e.g. the graphic engine would know to multiply all passed x,y tile coordinates by 2, so internally it’ll translate 1,3 to the smaller 2,6 boundaries, then do a 14x16 pixel copy at that location. The game engine never needs to know those internal details.)

Good luck!

-          Beth

No comments:

Post a Comment