SyntaxBomb - Indie Coders

Languages & Coding => Blitz2D, BlitzPlus, Blitz3D => Topic started by: Santiago on October 23, 2019, 06:08:43

Title: .B3D ENCRYPTED
Post by: Santiago on October 23, 2019, 06:08:43
i wish to protect my .b3d files, so, i compile my game, and i have directories with .b3d files.

i dont wan't make a big pack game, because is slow for client read a game with a huge packs.

I think, what happen if i change LOADMESH function, and make a new one like LOADMESH_ENCRYPT function.

when the loadmesh function read the file data, make the uncrypted process.

someone do something like that? do you think that is possible to do?
Title: Re: .B3D ENCRYPTED
Post by: Matty on October 23, 2019, 08:47:01
Is there any point since hardly anyone in the world knows b3d format ?
Title: Re: .B3D ENCRYPTED
Post by: TomToad on October 23, 2019, 09:08:02
A couple of ways come to mind.  One would be to download the Blitz3D source from github, find the LoadMesh function, and pass the data through a decrypt function.

Second would be to come up with your own mesh format, then use Blitz3D's AddSurface, AddVertex, AddTriangle etc... functions to buid the mesh manually.
Title: Re: .B3D ENCRYPTED
Post by: Derron on October 23, 2019, 09:28:29
> i dont wan't make a big pack game, because is slow for client read a game with a huge packs.


Why? Open a file, seek to the position, stream the data to the loader.


Aside of that: any data you load to something "useable" means someone could rip from there.


bye
Ron
Title: Re: .B3D ENCRYPTED
Post by: col on October 23, 2019, 10:55:42
There are a couple of ways to do this. 1st way is to convert from b3d to a format that only you know of. 2nd way is to encrypt the data itself requiring you to decrypt it.

QuoteAside of that: any data you load to something "useable" means someone could rip from there.
However it would stop the casual asset flipper from easily copying your hard work.
Title: Re: .B3D ENCRYPTED
Post by: Derron on October 23, 2019, 11:02:32
If he encrypts the data or has a custom format - he already could use what I suggested too: a datastream into a "package" (multiple files in one ".pack").


bye
Ron
Title: Re: .B3D ENCRYPTED
Post by: RemiD on October 23, 2019, 18:09:36
you don't need to encrypt anything, just create your own mesh format (with some obfuscation if you are paranoid), and that's all.
the structure of a mesh i :
mesh
surface(s)
  vertice(s)
  triangle(s)
  brush/material
   color
   alpha
   fx
   blend
   texture(s)

and for rigged skinned animated meshes you need to add
bones/joints
skinnedvertices
weights
animations
poses/frames
  bones scales rotations positions

to create bones (joints), and skinned vertices, and weights, you will need the update B.002 (or B.003) made by Bobysait...
here : http://mojolabs.nz/posts.php?topic=105408
Title: Re: .B3D ENCRYPTED
Post by: MrmediamanX on November 20, 2019, 07:09:30
I generally compile all assets into a single exe using Blitzmedialinker, If I need to compress files down I tend to use BBCruncher
just keep in mind the less deeper within directories/folders the assets are, the quicker the decompression come runtime.
Title: Re: .B3D ENCRYPTED
Post by: STEVIE G on November 20, 2019, 18:07:59
Quote from: MrmediamanX on November 20, 2019, 07:09:30
I generally compile all assets into a single exe using Blitzmedialinker, If I need to compress files down I tend to use BBCruncher
just keep in mind the less deeper within directories/folders the assets are, the quicker the decompression come runtime.

Do you have links to these?  Do they work with Blitz3D?
Title: Re: .B3D ENCRYPTED
Post by: MrmediamanX on November 21, 2019, 03:21:18
both tools can be found here. indeed they work with blitz3d. to compile multi source includes/BB files just select and add them like any other assets...cool :)
http://www.puretools.eu/eng/rechts.htm