suggest a game
viewpoint
It could be a nice project... anyone wanting to make a concept proof scroll demo?
I found this old code i think i told about it before - i didn't test it yet (the variable and array names are too long to msxbasic, anyway...) - is a bit like msxbasic, but it were more a kind of algorythm i were planning to recode in assembler (laziness and lack of skills...)
This code were more for topview scrolling-down games, also scrolling horizontally depending of the x-position of the player (from arcade, just like Vulgus (Capcom) , Ufo Robo Dangar (Nichibutsu), Flying Shark (Taito), etc.)
The code for Viewpoint, Zaxxon, and whatever, wouldn't be that different at all - the map strip seems to be vertical, with a continuous horizontal scroll (with the x position of map mod64 or mod128) 2 times faster than the limited vertical scroll - the scrolling logic is the same
The idea of the code is: the display redraw (y=0..23,x=0..32) would get it from the position we are in the map, assuming usually the 4x4 character cells we would almost all the time get them partially (for this i'm using mod4)- x4 and y4 would read the current cell from the map, and xm and ym would read the current drawing character from the cell choosed from the x4 and y4 from the map
This code would work as well on that multidirectional platform games like (from arcade) Toki, Black Tiger, Ghosts'n'Goblins, etc. (even Sonic...), or even like that multidirectional topview shooters like TimePilot84.
'- start code
screen 2,1: poke &hfcaf,1
chraddr=&h1800
'adr1=map location at memory
'adr2=4x4characters (32x32pixels) cells location at memory
dim mapchr(32,64) :' mapchr=peek(adr1+x+(y*32))
dim cellchr(256,4,4) :' cellchr=peek(adr2+x+(y*4)+(n*16))
'- in the game loop, mean location of the display in the whole map
px=1:py=3
'- map redraw routine
for y=0 to 23
for x=0 to 31
po=x+(y*32)
ex=px+x: ey=py+y
x4=int(ex/4):xm=ex mod 4
y4=int(ey/4):ym=ey mod 4
v4=mapchr(x4,y4)
vm=cellchr(v4,xm,ym)
vpoke chraddr+po,vm
next x
next y