Forums

MSX BASIC course - i...
 
Notifications
Clear all

[Sticky] MSX BASIC course - platformers and tiles

4 posts
3 users
8 Reactions
2,220 views
Posts: 25
Admin
Topic starter
(@andreadidio)
Eminent Member
Joined: 3 years ago

Hi everyone,

I'm following Orazio Cacciola's MSX BASIC course at address https://msxitalia.org/msx-basic/ and I was wondering when you will talk about tiles, that is, square objects on which a sprite moves, for example platformers I know live on tiles. I don't know, I'd like to know how to draw a level with platforms, doors, water, fire. And if they are all tiles or deadly objects (water, fire for example) they are still sprites that have to make you collide to kill you.

bye thank you

TO.


3 Replies
thegeps
Posts: 12
Members of the MSX ITA Association
(@thegeps)
Active Member
Joined: 3 years ago

Both solutions can be used. The tiles in the msx are nothing more than the redefined characters: there are 256 available in screen1 and 768 in screen2.

Screen2 is particular because every 8 lines has a different tileset (in fact 256 x 3= 768). But if you want to use the same tile anywhere on the screen you have to redefine it the same way in all 3 tilesets


Reply
Posts: 8
Members of the MSX ITA Association
(@danyppc)
Active Member
Joined: 3 years ago

But is Screen2 slower to handle?


Reply
thegeps
Posts: 12
Members of the MSX ITA Association
(@thegeps)
Active Member
Joined: 3 years ago

Hi Dany, do you mean compared to screen1? Same speed. The difference lies in the way the tiles are managed. In practice you have the screen divided into 3 areas, 8 lines each. Each of these zones has 256 unique characters (8x32=256)

Once you have redefined the tiles (both shape and color) you can place it anywhere in its area with a single vpoke. If you want to be able to put it anywhere on the screen (and therefore not just in its area) you will have to define it in the same way also in the other areas. This implies that if you want to use the same tiles throughout the screen you will have to have the same 256 characters redefined 3 times (equal for each area of the screen)

the 768 unique definitions are useful when you need to make a full-screen drawing, so you can work without restrictions 🙂


Reply
Share: