Jump to content
IGNORED

Running out of render time?


mksmith

Recommended Posts

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
Link to comment
Share on other sites

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.

  • Like 2
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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
Link to comment
Share on other sites

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.

  • Like 2
Link to comment
Share on other sites

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 :(

Link to comment
Share on other sites

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?

  • Like 2
Link to comment
Share on other sites

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
  • Like 2
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...