Looking like a nice start Winch, 'bout time we had worms in DB
.
I've been messing around with live memblock to image creation on big images - like 1024x768 for a simple art package. Anyhoo I find it reasonably fast to alter and convert a memblock instead of using any drawing commands. Basically I just made a replacement dot command and point command for memblocks. Something you might want to consider though, is screen resolution. In 32-bit mode, a memblock has 4 bits per pixel, the last byte is for the alpha layer - this sorta limits your game to truecolour displays when otherwise it'd probably run quite well on lower spec machines. Perhaps you could experiment and see what happens when you make the image memblock from scratch, like force it to be a 32-bit image in 16-bit mode, then the screen resolution won't matter. As for Point, I'd forget it and use a memblock all the time, Point is traditionally slow in DB, and should be avoided instinctively - it'll just cause problems if you draw anything to the screen or get a weird screen update that corrupts a part of the screen (like those lovely white boxes I often get when a dialogue box appears).
If you think it would help I'd be happy to post my memblock 2D drawing functions.
Ohh, a quick idea for level creation:
You start with a repeating texture, like rock covering the whole level, then you rip strips off by stepping along a set width and removing pixels in a random fashion. So maybe something like...
* Fill the level with rock
* Get a random number seed (this can even be set by the player to regenerate identical levels)
* Get a random start position on the level, and a random width that is not gonna kill the level (maximum 1/4 width)
* Now move along from the start position for the line width.
* On each line step, draw a black vertical line of varying widths. This will look daft unless your taper the ends though.
Once you've processed a dozen or so lines, you should have a reasonably crazy yet negotiable landscape to explore. You can obviously add backdrop items like in worms. Personally I really liked the busted cars in the scrapyard levels. You could easily check each pixel and draw a layer of grass or whatever where theres a coloured pixel with a black pixel above it to improve the looks.
Van-B
The nature of Monkey was irrepressible!.