Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

Blitz3D fps tutorial 3

Loading...

Sign in or sign up now!
6,072
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Jan 10, 2009

~PLEASE WATCH IN HIGH QUALITY~ This is another fps tutorial that targets collisioning. These past tutorials are about creating an old style MS-DOS fps game. This video explains more than the previous tutorials. It is also slower than the past 2 (part two was seperated), yet faster than number 1.
The code within this video is nearly impossible to see without having it set to high quality. I forgot I had removed the plant. It had become an extremely large annoyance.

~FOR THOSE WHO DO NOT WISH TO WATCH ALL OF MY VIDEOS:
I've pasted the code below, though the sources must be changed to work on your computer.~

AppTitle"FPS tutorial"
Graphics3D 400,300,32,2
SetBuffer BackBuffer()
SeedRnd MilliSecs()
HidePointer

;constants
Const Pcoll=1
Const Tcoll=1
;Objects
Global playercube=CreateCube()
Global herb=CreatePlane()
Global plant=LoadTexture("models\plant01.bmp",2)
Global Floor1=CreatePlane()
Global dirt=LoadTexture("models\floor.bmp")
Global bricks=LoadTexture("models\brick.bmp")
Global aimer=LoadImage("aimer.bmp")
Global cam=CreateCamera()
Global cube=CreateCube()
Global light=CreateLight()
;Object Details
MaskImage aimer,0,0,0
MidHandle aimer
ScaleTexture dirt,.04,.04
ScaleEntity herb,1,1,1
ScaleEntity Floor1,100,1,100
ScaleEntity cube,2,2,2
EntityRadius playercube,2
EntityTexture herb,plant
EntityTexture Floor1,dirt
EntityTexture cube,bricks
EntityType playercube,Pcoll
EntityType cube,Tcoll
PositionEntity herb,60,-1,60
PositionEntity cam,50,0,50
PositionEntity cube,10,-1,10
PositionEntity light,0,10,0
PositionEntity Floor1,0,-1,0
PositionEntity playercube,0,0,0
;collision checking
Collisions pcoll,tcoll,2,3
;Called Functions
While Not KeyHit(1)
RenderWorld()
UpdateWorld()
PositionEntity cam,EntityX(playercube),EntityY(playercube),EntityZ(playercube)
DrawImage aimer,MouseX(),MouseY()
camctrl()
Flip
Wend
End
;Functions
Function camctrl()
If KeyDown(200)
MoveEntity playercube,0,0,.2
ElseIf KeyDown(208)
MoveEntity playercube,0,0,-.2
ElseIf KeyDown(203)
TurnEntity cam,0,2,0
TurnEntity playercube,0,2,0
ElseIf KeyDown(205)
TurnEntity cam,0,-2,0
TurnEntity playercube,0,-2,0
EndIf
End Function

Category:

Education

Tags:

License:

Standard YouTube License

  • likes, 1 dislikes

Link to this comment:

Share to:

Uploader Comments (KiwiBlaster516)

  • "Noice (typing error) that the space that is in the description does not appear during this video".

    Well, can´t you simply fix this in the description? Creating annotiations takes more time than changing description, so why make this complicated (this may be pointless, but I notice from it anyway).

  • @TinklerStar I actually tried to fix that, but the youtube format kept messing it up for some reason.

  • Just as a note, you cannot copy the code exactly from the description, because there may be format errors.

see all

All Comments (28)

Sign In or Sign Up now to post a comment!
  • @crescentmoonpro It's been a while, but I think the problem is that the rotational axis is relative to the front of the camera. So, rotating it sideways will always make it rotate to that direction. As for how to fix that... I'm not exactly sure, but a pivot might help. It's the problem with cameras in Blitz3D, the movement/rotation is always relative to where the camera is facing. Then again, it has been maybe 2+ years since I even looked at Blitz3D, so I may be wrong.

  • so i have a small problem, im working on a game of my own and i figured it be time to display some of the variable values so i can better debug, however i discovered i cannot display any sort of text while im running 3d graphics and or have a camera present i need a little help i could u explain this to me? i will pm u my test program that i used to check my theory

  • @HuskyRonan On the help page, there is a place called Command Reference. Once you get into that, click scan codes.

  • ii need help, i want it to be W,A,S,D

  • i buyid blitz3d sdk  but its dont going on need blitz 3d sdk a video card DirectX7?

  • the ) code error is at (row : 45) (col : 55) theres a space between playercube

  • Thanks for this information btw :), (Need to make an FPS game aswell for school :D) I might upload some ingame videos >:D

Loading...
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more