Author Topic: .  (Read 5947 times)

dkma841

  • *
  • Posts: 1225
  • delete
    • View Profile
.
« on: 2017-12-15 15:07:21 »
.
« Last Edit: 2021-10-28 15:57:41 by dkma841 »

nfitc1

  • *
  • Posts: 3011
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: Off Camera Secrets | Final Fantasy VII - Boundary Break
« Reply #1 on: 2017-12-15 18:24:18 »
It's real good. Showed me some things I didn't know.

Covarr

  • Covarr-Let
  • Administrator
  • *
  • Posts: 3941
  • Just Covarr. No "n".
    • View Profile
Re: Off Camera Secrets | Final Fantasy VII - Boundary Break
« Reply #2 on: 2017-12-15 18:34:40 »
I love Boundary Break, but I never expected him to do a Final Fantasy VII episode.

picklejar

  • *
  • Posts: 147
    • View Profile
Re: Off Camera Secrets | Final Fantasy VII - Boundary Break
« Reply #3 on: 2017-12-18 11:57:15 »
This was neat, thanks for sharing the vid!

Grimmy

  • *
  • Posts: 499
  • Join in my tarnished light.
    • View Profile
    • GrimmyGames
Re: Off Camera Secrets | Final Fantasy VII - Boundary Break
« Reply #4 on: 2017-12-21 01:56:32 »
The most interesting thing for me is how it shows that both the world map and battle cameras can be hacked to have added functionality. Neither really need the zoom in or out, and the world map camera probably needs no adjustment at all. However being able to add the controllable rotation to the battle would be a very nice addition since the game currently has a mostly static camera in battles. I had once asked Aali if he could add the world map camera controls to the battle camera and he said yes it would be very easy to do, but that he had no interest in doing it. I'm sure it would also be tricky to get the scripted camera moves to play nice with the player also moving the camera.

Maki

  • 0xBAADF00D
  • *
  • Posts: 621
  • 0xCCCCCCCC
    • View Profile
Re: Off Camera Secrets | Final Fantasy VII - Boundary Break
« Reply #5 on: 2017-12-21 11:07:01 »
Grimmy,
as I see the camera is the same as in FFVIII. You see, camera operates on two major vectors (which one pseudo-vector are in fact just three short16 values). One major thing is look-at actor which is the X Y Z position of camera target. It can be placed in the center of the stage. However, the difficult happens when you'll be trying to move world-space camera (physical location of camera). By changing X axis you'll move camera only in two directions. To make controllable rotation you may need to introduce a math here to calculate X and Y worldspace position of global camera to make the circular movement. Therefore you'll need some memory injection and a bunch of assembly code/ C pre-compiled code utilizing e.g. Math.PI

nfitc1

  • *
  • Posts: 3011
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: Off Camera Secrets | Final Fantasy VII - Boundary Break
« Reply #6 on: 2017-12-21 13:26:43 »
I'm sure it would also be tricky to get the scripted camera moves to play nice with the player also moving the camera.

Yes. Yes it would. In fact, the camera scripts rely on the camera being unable to manipulate. They could be disabled completely, however.

Maki

  • 0xBAADF00D
  • *
  • Posts: 621
  • 0xCCCCCCCC
    • View Profile
Re: Off Camera Secrets | Final Fantasy VII - Boundary Break
« Reply #7 on: 2017-12-24 11:11:41 »
I started developing rotatable camera in VIII (VII will utilize from it too)

