bE3D Engine Wrapper for purebasic

Advanced game related topics
ultimzeus
User
User
Posts: 24
Joined: Thu Sep 20, 2018 12:27 pm

Re: bE3D Engine Wrapper for purebasic

Post 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:
ultimzeus
User
User
Posts: 24
Joined: Thu Sep 20, 2018 12:27 pm

Re: bE3D Engine Wrapper for purebasic

Post 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
Rinzwind
Enthusiast
Enthusiast
Posts: 679
Joined: Wed Mar 11, 2009 4:06 pm
Location: NL

Re: bE3D Engine Wrapper for purebasic

Post 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.
ultimzeus
User
User
Posts: 24
Joined: Thu Sep 20, 2018 12:27 pm

Re: bE3D Engine Wrapper for purebasic

Post 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.
User avatar
Distorted Pixel
Enthusiast
Enthusiast
Posts: 303
Joined: Sun Aug 29, 2021 4:34 am

Re: bE3D Engine Wrapper for purebasic

Post by Distorted Pixel »

I have tried twice to get the demo to no avail. I tried with and without my VPN on.
To be popular is way to much work. I just want to be me, myself and I. Oh no, does that mean I'm bipolar? :shock:

No one cares how much you know until they know how much you care
ultimzeus
User
User
Posts: 24
Joined: Thu Sep 20, 2018 12:27 pm

Re: bE3D Engine Wrapper for purebasic

Post 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
User avatar
Distorted Pixel
Enthusiast
Enthusiast
Posts: 303
Joined: Sun Aug 29, 2021 4:34 am

Re: bE3D Engine Wrapper for purebasic

Post 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
To be popular is way to much work. I just want to be me, myself and I. Oh no, does that mean I'm bipolar? :shock:

No one cares how much you know until they know how much you care
ultimzeus
User
User
Posts: 24
Joined: Thu Sep 20, 2018 12:27 pm

bE3D Engine Game Showcase

Post 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
Last edited by ultimzeus on Fri Aug 23, 2024 2:19 pm, edited 1 time in total.
User avatar
Caronte3D
Addict
Addict
Posts: 1355
Joined: Fri Jan 22, 2016 5:33 pm
Location: Some Universe

Re: bE3D Engine Wrapper for purebasic

Post by Caronte3D »

Error: libgcc_sjlij-1.dll and libstdc++-6.dll doesn't found :?
User avatar
vividpixel
User
User
Posts: 10
Joined: Tue Aug 09, 2022 9:36 am
Location: United States

Re: bE3D Engine Wrapper for purebasic

Post 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.
PureBasic supporter
ultimzeus
User
User
Posts: 24
Joined: Thu Sep 20, 2018 12:27 pm

Re: bE3D Engine Wrapper for purebasic

Post 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
ultimzeus
User
User
Posts: 24
Joined: Thu Sep 20, 2018 12:27 pm

Re: bE3D Engine Wrapper for purebasic

Post 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
User avatar
Caronte3D
Addict
Addict
Posts: 1355
Joined: Fri Jan 22, 2016 5:33 pm
Location: Some Universe

Re: bE3D Engine Wrapper for purebasic

Post 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.
ultimzeus
User
User
Posts: 24
Joined: Thu Sep 20, 2018 12:27 pm

Re: bE3D Engine Wrapper for purebasic

Post 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
User avatar
Caronte3D
Addict
Addict
Posts: 1355
Joined: Fri Jan 22, 2016 5:33 pm
Location: Some Universe

Re: bE3D Engine Wrapper for purebasic

Post by Caronte3D »

The old MS3d isn't the best election actually, if I remember well... it only can use one bone per vertex :?
Post Reply