Game programming step 17
This presentation is the property of its rightful owner.
Sponsored Links
1 / 13

Game Programming Step-17 PowerPoint PPT Presentation


  • 81 Views
  • Uploaded on
  • Presentation posted in: General

Game Programming Step-17. Learn control mouse player into Game. http://www.prasansoft.com. Purpose Step 17. Learn control mouse player into Game. http://www.prasansoft.com. Components in the same folder in Step-17. http://www.prasansoft.com. Write Command in Step-17.

Download Presentation

Game Programming Step-17

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Game programming step 17

Game Programming Step-17

Learn control mouse player into Game

http://www.prasansoft.com


Purpose step 17

PurposeStep 17

  • Learn control mouse player into Game

http://www.prasansoft.com


Components in the same folder in step 17

Components in the same folderin Step-17

http://www.prasansoft.com


Write command in step 17

Write Command in Step-17

YROTATE CAMERA 0,WRAPVALUE(CAMERA ANGLE Y()+MOUSEMOVEX()*0.2)

XROTATE CAMERA 0,WRAPVALUE(CAMERA ANGLE X()+MOUSEMOVEY()*0.2)

UPX#=CAMERA ANGLE X(0)

IF UPX#<=220 AND UPX#>=160

XROTATE CAMERA 0,220

ENDIF

IF UPX#>=60 AND UPX#<=150

XROTATE CAMERA 0,60

ENDIF

http://www.prasansoft.com


Write command in line119 120

Write Command in line119-120

http://www.prasansoft.com


Yrotate camera

YROTATE CAMERA

This command will move the camera in the direction it is facing.

The step value specifies how far to move the camera and should be a real number.

  • Syntax

  • YROTATE CAMERA YAngle

  • YROTATE CAMERA Camera Number, YAngle

  • Example

  • YROTATE CAMERA 0

http://www.prasansoft.com


Xrotate camera

XROTATE CAMERA

This command will rotate the camera around its X axis.

The angle value should be a real number.

  • Syntax

  • XROTATE CAMERA XAngle

  • XROTATE CAMERA Camera Number, XAngle

  • Example

  • XROTATE CAMERA 0

http://www.prasansoft.com


Camera angle y

CAMERA ANGLE Y

This command will return the real value Y angle of the camera.

  • Syntax

  • Return Float=CAMERA ANGLE Y()

  • Return Float=CAMERA ANGLE Y(Camera Number)

  • Example

  • CAMERA ANGLE Y(0)-3

http://www.prasansoft.com


Camera angle x

CAMERA ANGLE X

This command will return the real value X angle of the camera.

  • Syntax

  • Return Float=CAMERA ANGLE X()

  • Return Float=CAMERA ANGLE X(Camera Number)

  • Example

  • CAMERA ANGLE X()

http://www.prasansoft.com


Wrapvalue

WRAPVALUE

This command will return a value that does not exceed the range of 0 to 360.

Where a value is specified that exceeds this range,

the command will wrap the value around to bring it back within the range.

  • Syntax

  • Return Float=WRAPVALUE(Angle Value)

  • Example

  • WRAPVALUE(CAMERA ANGLE Y(0)-3)

http://www.prasansoft.com


Mousemovex

MOUSEMOVEX

This command will get the current integer X movement value of the mouse pointer.

Instead of the actual mouse position, this command returns the difference between

the current mouse X position and the last mouse X position.

  • Syntax

  • Return Integer=MOUSEMOVEX()

  • Example

  • MOUSEMOVEX()*0.2

http://www.prasansoft.com


Mousemovey

MOUSEMOVEY

This command will get the current integer Y movement value of the mouse pointer. Instead of the actual mouse position, this command returns the difference between the current mouse Y position and the last mouse Y position.

  • Syntax

  • Return Integer=MOUSEMOVEY()

  • Example

  • MOUSEMOVEY()*0.2

http://www.prasansoft.com


Result step 17

Result Step-17

http://www.prasansoft.com


  • Login