New online tool: MSX Screen 2 - Tiles & Maps Generator with demo Scroll

Page 1/2
| 2

Par Mortimer

Rookie (17)

Portrait de Mortimer

30-10-2019, 22:54

Hello everyone, I open this thread to present this tool: MSX Screen 2 - Tiles & Maps Generator by Sagaz

This is the online version of a utility that was created a few years ago to help to develop a game with a multidirectional scroll, and we wanted to to take advantage of the three diferents bank tiles in Screen 2 automatically.

All you need is a .png image that meets the limitations of Screen 2 (Max of two MSX1 colors for each 8*1 portion), and the program will look for the solution that maximizes the reuse of tiles an names depending on how many thirds they will be used, and how scrolls through the name table. To facilitate the tests I have put some images that more or less meet the preconditions, many are from ZX Spectrum because it has been easier for me to find large maps for this system.

Even if an image that does not meet the limitations is provided, the conversion will be done, but in this case the results will not be good because the algorithm that titelizes is very simple since it is not the main objective. There is a warnings window that shows the positions of the image that have not complied with the rules.

There are also some limitations, the image size cannot be smaller than the scroll area, which for now is the full screen (32x24 tiles or 256x192 pixels). The image starts processing from 0.0, and if the size X or Y are not a multiple of 8, the remaining pixels are discarded.

If everything goes well, several output files will be generated:

  • An image of the tileset generated at 2X with spacing between the tiles.
  • An image of the tileset generated at 1X
  • The binary version of the attributes
  • The binary version of the colors
  • The binary version of the names

Also, if map sizes and compressed tiles allow it, it will generate a .ROM (maximum 32KB) with the Scroll Engine that was created for the same unreleased game. You can move with cursors for a full speed scroll (1 tile per frame), or hold de space for a slow movement.

Here I put an example from the Golvellius map:

Internally, the kernel is a Java command line application, it uses the AsMSX assembler to generate the ROM, and Bitbuster to compress the colors and attributes. PHP is used for web interface and as glue code for everything to work. Everything runs in a very small Linux VPS, hopefully it holds on line.

There are some improvements that are already underway, such as:

  • To be able to make the Scroll window one of the tiles we want (In order to use frames or markers)
  • Give the possibility, if the image allows, to generate a single set of tiles for three thirds

And others that could help to be a useful tool to develop new games:

  • Be able to block certain numbers of tiles so you do not use them.
  • More detailed information if there are more tiles to help debug the image.

Enjoy, and please feedback me with bugs, sugestions, critics, etc...

!login ou Inscrivez-vous pour poster

Par sd_snatcher

Prophet (3092)

Portrait de sd_snatcher

30-10-2019, 23:24

Nice work!

Par santiontanon

Paladin (847)

Portrait de santiontanon

31-10-2019, 03:20

Nice! This can be very useful! Btw, I think there is a bug in the demo rom, when you scroll vertically, I think the tiles in each of the three tile banks are different and you can see graphic glitches when a tile moves from bank 2 to bank 3 due to vertical scrolling for example Smile

Par Wlcracks

Champion (326)

Portrait de Wlcracks

31-10-2019, 15:06

Nice, but why online?? If the website is gone also the usability?!

Par santiontanon

Paladin (847)

Portrait de santiontanon

31-10-2019, 16:14

I find that online tools are nice, as they solve the cross-platform issues for all of us non-Windows users Smile I am leaning toward that in my own projects, but also providing the sourcecode in GitHub, so anyone can host it.

Par Mortimer

Rookie (17)

Portrait de Mortimer

31-10-2019, 20:28

santiontanon wrote:

Nice! This can be very useful! Btw, I think there is a bug in the demo rom, when you scroll vertically, I think the tiles in each of the three tile banks are different and you can see graphic glitches when a tile moves from bank 2 to bank 3 due to vertical scrolling for example Smile

