GithubHelp home page GithubHelp logo

openb3d.mod's People

Contributors

druggedbunny avatar kippykip avatar markcwm avatar propuke avatar starfrost013 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

openb3d.mod's Issues

What about extend functions?

Do I understand correctly that your library is written in blitz basic? Why not in C++?

What about add next functionallity:

Add random generator.
Read\Write files.
Date\Time functions.
Direct access (pointer) to screen buffer.

It may be all wrong, of course.
Although it probably doesn't make sense.
What do you think about it?

CSG leaking

Using any CSG method causes a lot of model leakage.

Some examples:
csg_2019-09-10_09-03-06
csg_2019-09-10_09-03-19
csg_2019-09-10_09-03-25

Segmentation fault on Graphics3d Fullscreen mode 1, depth 32.

'; CreateTerrain Example 
'; --------------------- 
Framework openb3d.b3dglgraphics
DebugStop
Graphics3D 640,480, 32, 1

Local camera:TCamera=CreateCamera() 
PositionEntity camera,0,1,0 

Local light:TLight=CreateLight() 
RotateEntity light,90,0,0 

'; Create terrain 
Local terrain:TTerrain=CreateTerrain(128) 

'; Texture terrain 
Local grass_tex:TTexture=LoadTexture( "../media/zone/grass.jpg" ) 
EntityTexture terrain,grass_tex 

While Not KeyDown( 1 ) 

If KeyDown( 205 )=True Then TurnEntity camera,0,-1,0 
If KeyDown( 203 )=True Then TurnEntity camera,0,1,0 
If KeyDown( 208 )=True Then MoveEntity camera,0,0,-0.05 
If KeyDown( 200 )=True Then MoveEntity camera,0,0,0.05 

RenderWorld 

Text 0,0,"Use cursor keys to move about the terrain" 

Flip 

Wend 

End

Can this be fixed? i do not know exactly the terms and conditions for the line within graphics3d fullscreen that it crashes but that it does, let me know if you wish me to debug deeper to help.

TGlobal is duplicate (in BlitzMaxNG at least)

I just built the latest version in the latest bmx-ng release, but ran into an error with TGlobal, where it said it was a duplicate of that found in pub.reflection (TGlobal is defined from line 1422 of mod\brl.mod\reflection.mod\reflection.bmx).

I just renamed all instances in openb3d to TB3DGlobal and it built after that -- I renamed the file mod\openb3dmax.mod\openb3dmax.mod\inc\TGlobal.bmx to TB3DGlobal.bmx and then did a bulk find-in-files using NotePad++ - this was done by simply dragging the whole openb3dmax.mod folder onto NP++, right-clicking the resulting folder tree and choosing Find, then doing the replacement. After that it built fine here.

(Not sure why you don't run into this -- maybe to do with using Framework and specifying imports? I'm just doing Import openb3dmax.B3dglgraphics here.)

Thanks for keeping this going, just getting back to it!

TextureName is broken

TextureName returns a bunch of weird characters, but not the file path of the loaded texture like it should.
Returns "���"
when it should return something like
"wcrate.jpg"

Memory leakage when Freeing TSprites

Example:

While not(AppTerminate())
Local LeakyBoy:TSprite = CreateSprite()
FreeEntity(LeakyBoy)
GCCollect()
Wend

You will see in task manager that the memory usage will continue to rise.
Looks like it was just calling the standard TEntity FreeEntity instead of the TMesh FreeEntity code, which TSprites extend from normally.

I made a fix here:
Kippykip@736d79b

Completely unlinkable

I can't link anything using openb3dmax.

