Author Topic: Feature request - rear view (WC3/4 style)  (Read 2853 times)

0 Members and 1 Guest are viewing this topic.

Offline Colonol Dekker

  • HLP is my mistress
  • 213
  • Aken Tigh Dekker- you've probably heard me
    • My old squad sub-domain
Feature request - rear view (WC3/4 style)
For anyone not lucky enough to play this yet, the hud mfd could be toggled to show a rear view. Any possibility in a future build? (For low spec pc's would it be possible to make it use lower lods?)
Campaigns I've added my distinctiveness to-
- Blue Planet: Battle Captains
-Battle of Neptune
-Between the Ashes 2
-Blue planet: Age of Aquarius
-FOTG?
-Inferno R1
-Ribos: The aftermath / -Retreat from Deneb
-Sol: A History
-TBP EACW teaser
-Earth Brakiri war
-TBP Fortune Hunters (I think?)
-TBP Relic
-Trancsend (Possibly?)
-Uncharted Territory
-Vassagos Dirge
-War Machine
(Others lost to the mists of time and no discernible audit trail)

Your friendly Orestes tactical controller.

Secret bomb God.
That one time I got permabanned and got to read who was being bitxhy about me :p....
GO GO DEKKER RANGERSSSS!!!!!!!!!!!!!!!!!
President of the Scooby Doo Model Appreciation Society
The only good Zod is a dead Zod
NEWGROUNDS COMEDY GOLD, UPDATED DAILY
http://badges.steamprofile.com/profile/default/steam/76561198011784807.png

 

Offline chief1983

  • Still lacks a custom title
  • Moderator
  • 212
  • ⬇️⬆️⬅️⬅️🅰➡️⬇️
    • Skype
    • Steam
    • Twitter
    • Fate of the Galaxy
Re: Feature request - rear view (WC3/4 style)
Like a reverse camera in new cars?
Fate of the Galaxy - Now Hiring!  Apply within | Diaspora | SCP Home | Collada Importer for PCS2
Karajorma's 'How to report bugs' | Mantis
#freespace | #scp-swc | #diaspora | #SCP | #hard-light on EsperNet

"You may not sell or otherwise commercially exploit the source or things you created based on the source." -- Excerpt from FSO license, for reference

Nuclear1:  Jesus Christ zack you're a little too hamyurger for HLP right now...
iamzack:  i dont have hamynerge i just want ptatoc hips D:
redsniper:  Platonic hips?!
iamzack:  lays

 

Offline Colonol Dekker

  • HLP is my mistress
  • 213
  • Aken Tigh Dekker- you've probably heard me
    • My old squad sub-domain
Re: Feature request - rear view (WC3/4 style)
Yes :) but toggleable.
(Can't believe that pimp my ride ripped off the confederation :lol: )
Campaigns I've added my distinctiveness to-
- Blue Planet: Battle Captains
-Battle of Neptune
-Between the Ashes 2
-Blue planet: Age of Aquarius
-FOTG?
-Inferno R1
-Ribos: The aftermath / -Retreat from Deneb
-Sol: A History
-TBP EACW teaser
-Earth Brakiri war
-TBP Fortune Hunters (I think?)
-TBP Relic
-Trancsend (Possibly?)
-Uncharted Territory
-Vassagos Dirge
-War Machine
(Others lost to the mists of time and no discernible audit trail)

Your friendly Orestes tactical controller.

Secret bomb God.
That one time I got permabanned and got to read who was being bitxhy about me :p....
GO GO DEKKER RANGERSSSS!!!!!!!!!!!!!!!!!
President of the Scooby Doo Model Appreciation Society
The only good Zod is a dead Zod
NEWGROUNDS COMEDY GOLD, UPDATED DAILY
http://badges.steamprofile.com/profile/default/steam/76561198011784807.png

 

Offline Flaser

  • 210
  • man/fish warsie
Re: Feature request - rear view (WC3/4 style)
Nuke already implemented something similar and more.
Using scripts and rtt he made a turret display and even an input method to control said turret.
He could easily make your rear-camera...


....now if only people helped him test the darn things!
"I was going to become a speed dealer. If one stupid fairytale turns out to be total nonsense, what does the young man do? If you answered, “Wake up and face reality,” you don’t remember what it was like being a young man. You just go to the next entry in the catalogue of lies you can use to destroy your life." - John Dolan

 

Offline Colonol Dekker

  • HLP is my mistress
  • 213
  • Aken Tigh Dekker- you've probably heard me
    • My old squad sub-domain
Re: Feature request - rear view (WC3/4 style)
I'd be happy to.
Just point towards a "how to" :)
Campaigns I've added my distinctiveness to-
- Blue Planet: Battle Captains
-Battle of Neptune
-Between the Ashes 2
-Blue planet: Age of Aquarius
-FOTG?
-Inferno R1
-Ribos: The aftermath / -Retreat from Deneb
-Sol: A History
-TBP EACW teaser
-Earth Brakiri war
-TBP Fortune Hunters (I think?)
-TBP Relic
-Trancsend (Possibly?)
-Uncharted Territory
-Vassagos Dirge
-War Machine
(Others lost to the mists of time and no discernible audit trail)

Your friendly Orestes tactical controller.

Secret bomb God.
That one time I got permabanned and got to read who was being bitxhy about me :p....
GO GO DEKKER RANGERSSSS!!!!!!!!!!!!!!!!!
President of the Scooby Doo Model Appreciation Society
The only good Zod is a dead Zod
NEWGROUNDS COMEDY GOLD, UPDATED DAILY
http://badges.steamprofile.com/profile/default/steam/76561198011784807.png

 

