Page 2 of 4

Re: bE3D Engine Wrapper for purebasic

Posted: Sat Aug 17, 2024 10:58 pm
by ultimzeus
:wink:
threedslider wrote: Thu Aug 15, 2024 10:58 am @ultimzeus : Why not to keep in google drive forever ? Your website, I think it will be not longer to keep from time and so it will be disappear by the way ...

If it is open source you can keep as well in github :mrgreen:

I have not tested yet because of that and not everyone will no jump to test your library ... :? Sorry to sound a little hard but you need to bright more safe and good visibility.

Thanks to your effort and good luck too :wink:

Re: bE3D Engine Wrapper for purebasic

Posted: Sat Aug 17, 2024 10:59 pm
by ultimzeus
8)
Caronte3D wrote: Fri Aug 16, 2024 8:27 pm
jacdelad wrote: Fri Aug 16, 2024 7:16 pm Has anyone actually downloaded and tried it???
I tried it (the example only) and seems to work ok

Re: bE3D Engine Wrapper for purebasic

Posted: Sun Aug 18, 2024 10:05 am
by Rinzwind
The website is too bare bones. Add documentation (also good for search results), examples, and even a demo video show casing. Short comparison with other frameworks (why choose this instead of x), a very low price deal for introduction/pioneers. Be transparent about its origin and goals.

"Clean, easy to understand, and well documented API with demo examples.": should be right away proven on website.

Also look at proton support for Linux/Steamdeck compatibility.

They way it presented right now, it will not find its audience, however good it may be.

Re: bE3D Engine Wrapper for purebasic

Posted: Sun Aug 18, 2024 4:28 pm
by ultimzeus
Rinzwind wrote: Sun Aug 18, 2024 10:05 am The website is too bare bones. Add documentation (also good for search results), examples, and even a demo video show casing. Short comparison with other frameworks (why choose this instead of x), a very low price deal for introduction/pioneers. Be transparent about its origin and goals.

"Clean, easy to understand, and well documented API with demo examples.": should be right away proven on website.

Also look at proton support for Linux/Steamdeck compatibility.

They way it presented right now, it will not find its audience, however good it may be.
Thanks for advices. Will take them seriously.

Re: bE3D Engine Wrapper for purebasic

Posted: Mon Aug 19, 2024 3:05 pm
by Distorted Pixel
I have tried twice to get the demo to no avail. I tried with and without my VPN on.

Re: bE3D Engine Wrapper for purebasic

Posted: Tue Aug 20, 2024 3:44 pm
by ultimzeus
Distorted Pixel wrote: Mon Aug 19, 2024 3:05 pm I have tried twice to get the demo to no avail. I tried with and without my VPN on.
Try this
https://drive.google.com/file/d/1BQ7wTF ... drive_link

Re: bE3D Engine Wrapper for purebasic

Posted: Tue Aug 20, 2024 11:52 pm
by Distorted Pixel
ultimzeus wrote: Tue Aug 20, 2024 3:44 pm
Distorted Pixel wrote: Mon Aug 19, 2024 3:05 pm I have tried twice to get the demo to no avail. I tried with and without my VPN on.
Try this
https://drive.google.com/file/d/1BQ7wTF ... drive_link
Thank you very much, I will give it a try tonight or tomorrow and post back

bE3D Engine Game Showcase

Posted: Thu Aug 22, 2024 12:44 am
by ultimzeus
https://postimg.cc/n940gQkh

A simple game : C++ and bE3D (no dll)
Only 2 files : the .exe and the .dat file (game assets)
https://drive.google.com/file/d/12SuXO1 ... drive_link

Re: bE3D Engine Wrapper for purebasic

Posted: Thu Aug 22, 2024 6:48 am
by Caronte3D
Error: libgcc_sjlij-1.dll and libstdc++-6.dll doesn't found :?

Re: bE3D Engine Wrapper for purebasic

Posted: Fri Aug 23, 2024 2:01 pm
by vividpixel
chi wrote: Tue Aug 13, 2024 11:13 am Irrlicht :wink:
It would be nice as Irrlicht since that engine is cross-platform.

Re: bE3D Engine Wrapper for purebasic

Posted: Fri Aug 23, 2024 2:18 pm
by ultimzeus
Caronte3D wrote: Thu Aug 22, 2024 6:48 am Error: libgcc_sjlij-1.dll and libstdc++-6.dll doesn't found :?
Sorry , a compilation problems solved. Try
https://drive.google.com/file/d/12SuXO1 ... drive_link

Re: bE3D Engine Wrapper for purebasic

Posted: Fri Aug 23, 2024 2:20 pm
by ultimzeus
vividpixel wrote: Fri Aug 23, 2024 2:01 pm
chi wrote: Tue Aug 13, 2024 11:13 am Irrlicht :wink:
It would be nice as Irrlicht since that engine is cross-platform.
Workin on it

Re: bE3D Engine Wrapper for purebasic

