Jump to content
  • Advertisement
Sign in to follow this  
Porsche911

Blitz 3d images

This topic is 4826 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, Im having problems with another program. My blitz 3D won't load images. If I try to run this program:
sky = LoadImage("commando.bmp")
DrawImage (sky,300,300)
WaitKey 
End

It says "image does not exist" and highlights Drawimage (sky,300,300) Is there any way to get this to work? thanks in advance

Share this post


Link to post
Share on other sites
Advertisement
You should always check the return value from your Load* functions. I suspect that LoadImage() is failing (which will return 0). This could be because the .bmp file is corrupted or not in the directory where Blitz is looking, or is not named correctly, etc.

Share this post


Link to post
Share on other sites
ok, I used my image in the program you gave me. And it worked. But still, The program in the first post doesn't work.


-Now when I try to run it, it comes up with a blank screen

Share this post


Link to post
Share on other sites

Graphics 800,600

setBuffer bacbuffer()

sky = loadimage("commando.bmp")
drawimage sky,300,300
flip
Waitkey()
End()



That should work!

Share this post


Link to post
Share on other sites
That worked! thanks.
sorry for being a nusiance, but a terrain sample I wrote has the same results.
Here is the code:


;duh. . .
Graphics3D 800,600

;set the buffer
SetBuffer BackBuffer()

;collision groups
Global SCENERY = 1
Global PLAYER = 2


;create the light and where it shines
Global Light = CreateLight()
RotateEntity light,90,0,0

camera_pivot = CreatePivot()
EntityRadius camera_pivot,1.4
EntityType camera_pivot, PLAYER


;cameras
Global camera = CreateCamera(camera_pivot)
CameraRange camera ,1,1000
CameraFogMode camera,1
CameraFogRange camera,60,200



;SKY
Global Sky = CreateSphere(16,camera_pivot)
FlipMesh sky
ScaleEntity sky ,100,100,100
PositionEntity sky, 0, 50, 0
sky_tex = LoadTexture ("sky.bmp")
EntityTexture sky,sky_tex

;TERRAIN

Global terrain = LoadTerrain("height2.bmp")
TerrainDetail terrain,2500,True
ScaleEntity terrain, 3,15,3
PositionEntity terrain, -1000,0,-530
ter_tex = LoadTexture("mossyground.bmp")
EntityTexture terrain,ter_tex
EntityRadius terrain, 0,2
EntityType terrain, SCENERY

PositionEntity camera_pivot,0,10,120


While Not KeyDown(1)

Cls

If KeyDown(200) MoveEntity camera_pivot,0,0,0.05
If KeyDown(208)MoveEntity camera_pivot,0,0,-0.05
If KeyDown(203) TurnEntity camera_pivot,0,2,0
If KeyDown(205)TurnEntity camera_pivot,0,-2,0
UpdateWorld
RenderWorld

Flip

Wend
WaitKey
End






Again, it comes up with a blank screen. Programming can be frustrating!

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!