Im starting a new project utilizing mode 7 to make a side on/top down ish (think Golden Axe style) driving game.
Ive written a custom scroll process so I can have multiple layers of parralax scrolling, dynamically updatin a graphic set in GLOBAL memory - I want
to be able to use this to simulate a rolling road effect, by setting it as the graphic for the mode 7 plane.
My question is simple - is this possible? I mean to have an animating mode 7 plane. Im fairly sure it is but Id like to have confirmation before i
start tearing my hair out trying to get this method to work
Yes, basically you can animate the mode7 plan in many ways, the simplest is simply to perform a MAP_PUT in the zones of the mode7 graph that you want
to animate and these will be automatically displayed in the new rendering.
Hm, mode 7 related - is there anyone who has any experience with the horizon variable in mode 7? Ive created a quick program to adjust it
(m7[0].horizon+=100 when a key is pressed, and its also written to the screen) and for some reason it doesnt make any difference to the mode 7 plane.
Am I doing something wrong? :/
Hi Bread,
If you download the m7 view setup prog from the code snippets you can see the horizon thing working.
Note. If you try to run the prg as it is you'll get an error. That's because it tries to read a file to get its mode 7 settings. If you comment out
the code that does this it will work fine. The prg allows you to set up a desired view visually then it will save the settings to a file which you
can read with the previously mention code segment
Hm, mode 7 related - is there anyone who has any experience with the horizon variable in mode 7? Ive created a quick program to adjust it
(m7[0].horizon+=100 when a key is pressed, and its also written to the screen) and for some reason it doesnt make any difference to the mode 7 plane.
Am I doing something wrong? :/
Hi Breadcaster,
Sorry for the delay...
You can upload this quick program to test what doesn't work?
Program testmodeseven;
GLOBAL
fpg_test;
color;
BEGIN
set_mode(m800x600);
set_fps(30,0);
fpg_test=load_fpg("test.fpg");
put_screen(fpg_test, 1);
start_mode7(0, fpg_test, 2, -1, 0, 0);
m7[0].color=10;
m7[0].camera=id;
m7[0].distance=20;
m7[0].height=165;
m7[0].focus=900;
ctype=c_m7;
resolution=100;
angle=90000;
x=36150;
y=107425;
write(0 ,20,30,3,"Mode 7 test demo");
write(0 ,20,50,3,"Current settings:");
write(0 ,20,60,3,"Height:");
write_int(0 ,80,60,3, &m7[0].height);
write(0 ,20,70,3,"Horizon:");
write_int(0 ,80,70,3, &m7[0].horizon);
write(0 ,20,80,3,"Focus:");
write_int(0 ,80,80,3, &m7[0].focus);
write(0 ,20,90,3,"X and Y:");
write_int(0 ,80,90,3, &X);
write_int(0 ,150,90,3 &y);
write_int(0 ,80,100,3, &angle);
write(0 ,20,70+50,3,"W S A D to steer");
write(0 ,20,80+50,3,"Up and down arrows to adjust height");
write(0 ,20,90+50,3,"Y and H to adjust horizon");
write(0 ,20,100+50,3,"I and K to adjust focus");
WHILE (NOT key(_esc))
IF (key(_w));
advance(250);
END
IF (key(_s));
advance(-250);
END
IF (key(_a));
angle+=5000;
END
IF (key(_d));
angle-=5000;
END
If (key(_up));
m7[0].height+=5;
End
If (key(_down));
m7[0].height-=5;
End
If (key(_Y));
m7[0].horizon+=100;
End
If (key(_H));
m7[0].horizon-=100;
End
If (key(_I));
m7[0].focus+=5;
End
If (key(_K));
m7[0].focus-=5;
End
FRAME;
END
stop_mode7(0);
let_me_alone();
END