Community
Message Board

Chat room - users
Game Over
( 394431 downloads)
Work In Progress
( 523201 downloads)
Links

Code Exchange
Downloads
Tutorials
Add to Favourites

Submit news

DIV ARENA FORUMS
Not logged in [Login - Register]
Go To Bottom

Printable Version  
Author: Subject: Animated mode 7 planes
BreadCaster
Loyalty Card Holder
******


Avatar


Posts: 321
Registered: 2-3-2016
Member Is Offline


[*] posted on 7-3-2019 at 11:01 AM
Animated mode 7 planes


Hi there everyone!

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 :lol:

Thanks all!!


BC




~*~ Princess of Pies and Pastries ~*~
View user's profile View All Posts By User
dom cook
Div Pro
******




Posts: 387
Registered: 4-3-2016
Member Is Offline


[*] posted on 7-3-2019 at 11:28 AM


YES.
View user's profile View All Posts By User
CicTec
DIV Pro
******




Posts: 471
Registered: 6-8-2016
Member Is Offline


[*] posted on 7-3-2019 at 11:47 AM


Hi Breadcaster,

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.

[Edited on 7-3-2019 by CicTec]
View user's profile View All Posts By User
BreadCaster
Loyalty Card Holder
******


Avatar


Posts: 321
Registered: 2-3-2016
Member Is Offline


[*] posted on 7-3-2019 at 01:23 PM


Fantastic! Thanks Dom, thanks Cictec. Will share screenshots when theres anything worth sharing :p



~*~ Princess of Pies and Pastries ~*~
View user's profile View All Posts By User
BreadCaster
Loyalty Card Holder
******


Avatar


Posts: 321
Registered: 2-3-2016
Member Is Offline


[*] posted on 10-3-2019 at 10:07 AM


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? :/



~*~ Princess of Pies and Pastries ~*~
View user's profile View All Posts By User
dom cook
Div Pro
******




Posts: 387
Registered: 4-3-2016
Member Is Offline


[*] posted on 10-3-2019 at 03:55 PM


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



DIV_0001.png - 343kB

[Edited on 10-3-2019 by dom cook]
View user's profile View All Posts By User
CicTec
DIV Pro
******




Posts: 471
Registered: 6-8-2016
Member Is Offline


[*] posted on 13-3-2019 at 08:17 AM


Quote: Originally posted by BreadCaster  
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?
View user's profile View All Posts By User
BreadCaster
Loyalty Card Holder
******


Avatar


Posts: 321
Registered: 2-3-2016
Member Is Offline


[*] posted on 14-3-2019 at 12:21 PM


Code:
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


[Edited on 14-3-2019 by BreadCaster]




~*~ Princess of Pies and Pastries ~*~
View user's profile View All Posts By User
CicTec
DIV Pro
******




Posts: 471
Registered: 6-8-2016
Member Is Offline


[*] posted on 14-3-2019 at 01:26 PM


And the asset test.fpg ? :)
View user's profile View All Posts By User
BreadCaster
Loyalty Card Holder
******


Avatar


Posts: 321
Registered: 2-3-2016
Member Is Offline


[*] posted on 14-3-2019 at 07:44 PM


here it is :)

Attachment: test.fpg (1.5MB)
This file has been downloaded 911 times





~*~ Princess of Pies and Pastries ~*~
View user's profile View All Posts By User
CicTec
DIV Pro
******




Posts: 471
Registered: 6-8-2016
Member Is Offline


[*] posted on 14-3-2019 at 09:06 PM


I've tried the test,

Is present an error on the START_MODE function, the parameter 4 must be 0 not -1, change it and your program should be work as espected.
View user's profile View All Posts By User

  Go To Top

Powered by XMB
XMB Forum Software © 2001-2012 The XMB Group
[Queries: 18]