Offline Nuke

  • Ka-Boom!
  • 212
  • Mutants Worship Me
Re: Feature request - rear view (WC3/4 style)
i havent checked the state of rtt at all lately. it might not work anymore. then again it might work uber cool :D
I can no longer sit back and allow communist infiltration, communist indoctrination, communist subversion, and the international communist conspiracy to sap and impurify all of our precious bodily fluids.

Nuke's Scripting SVN

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
Re: Feature request - rear view (WC3/4 style)
Tested, looks great. :)

The default key to turn it on and off is "Alt-v"

Code: [Select]
#Conditional Hooks
$Application: Freespace 2
$On Mission Start: [
if not g_RVTexture then
--Switch to turn rearview on and off
g_RVEnabled = false

--HUD gauge info
g_RVHUDLabel = "Rear view"
g_RVHUDXPos = 100
g_RVHUDYPos = 200

--Texture/camera preferences (must be power of 2
g_RVTextureWidth = 256
g_RVTextureHeight = 256

--Default texture and camera instances for rearview camera
g_RVTexture = gr.createTexture(g_RVTextureWidth, g_RVTextureHeight)
g_RVCamera = gr.createCamera("Rear view")
end
]

$Application: Freespace 2
$State: GS_STATE_GAME_PLAY
$Keypress: Alt-v
$On Key Released: [
g_RVEnabled = not g_RVEnabled
]

$Application: Freespace 2
$State: GS_STATE_GAME_PLAY
$On HUD Draw: [
local ship = hv.Self
if g_RVEnabled and ship and ship:isValid() then
--Lock to current ship
g_RVCamera.Self = ship

--Get current ship position/orientation
local pos = ba.newVector(0, 0, 0)
local ori = ba.newOrientation(0, 0, 0)

--Set camera to back of ship
pos.z = ship.Class.Model.BoundingBoxMin.z
g_RVCamera.Position = pos

--Set camera to reverse of ship orientation
ori.h = math.pi
g_RVCamera.Orientation = ori

--Set camera to be current camera, render, reset
gr.setCamera(g_RVCamera)
gr.CurrentRenderTarget = g_RVTexture
gr.clearScreen()
mn.renderFrame()
gr.CurrentRenderTarget = nil
gr.setCamera()

--TODO: Save previous camera and
--set previous camera when done

--Set HUD color
gr.setColor(0, 255, 0)

--Show a hud label
gr.drawString(g_RVHUDLabel, g_RVHUDXPos, g_RVHUDYPos)

--Offset the texture/box appropriately and draw them
local x = g_RVHUDXPos
local y = g_RVHUDYPos+gr.CurrentFont.Height
gr.drawImage(g_RVTexture, x, y)
gr.drawRectangle(x, y, x+g_RVTextureWidth, y+g_RVTextureHeight, false)
end
]
#End

EDIT: Requires C09032008 build to work. I will be changing that "camera.Self" thing to "camera.Host" to match it with the SEXP jargon, but that should be a quick search-and-replace when it happens. Also, I'll add a current camera variable so this won't screw up cutscenes using the camera code.
« Last Edit: September 04, 2008, 03:57:54 am by WMCoolmon »
-C

 

Offline Colonol Dekker

  • HLP is my mistress
  • 213
  • Aken Tigh Dekker- you've probably heard me
    • My old squad sub-domain
Re: Feature request - rear view (WC3/4 style)
 :D Great :yrd:


I'll wait until you do those things that i don't understand before i DL and try it just so i don't have to DL two .exe's. Thanks WMCoolman.
Campaigns I've added my distinctiveness to-
- Blue Planet: Battle Captains
-Battle of Neptune
-Between the Ashes 2
-Blue planet: Age of Aquarius
-FOTG?
-Inferno R1
-Ribos: The aftermath / -Retreat from Deneb
-Sol: A History
-TBP EACW teaser
-Earth Brakiri war
-TBP Fortune Hunters (I think?)
-TBP Relic
-Trancsend (Possibly?)
-Uncharted Territory
-Vassagos Dirge
-War Machine
(Others lost to the mists of time and no discernible audit trail)

Your friendly Orestes tactical controller.

Secret bomb God.
That one time I got permabanned and got to read who was being bitxhy about me :p....
GO GO DEKKER RANGERSSSS!!!!!!!!!!!!!!!!!
President of the Scooby Doo Model Appreciation Society
The only good Zod is a dead Zod
NEWGROUNDS COMEDY GOLD, UPDATED DAILY
http://badges.steamprofile.com/profile/default/steam/76561198011784807.png

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Feature request - rear view (WC3/4 style)
I will be changing that "camera.Self" thing to "camera.Host" to match it with the SEXP jargon

:confused:

The only time I've noticed the word host used in the code is to denote the first player to join a multiplayer server (Which is the player hosting the server except for standalones).
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
Re: Feature request - rear view (WC3/4 style)
That's still not what I used for the SEXP. I'm open to suggestions.
-C

 

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Feature request - rear view (WC3/4 style)
I'm not saying host is a bad choice, just that I've never seen it used in that context. Is there another SEXP that uses host?
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
Re: Feature request - rear view (WC3/4 style)
Not besides set-camera-host, according to my SEXPs.html from 9/4.
-C

  

Offline karajorma

  • King Louie - Jungle VIP
  • Administrator
  • 214
    • Karajorma's Freespace FAQ
Re: Feature request - rear view (WC3/4 style)
Ah. I get you now. :)
Karajorma's Freespace FAQ. It's almost like asking me yourself.

[ Diaspora ] - [ Seeds Of Rebellion ] - [ Mind Games ]