Need an example using tmx tilemap with C64

This forum is dedicated to those who want support programming in ugBASIC.
Questo forum è dedicato a chi desidera supporto per programmare in ugBASIC.
Ce forum est dédié à ceux qui souhaitent prendre en charge la programmation en ugBASIC.
Post Reply
cguardia
Posts: 1
Joined: Sun May 31, 2026 10:01 pm

Need an example using tmx tilemap with C64

Post by cguardia »

Hi everyone,

I'm trying to use tilemaps with ugBasic on the C64 target, but I haven't been able to get it working correctly so far.

I'm using **TILES** to generate a `.tmx` file, and then loading it with something like this:

```basic
BITMAP ENABLE(16)

tilemap := LOAD TILEMAP("background-race.tmx") UNBANKED

EMPTYTILE = 6

CLS

PUT TILEMAP tilemap
```

The problem is that the result is not displayed correctly. Sometimes I get something that looks like a zebra pattern, and other times the tiles seem to be drawn incorrectly or with the wrong data.

So I wanted to ask:

Is there any working example of using `.tmx` tilemaps specifically on C64?

Is there a recommended way to prepare/export the tilemap from TILES so that ugBasic can read it correctly?

Are there any C64-specific limitations I should take into account, such as bitmap mode, multicolor mode, tile size, charset limitations, number of colors, or banking?

Maybe I'm misunderstanding the expected format or video mode setup.

Any simple working example or guide would be really helpful.

Thanks!
Post Reply