This isn't a game, but the techniques I used in it will be used for one. Right now it's pretty much just a slideshow of sorts. It does contain some "pepperonis", as Paranoia Dragon would put it, but fear not, they're rendered, not real.
http://www.nodtveidt.net/testing.rarIt's in ISO format. Anyways...it doesn't look like much, but the underlying code is, imo, pretty clever. I needed a function that could directly alter very specific areas of the BAT. load_bat doesn't work the way I needed. load_map doesn't work, because the tiles are 8x8 and there are 896 of them for the images.
(And yes, they HAD to be 8x8, 16x16 would not have worked, and you'll see why). Also, I used cd_loadvram to load each picture, so only one is ever in memory (good thing, coz they take up about 30k each!) The large repeating tile (64x56 pixels...this is why 16x16 tiles didn't work) was actually loaded as a font. There were no sprites used in this at all.
As you could probably tell, this is being used for a memory blocks type of game. I wrote one awhile back, but the tiles were all sprites and that caused some major problems with emulators that properly emulate the hardware (mednafen shows some pretty serious scanline cuts!) and would have been just as bad, if not worse, on the real thing. So I had to use bg tiles instead. Anyways, I guess it'd make a good PCE screensaver.
Here's the code for it, it's not terribly optimized in some places but I thought the drawing functions were downright clever.
/* test8.c */
#include "huc.h"
#incchr_ex(maptiles,"nm-01.pcx",0,0,32,32,0);
#incpal(mappal1,"nm-01.pcx");
#incpal(mappal2,"nm-02.pcx");
#incpal(mappal3,"nm-03.pcx");
#incpal(mappal4,"nm-04.pcx");
#incpal(mappal5,"nm-05.pcx");
#incchr(facetiles,"face-char.pcx",0,0,8,7);
#incpal(facepal,"face-char.pcx");
int tileval[1];
main()
{
int myval,px,py,i,i2;
set_screen_size(SCR_SIZE_32x32);
tileval[0] = 256;
myval = 0;
load_font(facetiles,56);
set_font_pal(1);
load_palette(1,facepal,1);
set_tile_data(maptiles);
load_tile(0x1000);
load_palette(0,mappal1,1);
for(;;)
{
for(i=0;i<16;i++)
{
put_bg(i);
vsync(3);
}
vsync(180);
for(i=0;i<16;i++)
{
put_face(i);
vsync(3);
}
i2++;
if(i2>4) i2 = 0;
switch(i2)
{
case 0:
cd_loadvram(2,0x0,0x1000,28672);
load_palette(0,mappal1,1);
break;
case 1:
cd_loadvram(2,0x10,0x1000,28672);
load_palette(0,mappal2,1);
break;
case 2:
cd_loadvram(2,0x20,0x1000,28672);
load_palette(0,mappal3,1);
break;
case 3:
cd_loadvram(2,0x30,0x1000,28672);
load_palette(0,mappal4,1);
break;
case 4:
cd_loadvram(2,0x40,0x1000,28672);
load_palette(0,mappal5,1);
break;
}
}
}
put_bg(whichone)
int whichone;
{
int px,py,startbat,wherex,wherey;
py = whichone / 4;
px = whichone - (py * 4);
py = py * 224;
px = px * 8;
startbat = py + px;
for(wherey=py;wherey<py+7;wherey++)
{
for(wherex=px;wherex<px+8;wherex++)
{
tileval[0] = startbat+256;
load_vram(startbat,tileval,0x1);
startbat++;
}
startbat+=24;
}
}
put_face(whichone)
int whichone;
{
int px,py,startbat,wherex,wherey;
/* yeah, I copied and pasted...hence "startbat" being in here too. :P */
py = whichone / 4;
px = whichone - (py * 4);
py = py * 7;
px = px * 8;
startbat = 32;
for(wherey=py;wherey<py+7;wherey++)
{
for(wherex=px;wherex<px+8;wherex++)
{
put_char(startbat,wherex,wherey);
startbat++;
}
}
}
; nmbgs.s
.incchr "nm-01.pcx",0,0,32,32
.incchr "nm-02.pcx",0,0,32,32
.incchr "nm-03.pcx",0,0,32,32
.incchr "nm-04.pcx",0,0,32,32
.incchr "nm-05.pcx",0,0,32,32
test8.c is compiled in HuC with the -scd and -over switches. nmbgs.s is assembled with pceas with the -scd and -over switches. I then renamed nmbgs.ovl to nmbgs.dat, then ran isolink as
isolink testing.iso tes8.ovl nmbgs.dat. Obviously, this is an SCD image and you would need your own graphics to build it.