Thanks. This happens when there is not enough room for all the tiles, or is not possible to distribute them for reuse names in the windows scroll. The Prince of Persia samples are two cases of this, perhaps removing from the image the protagonist and soldiers it will be ok, because titelized them needs several tiles.

Par Mortimer

Rookie (17)

Portrait de Mortimer

31-10-2019, 20:56

Wlcracks wrote:

Nice, but why online?? If the website is gone also the usability?!

santiontanon wrote:

I find that online tools are nice, as they solve the cross-platform issues for all of us non-Windows users Smile I am leaning toward that in my own projects, but also providing the sourcecode in GitHub, so anyone can host it.

Once polished and improved, it is planned to release it to be able to execute all the steps locally in Windows and Unix-like. Including .asm sources to use the scroll in any future project. You can see this as a kind of beta version.

I liked the idea of ​​mounting a complete toolchain on a server, which could create custom roms on the fly. Also, with the files and instructions, much less people would try it because you would have to have enough knowledge, have time, trust to execute the code on your machine ...

Par mohai

Paladin (841)

Portrait de mohai

02-11-2019, 15:56

It is a nice scrolling routine but, I do not see any special feature.
I think I did not understand what it makes it special.

Par Mortimer

Rookie (17)

Portrait de Mortimer

02-11-2019, 19:38

mohai wrote:

It is a nice scrolling routine but, I do not see any special feature.
I think I did not understand what it makes it special.

Yes, the scroll routine is not very special, just copy the appropriate block from the name map to the vram during each v-blank.

For what I think there is nothing similar, it is to automatically create the necessary vram tables when you want to make a scroll that is not purely horizontal.

If there is vertical scrolling, as the window moves up and down, different tile codes can represent different characters depending on the third in which it is currently.

If all the necessary tiles for all thirds do not reach 256, the easiest is to create a single bank and load it in three thirds, but if more different tiles are necessary because the most varied scenario, it is not trivial to code by hand how to assign the codes to each tile, to maximize utilization.

Think of a tile that only appears above in the first line, in this case it is clear that it is only necessary that it is loaded in the first third, and the number assigned to it can be reused in the following thirds because the scroll window It will never make them draw outside the first third. But if this same tile appears on line 7, in the second third we will not be able to use its number, because when moving the scroll, the correct one will not appear.

It is difficult to explain in words, if it is not understood I will try to make a graphic example.

Par mohai

Paladin (841)

Portrait de mohai

03-11-2019, 00:13

Mortimer wrote:
mohai wrote:

It is a nice scrolling routine but, I do not see any special feature.
I think I did not understand what it makes it special.

Yes, the scroll routine is not very special, just copy the appropriate block from the name map to the vram during each v-blank.

For what I think there is nothing similar, it is to automatically create the necessary vram tables when you want to make a scroll that is not purely horizontal.

If there is vertical scrolling, as the window moves up and down, different tile codes can represent different characters depending on the third in which it is currently.

If all the necessary tiles for all thirds do not reach 256, the easiest is to create a single bank and load it in three thirds, but if more different tiles are necessary because the most varied scenario, it is not trivial to code by hand how to assign the codes to each tile, to maximize utilization.

Think of a tile that only appears above in the first line, in this case it is clear that it is only necessary that it is loaded in the first third, and the number assigned to it can be reused in the following thirds because the scroll window It will never make them draw outside the first third. But if this same tile appears on line 7, in the second third we will not be able to use its number, because when moving the scroll, the correct one will not appear.

It is difficult to explain in words, if it is not understood I will try to make a graphic example.

Ok. Understood.
So, the routine can show some specific tiles for a third, so showing more than 256 in the whole screen, because some tiles could only be moving inside a third and, if they ever move inside another third, a spare tile would be used to represent it.
Very clever. Smile

Par erpirao

Paladin (962)

Portrait de erpirao

03-11-2019, 18:38

Hi Mortimer, the conversation we had yesterday in Malaga was very interesting, I will be asking you more questions about this tool

Page 1/2
| 2