Posted: Fri Aug 23, 2024 3:06 pm
by Caronte3D
ultimzeus wrote: Fri Aug 23, 2024 2:18 pm
Caronte3D wrote: Thu Aug 22, 2024 6:48 am Error: libgcc_sjlij-1.dll and libstdc++-6.dll doesn't found :?
Sorry , a compilation problems solved. Try
https://drive.google.com/file/d/12SuXO1 ... drive_link
Looks nice retro, a bite slow, but nice.
If do you make tutorials about how to import animated models, skeletal models, how to use materials that shows good, etc, etc, it would be useful.

Re: bE3D Engine Wrapper for purebasic

Posted: Sun Aug 25, 2024 10:53 pm
by ultimzeus
Caronte3D wrote: Fri Aug 23, 2024 3:06 pm
ultimzeus wrote: Fri Aug 23, 2024 2:18 pm
Caronte3D wrote: Thu Aug 22, 2024 6:48 am Error: libgcc_sjlij-1.dll and libstdc++-6.dll doesn't found :?
Sorry , a compilation problems solved. Try
https://drive.google.com/file/d/12SuXO1 ... drive_link
Looks nice retro, a bite slow, but nice.
If do you make tutorials about how to import animated models, skeletal models, how to use materials that shows good, etc, etc, it would be useful.
A loader for MS3D models

Code: Select all

; MS3D ASCII Loader for PureBasic

Structure _Vertex
  x.f
  y.f
  z.f
  u.f
  v.f
  nx.f
  ny.f
  nz.f
EndStructure 

Structure _TextureCoordinatesUV
  u.f
  v.f
EndStructure

Structure _Normals
  x.f
  y.f
  z.f
EndStructure

Structure _Triangle
  a.w
  b.w
  c.w
EndStructure 

Structure MS3D_Mesh
  vertices.l
  Material.l
  normals.l
  triangles.l
EndStructure

Dim Meshes.MS3D_Mesh(1)

Global NewList LoadMS3D_Lines.s()

