Jump to content

Photo

Running out of render time?


8 replies to this topic

#1 mksmith ONLINE  

mksmith

    Chopper Commander

  • 143 posts
  • Location:Melbourne, Australia

Posted Tue May 14, 2019 6:51 AM

Hi,

I'm currently working on a break-out style game to get me started on 7800basic. I've created a tiled map (4x8pixels - 37x26 width/height) for the game border (1 palette) and background (1 palette) which I pre-save using savescreen (also doublewide is off, zone height is 8 and screenheight is 224).

After playing around with sprites (too slow) to draw the bricks I moved onto creating a ram block using alphadata to store the bricks (currrently 33x4) which I also include in the pre-save.

When I start if everything is included the right 3rd of the bricks are not rendered but if I rem out the tiled map they show as expected.

Would there be something I need to do here or is this simply a lack of render time available? Would making the tiles 8x8 or double width make some difference?

Thanks.

Edited by mksmith, Tue May 14, 2019 6:53 AM.


#2 SmittyB OFFLINE  

SmittyB

    Moonsweeper

  • 373 posts

Posted Tue May 14, 2019 1:07 PM

Am I understanding correctly that you're drawing a large tile map for the border, and then another in the middle of that map for the blocks? If so then MARIA is almost certainly running out of time to read all that data before it has to draw to the screen, and I imagine using 8 line zones wouldn't help with that either.

You would be better off using a map for the top and bottom borders, then using a lot of plotsprite commands to add the sides. You could use a map that's tall and thin for the sides which would be the easy option, but sprites down the sides would be more efficient in terms of the amount of data MARIA has to read.



#3 mksmith ONLINE  

mksmith

    Chopper Commander

  • Topic Starter
  • 143 posts
  • Location:Melbourne, Australia

Posted Tue May 14, 2019 6:29 PM

SmittyB,

Yeah pretty much as you describe - I guess it's two-layered with the background and then the bricks on top.

I'll have a play around with some of your suggestions with the layout and sizing - thanks for your help!

Edited by mksmith, Tue May 14, 2019 6:30 PM.


#4 mksmith ONLINE  

mksmith

    Chopper Commander

  • Topic Starter
  • 143 posts
  • Location:Melbourne, Australia

Posted Wed May 15, 2019 12:23 AM

Another question. I've managed to get the display I want using plotmapfile (I have multiple tilesets and palettes for the different colored bricks) and the speed is fine.

I know I can copy the map using memcpy into ram, render with plotmap and replace tiles with pokechar but this limits the rendering to 1 palette.

Assuming plotmapfile is reading from rom to display the map is there any way change tiles directly like above but keep the multiple palettes?

Edited by mksmith, Wed May 15, 2019 12:23 AM.


#5 SmittyB OFFLINE  

SmittyB

    Moonsweeper

  • 373 posts

Posted Wed May 15, 2019 12:44 AM

Plotmapfile works by breaking up horizontal palette changes into different objects, effectively it's a shortcut to using a lot of plotchar commands.
If you want multiple pallettes on the same line you'll need to break up the map into multiple objects as well. You could look into 160B mode which gives you 12 colours to work with but you might run into the data limitations again.

#6 mksmith ONLINE  

mksmith

    Chopper Commander

  • Topic Starter
  • 143 posts
  • Location:Melbourne, Australia

Posted Wed May 15, 2019 3:49 AM

Plotmapfile works by breaking up horizontal palette changes into different objects, effectively it's a shortcut to using a lot of plotchar commands.
If you want multiple pallettes on the same line you'll need to break up the map into multiple objects as well. You could look into 160B mode which gives you 12 colours to work with but you might run into the data limitations again.

It's certainly not as straight forward as I thought it would be - each method seems to have advantages and disadvantages.

It would certainly be handy to be able to poke into a Plotmapfile (to have dynamically animated tile areas) but I guess the potential palette changes would be troublesome. I'd imagine have multiple plotchar ram areas would also be a task from a speed point of view. The issue with a breakout/arkanoid type game is you could have say an 11x15 size grid with a number of different colored tiles.

Will try a few more things - otherwise might need to look at doing something else  :(



#7 SmittyB OFFLINE  

SmittyB

    Moonsweeper

  • 373 posts

Posted Wed May 15, 2019 6:08 AM

You shouldn't have issues using plotmap to draw from a single tile map in RAM.
What you need to limit are horizontal changes in palette which would be where a new object would need to be drawn. You don't need to worry about vertical pallete changes as a new object would be drawn for each zone anyway. You could easily build in a limitation saying that groups of 4 or so blocks use the same palette.

You could also look at how effectively you're using the 3 colours on a given palette. Are they just different shades of basically the same colour? Could you use dithering to fake extra colours?

#8 mksmith ONLINE  

mksmith

    Chopper Commander

  • Topic Starter
  • 143 posts
  • Location:Melbourne, Australia

Posted Wed May 15, 2019 6:31 AM

Thanks SmittyB for your help! My lack of understanding around the palettes and plotmap is probably my issue currently.  Will keep playing!



#9 mksmith ONLINE  

mksmith

    Chopper Commander

  • Topic Starter
  • 143 posts
  • Location:Melbourne, Australia

Posted Wed May 15, 2019 10:27 PM

Ok - I've cracked the puzzle by the looks  :-D

 

After having a sleep on it and re-reading the help above from SmittyB I've created and put all my tiles into 160B image (12+1 colors) and using alphadata to layout the tiles I now have exactly what I need colorwise. As long as you setup your palette (0-3 or 4-7) with the appropriate colors and set the plotmap to draw using palette 0 (or 4) you can get the 12 colors. 

 

So essentially you complete the following:

  • Draw your tiles using 12+1 colors
  • incgraphic your image using 160B and configure the required palettes (0-3 or 4-7)
  • configure your map using alphadata
  • memcpy you map into ram
  • plotmap (from your ram object) using palette 0 (or 4)

 

I've found using incmap file you can get the color spread but you cannot clear tiles (as its located in rom).  Also you cannot appear to load 160B graphics for tiled maps so that stops you straight away from using that method.  I've read all around the forum trying to find a solution and not found much about this. 

 

Anyway got there in the end - can continue on now.


Edited by mksmith, Wed May 15, 2019 10:59 PM.





0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users