Jump to content


Photo

3d Camera Scripts (now With Room Transitions)


  • Please log in to reply
6 replies to this topic

#1 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 18181 posts
  • Version:GM:Studio

Posted 01 August 2008 - 05:00 AM

I wrote these script to be able to place various types of cameras in a 3d room

Player camera, 3rd person camera, security type camera.

Download CameraFramework.zip

Changes from Last

Added Room Transition System
I've gone completely bananas with them!!! Ask for one and I will add it in.


Tip: most FPS games will only need CameraSetXYZAzA() or CameraSetXYZAzARelative()
Tip: Most top down games will only need CameraSetXYZ() and CameraSetTargetXYZ(x,y,z)

Tip: Most functions have a smooth equivalent where the smoothing allows for fluid motion. The smooth parameter is not the same for all function

Tip: Use the aspect ratio function to match the player's screen


Drop a CameraObj in yout room
Drop a Start3donRoomStart in the room

Place the camera using the script here from your OWN object, do not use the CameraObj directly

Of course, only one real camera is used, you simply call the scripts to tell it how you want it to display the 3d world

To use:

1) Merge the file with yours (make a backup first)
2) Drop a Start3dOnRoomStartObj in the room (optionnal, does a d3d_start)
4) Drop a CameraObj in the room
5) Open one of the sample player and copy over the camera code to your player of other object
5b) or drop one of the sample players in the room and change its code for your game
6) Remove your camera code (if you had one)

That's it!

Now you can keep thinking about your game.

Edited by icuurd12b42, 25 August 2008 - 04:31 PM.

  • 1

gmcbanner.pnggmcbanner_tools.png

ICU Live Tutoring Through Slack or Skype | My Tools Page follow.png

I FRANTICALLY MADE MY 18000 POST TOPIC BEFORE MIKE ANNOUNCED A DELAY...
Now I'm squirming not to hit that reply button


#2 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 18181 posts
  • Version:GM:Studio

Posted 06 August 2008 - 03:44 AM

New version available
  • 0

gmcbanner.pnggmcbanner_tools.png

ICU Live Tutoring Through Slack or Skype | My Tools Page follow.png

I FRANTICALLY MADE MY 18000 POST TOPIC BEFORE MIKE ANNOUNCED A DELAY...
Now I'm squirming not to hit that reply button


#3 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 18181 posts
  • Version:GM:Studio

Posted 15 August 2008 - 10:12 PM

Added proper top down setups
  • 0

gmcbanner.pnggmcbanner_tools.png

ICU Live Tutoring Through Slack or Skype | My Tools Page follow.png

I FRANTICALLY MADE MY 18000 POST TOPIC BEFORE MIKE ANNOUNCED A DELAY...
Now I'm squirming not to hit that reply button


#4 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 18181 posts
  • Version:GM:Studio

Posted 19 August 2008 - 08:57 PM

Added click move example
  • 0

gmcbanner.pnggmcbanner_tools.png

ICU Live Tutoring Through Slack or Skype | My Tools Page follow.png

I FRANTICALLY MADE MY 18000 POST TOPIC BEFORE MIKE ANNOUNCED A DELAY...
Now I'm squirming not to hit that reply button


#5 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 18181 posts
  • Version:GM:Studio

Posted 24 August 2008 - 03:21 AM

Download CameraFramework.zip

Changes from Last

Added Room Transition System

I added a sample collision (in the player parent) and a more complex one in the PlayerJump object

I also added a GetMouseDeviations script that takes into account if you are in a room transition so not to break the movement (Starting with the player having turned to the mouse). It replaces the set mouse center screen and the get mouse pos code

Edited by icuurd12b42, 24 August 2008 - 07:22 AM.

  • 0

gmcbanner.pnggmcbanner_tools.png

ICU Live Tutoring Through Slack or Skype | My Tools Page follow.png

I FRANTICALLY MADE MY 18000 POST TOPIC BEFORE MIKE ANNOUNCED A DELAY...
Now I'm squirming not to hit that reply button


#6 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 18181 posts
  • Version:GM:Studio

Posted 25 August 2008 - 04:30 PM

I've gone completely bananas!!!

Check out all the room transitions.
  • 0

gmcbanner.pnggmcbanner_tools.png

ICU Live Tutoring Through Slack or Skype | My Tools Page follow.png

I FRANTICALLY MADE MY 18000 POST TOPIC BEFORE MIKE ANNOUNCED A DELAY...
Now I'm squirming not to hit that reply button


#7 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • GMC Elder
  • 18181 posts
  • Version:GM:Studio

Posted 12 October 2012 - 04:48 AM

These are really useful and fun to mess with. Any plans for a converted GM8.1 and higher version? Also is it ever explained what the "GMHideImage.dll" is for? I imagine it's for transitions but is it necessary?


In GM 8.1 you can use surfaces in 3d so none of this really matters any more. The dll was meant as a means to bypass/hide some flashing that would happen in the initial phase of the transition, a simple Window layered over the GM game window, Dirtied with the game image, while the ugly flashing would happen behind it.
  • 0

gmcbanner.pnggmcbanner_tools.png

ICU Live Tutoring Through Slack or Skype | My Tools Page follow.png

I FRANTICALLY MADE MY 18000 POST TOPIC BEFORE MIKE ANNOUNCED A DELAY...
Now I'm squirming not to hit that reply button