January 28, 2020, 02:53:23 PM

Author Topic: Pure Basic FPS  (Read 598 times)

Offline Pfaber11

  • Sr. Member
  • ****
  • Posts: 476
  • Bonjour
    • FABERSGAMES
Pure Basic FPS
« on: October 13, 2019, 09:55:17 AM »
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 .
Celeron N3060 1.6 ghz duel core  4 Gb ram 32 gig storage  HD400 Graphics 160 gig external hard drive....

Offline Naughty Alien

  • Hero Member
  • *****
  • Posts: 679
Re: Pure Basic FPS
« Reply #1 on: October 13, 2019, 12:38:45 PM »

Code: [Select]
Engine3DStatus(#PB_Engine3D_CurrentFPS)

Offline Pfaber11

  • Sr. Member
  • ****
  • Posts: 476
  • Bonjour
    • FABERSGAMES
Re: Pure Basic FPS
« Reply #2 on: October 14, 2019, 10:58:41 AM »
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.
Celeron N3060 1.6 ghz duel core  4 Gb ram 32 gig storage  HD400 Graphics 160 gig external hard drive....

Offline Naughty Alien

  • Hero Member
  • *****
  • Posts: 679
Re: Pure Basic FPS
« Reply #3 on: October 14, 2019, 12:48:19 PM »
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..



Offline Kris

  • Jr. Member
  • **
  • Posts: 91
Re: Pure Basic FPS
« Reply #4 on: October 14, 2019, 03:04:34 PM »
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.

Offline Pfaber11

  • Sr. Member
  • ****
  • Posts: 476
  • Bonjour
    • FABERSGAMES
Re: Pure Basic FPS
« Reply #5 on: October 15, 2019, 02:56:34 AM »
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 .
Code: [Select]
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
Celeron N3060 1.6 ghz duel core  4 Gb ram 32 gig storage  HD400 Graphics 160 gig external hard drive....

Offline Pfaber11

  • Sr. Member
  • ****
  • Posts: 476
  • Bonjour
    • FABERSGAMES
Re: Pure Basic FPS
« Reply #6 on: October 15, 2019, 03:11:09 AM »
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 .
Celeron N3060 1.6 ghz duel core  4 Gb ram 32 gig storage  HD400 Graphics 160 gig external hard drive....

Offline Pfaber11

  • Sr. Member
  • ****
  • Posts: 476
  • Bonjour
    • FABERSGAMES
Re: Pure Basic FPS
« Reply #7 on: October 31, 2019, 04:09:13 PM »
I eventually found it was all down to the file name . What a plonker you really are.
Celeron N3060 1.6 ghz duel core  4 Gb ram 32 gig storage  HD400 Graphics 160 gig external hard drive....