Pure Basic FPS

Started by Pfaber11, October 13, 2019, 09:55:17

Previous topic - Next topic

Pfaber11

Does anybody know how to set the FPS in Pure Basic . Had a look through the commands list but can't find it . Thanks for reading .
HP 15s i3 1.2 upto 3.4 ghz 128 gb ssd 16 gb ram 15.6 inch screen. Windows 11 home edition .  2Tb external hard drive dedicated to Linux Mint .
  PureBasic 6 and AppGameKit studio
ASUS Vivo book 15 16gb ram 256gb storage  cpu upto 4.1 ghz

Naughty Alien


Engine3DStatus(#PB_Engine3D_CurrentFPS)

Pfaber11

Thanks for that . I'm currently having a problem of how to put an .obj file onto the screen . I have a 3d window open and camera and have loaded the mesh . what command do I now use to put it onto the 3d screen . played around with the 2d stuff and that was very straight forward . just goto get to grips with the 3d stuff.
HP 15s i3 1.2 upto 3.4 ghz 128 gb ssd 16 gb ram 15.6 inch screen. Windows 11 home edition .  2Tb external hard drive dedicated to Linux Mint .
  PureBasic 6 and AppGameKit studio
ASUS Vivo book 15 16gb ram 256gb storage  cpu upto 4.1 ghz

Naughty Alien

Basically, initialize 3D engine, then do same for keyboard, mouse, sprites and simply create your light, load object(.MESH file), and camera, and there you go..



Coder Apprentice

You have to convert the .obj file to Ogre's mesh format. I believe you can do it with Blender if nothing else is on hand.

Pfaber11

#5
Hi guys been working on this for hours and got .mesh files . I'm gonna put some code up here for you to have a look . I think I'm close but haven't succeeded yet . Here it is . stops working at create material says the texture is invalid .
InitEngine3D()
InitKeyboard()
InitSprite()

OpenScreen(1366,768,32,"my screen")

Add3DArchive(#PB_Compiler_Home + "C:\Users\pfabe\Documents", #PB_3DArchive_FileSystem)
LoadMesh(1,"banana2.mesh")
LoadTexture(2,"blank.Png")
CreateMaterial(3,2)
CreateEntity(4,1,3,100,30,100)
CreateCamera(0, 0, 0, 100, 100)
MoveCamera(0, 10, 10, 1)
begin:
WindowEvent3D()
ExamineKeyboard()
If KeyboardPushed(#PB_Key_Return)
  End
EndIf
RotateEntity(4,0,1,0)
RenderWorld()
FlipBuffers()

Goto begin
HP 15s i3 1.2 upto 3.4 ghz 128 gb ssd 16 gb ram 15.6 inch screen. Windows 11 home edition .  2Tb external hard drive dedicated to Linux Mint .
  PureBasic 6 and AppGameKit studio
ASUS Vivo book 15 16gb ram 256gb storage  cpu upto 4.1 ghz

Pfaber11

It either says the texture is no good or the mesh is no good . I'll take a look tomorrow and hopefully I can get to the bottom of it . Happy coding .
HP 15s i3 1.2 upto 3.4 ghz 128 gb ssd 16 gb ram 15.6 inch screen. Windows 11 home edition .  2Tb external hard drive dedicated to Linux Mint .
  PureBasic 6 and AppGameKit studio
ASUS Vivo book 15 16gb ram 256gb storage  cpu upto 4.1 ghz

Pfaber11

I eventually found it was all down to the file name . What a plonker you really are.
HP 15s i3 1.2 upto 3.4 ghz 128 gb ssd 16 gb ram 15.6 inch screen. Windows 11 home edition .  2Tb external hard drive dedicated to Linux Mint .
  PureBasic 6 and AppGameKit studio
ASUS Vivo book 15 16gb ram 256gb storage  cpu upto 4.1 ghz