Started by ervin, 08:41, 07 April 10
0 Members and 1 Guest are viewing this topic.
Quote from: ervin on 08:41, 07 April 10Hi all. I've been trying to think of a number of ways to speed up my 3d-maze conversion that I released a couple of months ago, and I think I'm finally on the right track.The problem is... how to do it? At the moment, the game is double-buffered, and it uses lots of memory as a result.There is also a small speed penalty with the technique i'm using (i'm doing double the number of visible prints for the score panel, because both the front and back screens need to have updated details on them). Anyway, I thought I could avoid a lot of these problems by removing the double-buffering, and only clearing and/or printing to the bits of the screen that have changed. Someone suggested something similar in the 3d-maze thread. I believe it was redbox, so a big thanks for that idea! This would mean that I could also remove the whole-screen cls (which is admittedly very fast, but still, eh?), and that I could also remove the doubling-up on displaying the score panel. I'm not entirely sure that I have my technique nailed down yet, but it revolves around the idea of knowing which character block a pixel sits in. For example, when I PLOT 0,399 I get a pixel plotted in the top left corner of the screen.This is of course character position 1,1. I want to store a matrix of 25x25 cells, and each cell will either be 0 or 1 depending on whether or not it has had a pixel plotted to it. My problem is that I don't know how to convert from pixel 0,399 to character 1,1.Does anyone know how I could do this? Thanks for any help.
Quote from: ervin on 09:17, 07 April 10Thanks for your very informative answer, there's a lot of good info in there. I'm using assembler to plot the pixels. SCR CHAR POSITION is something I have considered, but it seems to be the reverse of what I need.My assembler code is calculating the memory address of a pixel, so if there is a way to convert that memory address to a character position, that would be perfect. Indeed I've also considered drawing over the top of lines to erase them, but without double buffering that would be very flickery. At the moment 3d-maze has no display flickering at all. Using an array may worth investigating though... Thanks again.
Quote from: ervin on 10:13, 07 April 10That is FANTASTIC!I'll see if I can make my idea work using that information. Thanks so much for taking the time to help me out.
Quote from: ervin on 08:41, 07 April 10Someone suggested something similar in the 3d-maze thread. I believe it was redbox, so a big thanks for that idea!
Quote from: ervin on 08:12, 24 August 10Has it really been this long since I started this thread?
Quote from: ervin on 08:12, 24 August 10And... it's close to being finished!Hopefully in a few weeks, bugs notwithstanding.
Page created in 0.084 seconds with 36 queries.