Hud erstellen

Übersicht BlitzBasic Blitz3D

Neue Antwort erstellen

ozzi789

Betreff: Hud erstellen

BeitragDi, Sep 11, 2007 12:50
Antworten mit Zitat
Benutzer-Profile anzeigen
Hab eine 3D landschaft (heightmaps Laughing )
und Steuerung um rumzuschwirren dazu habe ich ein Hud gezeichnet.

Wo muss / kann ich jetz das drawimage hud ,0,0 einfügen ?

Danke Razz

Code: [AUSKLAPPEN]


Graphics3D 640,480,16,2
SetBuffer BackBuffer()
TFormFilter 20
AppTitle"3D Adventure"


Global fpsrate,loops, fpstime

Graphics3D 1024,768,32,1
Print "Choose Map , 1 (Big), 2(Big2) , 3(Small) or 4(Small2) "

.start
Wahl$ = Input ("")
 Select Wahl

  Case "1"         terrain=LoadTerrain("c:\Graphics\heightmapbig1.bmp")
                                      
   Case "2"         terrain=LoadTerrain("c:\Graphics\heightmapbig2.bmp")

  Case "3"         terrain=LoadTerrain("c:\Graphics\heightmapsmall1.bmp")

  Case "4"         terrain=LoadTerrain("c:\Graphics\heightmapsmall2.bmp")


Default
Print "Invalid Number" Goto start
End Select


hud =LoadImage ("c:\Graphics\hud.jpg")

text1=LoadTexture ("c:\Graphics\grass1.jpg")
text2=LoadTexture ("c:\Graphics\grass2.jpg")


cube=CreateSphere  ()
cube_text=LoadTexture ("c:\Graphics\text1.bmp",+16+32)
EntityTexture cube,cube_text
ScaleMesh cube,5,5,5


EntityTexture terrain,text2,0,1
EntityTexture terrain,text1,0,1
ScaleEntity terrain,50,290,50
ScaleEntity terrain,50,290,50

ScaleTexture text1,10,10
ScaleTexture text2,59,59
water=CreatePlane()
watertext=LoadTexture ("c:\Graphics\water.bmp",4)

EntityTexture water,watertext
ScaleTexture watertext,100,100
MoveEntity water,0,10,0
EntityAlpha water,0.6
cam=CreateCamera()
MoveEntity cam,0,500,0
PointEntity cam,cube
CameraFogMode cam,1
CameraRange cam,1,30000
CameraFogRange cam,100,4000
CameraFogColor cam,41,140,255
CameraClsColor cam,40,140,255
light=CreateLight()
TurnEntity light,45,45,0
While Not KeyHit(1)
Locate 420,550
Color 255,255,0
Print "Look around with the mouse , move with arrows "
Locate 420,570
Print "Use F1 and F2 to switch to Wireframe"
fps
Color 255,255,0
Print "Fps : "+fpsrate
MoveMouse 512,384

If KeyHit(60) WireFrame 1
If KeyHit(59) WireFrame 0
If KeyDown(200) MoveEntity cam,0,0,10
If KeyDown(208) MoveEntity cam,0,0,-8
RotateEntity cam,EntityPitch(cam)+MouseYSpeed(),EntityYaw(cam)-MouseXSpeed(),0

      If KeyHit(88) Then SaveBuffer(BackBuffer(),"c:\ScreenshotLOS"+number+".bmp")
         
         filename$="c:\Screenshot3Dadventure.m."+number+".bmp"

If FileType(filename$)=1 Then number=number + 1



RenderWorld
Flip
Wend
ClearWorld

End


Function fps()
 loops = loops+1
If MilliSecs() - fpstime > 1000 Then
 fpsrate = loops
 loops = 0
fpstime = MilliSecs()
 End If
 Return fpsrate
 End Function
[/code]
0x2B || ! 0x2B
C# | C++13 | Java 7 | PHP 5
 

Darren

BeitragDi, Sep 11, 2007 13:00
Antworten mit Zitat
Benutzer-Profile anzeigen
Nach Renderworld und vor Flip
MFG Darren

ozzi789

BeitragDi, Sep 11, 2007 13:04
Antworten mit Zitat
Benutzer-Profile anzeigen
Probiers gleich aus THX
0x2B || ! 0x2B
C# | C++13 | Java 7 | PHP 5

ozzi789

BeitragDi, Sep 11, 2007 13:06
Antworten mit Zitat
Benutzer-Profile anzeigen
Danke viel mals

BB forum ich danke euch für alle eure geduldigen + schnellen antworten Very Happy Smile
0x2B || ! 0x2B
C# | C++13 | Java 7 | PHP 5

Neue Antwort erstellen


Übersicht BlitzBasic Blitz3D

Gehe zu:

Powered by phpBB © 2001 - 2006, phpBB Group