Procedure LoadMS3D(file$,start_mesh,scale.f)
  
  Dim Meshdata._vertex(0)
  Dim Meshtri._triangle(0)
  
  ClearList(LoadMS3D_Lines())
  file = ReadFile(#PB_Any,file$)
  If file
    Repeat
      line$ = ReadString(file)
      If line$ And Left(line$,2)<>"//"
        AddElement(LoadMS3D_Lines())
        LoadMS3D_Lines() = line$
      EndIf
    Until Eof(file)
    CloseFile(file)
    
    If FirstElement(LoadMS3D_Lines())=0
      ProcedureReturn 0
    EndIf

    Frames = Val(StringField(LoadMS3D_Lines(),2," "))
    Debug "Frames: "+Str(Frames)
    NextElement(LoadMS3D_Lines())
    
    Frame  = Val(StringField(LoadMS3D_Lines(),2," "))
    Debug "Frame: "+Str(Frame)
    NextElement(LoadMS3D_Lines())

    Meshes = Val(StringField(LoadMS3D_Lines(),2," "))
    Debug "Meshes: "+Str(Meshes)
    NextElement(LoadMS3D_Lines())

    Dim MeshInfo.MS3D_Mesh(Meshes)
       
    mesh=CreateMesh(#PB_Any)
    
    For a = 1 To Meshes
      
      AddSubMesh()
      
      Name$ = StringField(LoadMS3D_Lines(),1," ")
      Debug "Mesh: "+Name$
      Flags = Val(StringField(LoadMS3D_Lines(),2," "))
      Debug "  Flags        : "+Str(Flags)
      MeshInfo(a)\Material = Val(StringField(LoadMS3D_Lines(),3," "))
      Debug "  MaterialIndex: "+Str(MeshInfo(a)\Material)
      NextElement(LoadMS3D_Lines())

      Vertices = Val(LoadMS3D_Lines())
      MeshInfo(a)\vertices = Vertices
      Debug "  Vertices:      "+Str(Vertices)
      NextElement(LoadMS3D_Lines())
      ReDim Meshdata(Vertices)  
      
      For b = 1 To Vertices
        MeshData(b)\x  = ValF(StringField(LoadMS3D_Lines(),2," "))
        MeshData(b)\y  = ValF(StringField(LoadMS3D_Lines(),3," "))
        MeshData(b)\z  = ValF(StringField(LoadMS3D_Lines(),4," "))
        MeshData(b)\u = ValF(StringField(LoadMS3D_Lines(),5," "))
        MeshData(b)\v = ValF(StringField(LoadMS3D_Lines(),6," "))
        NextElement(LoadMS3D_Lines())
      Next b

      Normals = Val(LoadMS3D_Lines())
      MeshInfo(a)\normals = Normals
      Debug "  Normals:      "+Str(Normals)
      NextElement(LoadMS3D_Lines())
      
      For b = 1 To Normals
        MeshData(b)\nx = ValF(StringField(LoadMS3D_Lines(),1," "))
        MeshData(b)\ny = ValF(StringField(LoadMS3D_Lines(),2," "))
        MeshData(b)\nz = ValF(StringField(LoadMS3D_Lines(),3," "))
        NextElement(LoadMS3D_Lines())
        ;*normals + SizeOf(_Normals)
      Next b      

      

      Triangles = Val(LoadMS3D_Lines())
      MeshInfo(a)\triangles = Triangles
      Debug "  Triangles:      "+Str(Triangles)
      NextElement(LoadMS3D_Lines())
      
      ReDim Meshtri._triangle(triangles)
      
      For b = 1 To Triangles
        Meshtri(b)\a = Val(StringField(LoadMS3D_Lines(),2," "))
        Meshtri(b)\b = Val(StringField(LoadMS3D_Lines(),3," "))
        Meshtri(b)\c = Val(StringField(LoadMS3D_Lines(),4," "))
        NextElement(LoadMS3D_Lines())
        ;*triangles + SizeOf(_Triangle)
      Next b
      
      
      SetMeshData(mesh,smesh,MeshData(),#PB_Mesh_Vertex | #PB_Mesh_Normal | #PB_Mesh_UVCoordinate , 1, ArraySize(MeshData()))
      SetMeshData(mesh,smesh,Meshtri(),#PB_Mesh_Face , 1, ArraySize(Meshtri()))
      smesh+1
      
    Next a
    

    Materials = Val(StringField(LoadMS3D_Lines(),2," "))
    Debug "Materials: "+Str(Materials)
    NextElement(LoadMS3D_Lines())


    For a = 1 To Materials
      mesh = start_mesh+a-1
  
      ; material name
      Debug "  loading: "+LoadMS3D_Lines()
      NextElement(LoadMS3D_Lines())

      ambient_r.f = ValF(StringField(LoadMS3D_Lines(),1," "))
      ambient_g.f = ValF(StringField(LoadMS3D_Lines(),2," "))
      ambient_b.f = ValF(StringField(LoadMS3D_Lines(),3," "))
      NextElement(LoadMS3D_Lines())
      diffuse_r.f = ValF(StringField(LoadMS3D_Lines(),1," "))
      diffuse_g.f = ValF(StringField(LoadMS3D_Lines(),2," "))
      diffuse_b.f = ValF(StringField(LoadMS3D_Lines(),3," "))
      NextElement(LoadMS3D_Lines())
      specular_r.f = ValF(StringField(LoadMS3D_Lines(),1," "))
      specular_g.f = ValF(StringField(LoadMS3D_Lines(),2," "))
      specular_b.f = ValF(StringField(LoadMS3D_Lines(),3," "))
      NextElement(LoadMS3D_Lines())

      ; skip emmisive colors
      NextElement(LoadMS3D_Lines())

      ; skip shininess
      NextElement(LoadMS3D_Lines())

      ; skip transparency
      NextElement(LoadMS3D_Lines())
      
      ; colormap (texture)
      texture$ = Trim(LoadMS3D_Lines())
      texture$ = Left (texture$,Len(texture$)-1) ; remove "
      texture$ = Right(texture$,Len(texture$)-1) ; remove "
      Debug "  -> File: "+texture$
      If LoadTexture(mesh,texture$)=0
        Debug "Cant load texture "+texture$+" !!!"
        If CreateTexture(mesh,64,64)
          If StartDrawing(TextureOutput(mesh)) 
            Box(0,0,64,64,$00FFFF)
            Box(5,5,54,54,$FF0000)
            StopDrawing()
          EndIf
        Else
          ProcedureReturn 0
        EndIf
      EndIf
      If CreateMaterial(mesh,TextureID(mesh))
        MaterialShadingMode  (mesh, #PB_Material_Flat)
        SetMaterialColor(mesh,#PB_Material_DiffuseColor,RGB(diffuse_r *$FF,diffuse_g *$FF,diffuse_b *$FF))
        SetMaterialColor (mesh,#PB_Material_AmbientColor, RGB(ambient_r *$FF,ambient_g *$FF,ambient_b *$FF))
        SetMaterialColor(mesh, #PB_Material_SpecularColor,RGB(specular_r*$FF,specular_g*$FF,specular_b*$FF))
      Else
        ProcedureReturn 0
      EndIf
      NextElement(LoadMS3D_Lines())
      

      ; skip alphamap
      NextElement(LoadMS3D_Lines())
    
    Next a
    
    ;mesh=CreateMesh(#PB_Any)
    For a = 1 To Meshes
    mesh = start_mesh+a-1
   
    If CreateEntity(mesh,MeshID(mesh),MaterialID(start_mesh+MeshInfo(a)\Material),0,0,0)=0
       ProcedureReturn 0
      EndIf
      ScaleEntity(mesh, scale, scale, scale)
    Next a

    ClearList(LoadMS3D_Lines())
    ProcedureReturn a-1
  EndIf
  ProcedureReturn 0
EndProcedure

Re: bE3D Engine Wrapper for purebasic

Posted: Mon Aug 26, 2024 8:25 am
by Caronte3D
The old MS3d isn't the best election actually, if I remember well... it only can use one bone per vertex :?