Building Vibranium [ 97%] Processing:Vibranium.bmx [ 98%] Compiling:Vibranium.bmx.gui.release.win32.x64.c [100%] Linking:Vibranium.exe C:/BMXNG/BlitzMax/mod/openb3dmax.mod/openb3dlib.mod/openb3dlib.release.win32.x64.a(geosphere.cpp.release.win32.x64.o):geosphere.cpp:(.text+0x5a09): undefined reference to stbi_load'
C:/BMXNG/BlitzMax/mod/openb3dmax.mod/openb3dlib.mod/openb3dlib.release.win32.x64.a(material.cpp.release.win32.x64.o):material.cpp:(.text+0x3c53): undefined reference to stbi_load' C:/BMXNG/BlitzMax/mod/openb3dmax.mod/openb3dlib.mod/openb3dlib.release.win32.x64.a(terrain.cpp.release.win32.x64.o):terrain.cpp:(.text+0x4791): undefined reference to stbi_load'
C:/BMXNG/BlitzMax/mod/openb3dmax.mod/openb3dlib.mod/openb3dlib.release.win32.x64.a(texture.cpp.release.win32.x64.o):texture.cpp:(.text+0xfb0): undefined reference to stbi_load' C:/BMXNG/BlitzMax/mod/openb3dmax.mod/openb3dlib.mod/openb3dlib.release.win32.x64.a(texture.cpp.release.win32.x64.o):texture.cpp:(.text+0x21dd): undefined reference to stbi_load'
collect2.exe: error: ld returned 1 exit status
Build Error: Failed to link C:/@Vibranium/Client/Src/Vibranium.exe
Process complete
`

is all I get.

CopyMesh Crashes OpenB3D - EXCEPTION_ACCESS_VIOLATION

copymesh crash example.zip
CopyMesh seems to flat out crash OpenB3D on loaded models, from what I understand it's this part in mesh.cpp
// recursively copy contents of child list before adding parent list<Entity*>::iterator it; for(it=child_list.begin();it!=child_list.end();it++){ Entity* ent=*it; dynamic_cast<Mesh*>(ent)->CopyMesh(mesh); }
Specifically the dynamic_cast<Mesh>(ent)->CopyMesh(mesh);* part, I'm not sure if it's trying to run it's own function or something?
I've attached an example, it would be very epic if this one could be fixed so I can have multiple entities with animated textures without having to LoadAnimMesh and cause stutters.
I'm still going to have a play around, I was able to restore minib3d behaviour where it copies the mesh without the animation, but hopefully we can fix this fully! 🤞 😃

Request: modern mesh format

It's hard to use OpenB3D without any modern model/mesh format support.
Blender for example, which is the most commonly used tool today, exports to things like .fbx, .obj, .glb/.gltf and OpenB3D supports none of them.

.glb/.gltf 2.0 is a fairly straight forward format, well documented and supports animations: https://www.khronos.org/gltf/
(the .glb file format is a binary form of glTF that includes textures instead of referencing them as external images)

.obj is also a very straight forward, static, simple and commonly used file format.

Can't test collisions if a type has "Collisions" with 2 or more other types.

I found out that if you use the "Collisions" function on a type to have collisions for multiple other objects, you can't actually test for it.
Functions such as EntityCollided and CountCollisions are broken because of it. This bug is not present in MiniB3D.

Here's the thread on SyntaxBomb
https://www.syntaxbomb.com/index.php/topic,4071.msg12630.html

Here's an example below that colors the bullet and changes the text if it collides with an object.
collisionbug.zip

It's likely not a fault in the wrapper but the library itself.

Request / Help: Implementing a ManualCollision function

Hey, I'm trying to implement a new ManualCollisions function into collisions2.c & collisions2.h

Basically it would work like so:
int ManualCollision(Entity& ent,Entity& ent2, int col_method, int col_response)
So instead of bothering with collision types and whatnot, I can just check between them manually within blitzmax.
Should return the number of hits while also doing the collision response.

The reasoning is because I've divided my map into chunks/blockmap, and I don't need objects testing collisions for far away objects or other entities in my project. Only every 500x500x500 metres. I've got the rest of the stuff handled but for it to work, I need a manual way of doing the collisions.

I imagine the game loop will look something like this:

While not AppTerminate()  
  ResetEntity(player)  
  if(ManualCollision(player, map, 2, 1) > 0)  
    print "hit!"  
  endif  
  RenderWorld()  
  Flip()  
Wend

However I'm struggling to even add the function, I think I've made something(?) inside collisions2.c and can compile the modified module fine. But I just can't seem to figure out how to call the .cpp function within BlitzMax itself.
As soon as I attempt to add the function to functions.bmx I get:

Compile Error
Identifier 'ManualCollision' not found

C++ isn't really in my expertise, it took me a while to get the first function to compile because I was using ** instead of & hahaha.
Any hints or clues?

EntityCollided() Breaks if multiple entities with the same type set, which collide more than 1 type.

Very oddly specific bug, it's the best way I could think of titling it.
From what I understand if you have multiple entities with the same type (such as a bullet) set on the entities and use Collisions() on them with two other types (such as the map, and some enemies). Whenever there are some bullets not hitting anything, the other bullets that are colliding won't be able to be tested with EntityCollided or CountCollisions().

I made an example attached below:
collisionbug.zip

I also made a syntaxbomb thread on it, which contains a YouTube video demonstrating the bug

What causes OpenB3D to crash on .B3D Blender exports?

Heya, I've briefly mentioned about this before on syntaxbomb a long time ago but never got around to making an example of this bug.
I've got two models, one exported in MilkShape 3D and the other exported in Blender with the MineTest .B3D exporter.
(https://github.com/Kippykip/B3DExport)

The blender model export reads fine in FragMotion and loads in classic Blitz3D, but on OpenB3D EXCEPTION_ACCESS_VIOLATION crashes occur.
(When I export without textures, the debugger scrolls to Local inst:Byte Ptr=LoadAnimMesh_)
https://i.imgur.com/Jb2y6E5.png

Here's the code for both BlitzMax-NG and Blitz3D, with the models and everything included.
Example.zip

Also I noticed that OpenB3D doesn't seem to light meshes with groups correctly, when compared to the Blitz3D example.

Question: Terrain LOD setting

Is there a way to change the dynamic terrain LOD?
I feel like it's a bit aggressive, and things just in front of the player always appears very blocky.

Ubuntu 22.04.2, X.org X server nouveau display driver segmentation fault in blitzmax OpenB3D

So i put on debug mode and stepped in, on this line it it has the segmentation fault

the segmentation fault happened after or on this line (I think, i had to go back and see.
If usecanvas=False Then TGlobal3D.gfx_obj=Graphics( width,height,depth,rate,flags ) ' gfx object

i switched to this driver after upgrading my system (Ubuntu 22.04.2 LTS) so i dont know if it were the system apt upgrades

i switched to the nvidia open kernel nvidia driver 530, no segmentation fault with the nvidia driver.

Is the display driver not for 3d acceleration video games?

Size_t overload warning

Hi Mark,

compiling your mod for bmx-ng gives a warning in the title. As this might create some wondering for a new user.

You could edit the file stbimageloader.mod\stbimageloader.bmx , line 44 and change:

Local bufLen:Int = StreamSize(stream) 

to:

?bmxng
     Local bufLen:Size_T = StreamSize(stream)
?Not bmxng
     Local bufLen:Int = StreamSize(stream)
? 

-Henri

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.