The look-at actor is always in center of the stage, and R is distance from center of circle to world-space camera.
I'm kinda new to FPU so sorry for not so good code. Anyway this one is working fine, when you press '3' in battle the camera would move, but I'm currently struggling with conversion of pseudo-vector short16 from real (single) value. Need to think about it, also it misses the Y axis (or Z if we're talking about X-ZY coordinate system)

In code you can see divide by 10000.0, but it's wrong. Diving doesn't do anything as the float/real number always will have different hex values other than FF8 short16 camera coordinate.

Currently I'm on stage like this:
Code: [Select]
alloc(newmem,2048)
label(returnhere)
label(originalcode)

newmem:
PUSH 03
CALL FF8.exe+685E0 //get_key_state
ADD ESP, 4
TEST EAX, EAX
JNZ LeftCamera
PUSH 04
CALL FF8.exe+685E0 //get_key_state
ADD ESP, 4
TEST EAX, EAX
JNZ RightCamera
JMP originalcode

LeftCamera: //Casual value+10
PUSH EAX
MOV EAX, [B8B7F4] //BattleCamera X
//SHR EAX, 010
ADD EAX, 32
//SHL EAX, 010
MOV [B8B7F4], EAX //BattleCamera X
POP EAX
JMP originalcode

RightCamera: //Degree to radians + sine
FINIT
FLD [myvar]
FLD1
FADD st(0), st(1)
FST [myvar]
PUSH [myvar]
CALL CalculateRadians
ADD ESP,4

FINIT
FLD [myvar+8]
FSIN
FLD [myvar+10]
FMUL st(0), st(1)
FLD [myvar+14]
FDIV st(1), st(0)
FSTP [B8B7F4] //BattleCamera X (st1>st0)
FSTP [B8B7F4] //BattleCamera X (correct st0)

//MOV EAX, [B8B7F4]
//SUB EAX, 32
//MOV [B8B7F4], EAX


JMP originalcode

myvar:
dd 42340000  //alpha
dd 40490e56  //PI
dd 00000000  //Temp far for FPU
dd 43340000 //180.0
dd 41200000 //R
dd 461c4000 //10000.0 0x14

CalculateRadians: //Get Angle to radians
ADD ESP, 4
POP EAX
SUB ESP, 8
MOV [myvar+8], EAX
FINIT
FLD [myvar+4] //st0 has PI
FLD [myvar+C] //st1 has 180.0
FDIV st(1), st(0)
FLD [myvar+8] //alpha
FMUL st(0), st(2)
FST [myvar+8]
RET




originalcode:
push 0000009D
JMP returnhere

"FF8.exe"+A2CA0:
jmp newmem
returnhere:

LeonhartGR

  • *
  • Posts: 2577
  • ~Whatever...~ Enjoy life!
    • View Profile
    • LeonhartGR Productions
Re: Off Camera Secrets | Final Fantasy VII - Boundary Break
« Reply #8 on: 2017-12-30 17:13:53 »
This video showcases how unprofessionally the Square team approached the graphics design of the game at that age... Well I agree it was an era that you didn't have to design well something that doesn't show on screen and for the sake of a rush delivery you just had to have the work done asap.

nfitc1

  • *
  • Posts: 3011
  • I just don't know what went wrong.
    • View Profile
    • WM/PrC Blog
Re: Off Camera Secrets | Final Fantasy VII - Boundary Break
« Reply #9 on: 2017-12-31 04:56:52 »
This video showcases how unprofessionally the Square team approached the graphics design of the game at that age... Well I agree it was an era that you didn't have to design well something that doesn't show on screen and for the sake of a rush delivery you just had to have the work done asap.

TBH, I think they did a reasonable job with what they had. They were co-developing for N64 and PSX at one point so I'm sure they had to make everything compatible with both systems. 3D was something new to them and the industry in general. There were no wrong ways to do things in the early days. Even the first 3D games on PC weren't actually 3D and made HEAVY use of culling to make games run smooth before there were dedicated 3D graphics cards that have processors solely to remove the need for culling.

Maki

  • 0xBAADF00D
  • *
  • Posts: 621
  • 0xCCCCCCCC
    • View Profile
Re: Off Camera Secrets | Final Fantasy VII - Boundary Break
« Reply #10 on: 2017-12-31 16:57:27 »
Done!


Source (with whole garbage taken out):
Code: [Select]
alloc(newmem,2048)
label(returnhere)
label(originalcode)

newmem:
PUSH 04
CALL FF8.exe+685E0 //get_key_state
ADD ESP, 4
TEST EAX, EAX
JNZ Lower
PUSH 03
CALL FF8.exe+685E0 //get_key_state
ADD ESP, 4
TEST EAX, EAX
JNZ Upper
JMP originalcode

Lower:
FINIT
FLD [myvar]
FLD1
FSUB st(0), st(1)
FABS
FST [myvar]
CMP [myvar], 0
JNE notzero
MOV [myvar], 43b40000
notzero:
JMP RightCamera

Upper:
FINIT
FLD [myvar]
FLD1
FADD st(0), st(1)
FST [myvar]

RightCamera: //Degree to radians + sine
CMP [myvar], 43b40000
JNA locok
MOV [myvar], 0
locok:
PUSH [myvar]
CALL CalculateRadians
ADD ESP,4


//Y
FINIT
FLD [myvar+8]
FSIN
FLD [myvar+10]
FMUL st(0), st(1)
FSTP [myvar+8] //BattleCamera X (st1>st0)
FILD [myvar+14]
FMULP
FIST [myvar+8]
MOV EAX, [myvar+8]
//SHR EAX, 8
MOV WORD [B8B7F0], AX  //BattleCamera X (correct st0)

//X
PUSH [myvar]
CALL CalculateRadians
ADD ESP,4

FINIT
FLD [myvar+8]
FCOS
FLD [myvar+10]
FMUL st(0),st(1)
FSTP [myvar+8]
FILD [myvar+14]
FMULP
FIST [myvar+8]
MOV EAX, [myvar+8]
MOV [B8B7F4], EAX

//MOV EAX, [B8B7F4]
//SUB EAX, 32
//MOV [B8B7F4], EAX


JMP originalcode

myvar:
dd 42340000  //alpha
dd 40490e56  //PI [4]
dd 00000000  //Temp far for FPU [8]
dd 43340000 //180.0 [C]
dd 41200000 //R [10]
dd 4E20 // [14]

CalculateRadians: //Get Angle to radians
ADD ESP, 4
POP EAX
SUB ESP, 8
MOV [myvar+8], EAX
FINIT
FLD [myvar+4] //st0 has PI
FLD [myvar+C] //st1 has 180.0
FDIV st(1), st(0)
FLD [myvar+8] //alpha
FMUL st(0), st(2)
FST [myvar+8]
RET




originalcode:
push 0000009D
JMP returnhere

"FF8.exe"+A2CA0:
jmp newmem
returnhere:

Let me know if you want something like this in FF7. I need only values for camera world-space X and Y :D

EDIT: Hm.. that doesn't satisfy me enough. I need to do something big...
« Last Edit: 2017-12-31 17:03:49 by Maki »

Grimmy

  • *
  • Posts: 499
  • Join in my tarnished light.
    • View Profile
    • GrimmyGames
Re: Off Camera Secrets | Final Fantasy VII - Boundary Break
« Reply #11 on: 2017-12-31 20:12:54 »
That is amazing! It is like some sort of witchcraft. I would love to see something like this in FF7.

LeonhartGR

  • *
  • Posts: 2577
  • ~Whatever...~ Enjoy life!
    • View Profile
    • LeonhartGR Productions
Re: Off Camera Secrets | Final Fantasy VII - Boundary Break
« Reply #12 on: 2017-12-31 20:47:04 »
Done!

Love you Maki! And a Happy new year!