Jump to content

Volker

Members
  • Posts

    75
  • Joined

  • Last visited

Posts posted by Volker

  1. void _stdcall EntityCollisionCallback( TEntity entity0, TEntity entity1, byte* position, byte* normal, byte* force, flt speed )
    {
    TVec3 hitforce;
    hitforce.X=force[0];
    hitforce.Y=force[4];
    hitforce.Z=force[8];
    }

     

    Ehm, you mean I should use C++ code in Blitzmax?

     

    The most of the EntityCollisionCallback parameters seem to be pretty useless if I can't get them in an usable format for Blitzmax.

  2. Hello,

     

    I have to load a lot of textures for my 2d animations.

    At the moment they are a few hundred. Every frame as a single .dds file.

    They are being preloaded at game start.

    Is it better to use for every animation one big file instead of a lot small ones?

    I'm thinking about something like vram fragmentation?

     

    Do I have to be scared about overstuffing the vram?

  3. @Tyler

    Yes, of course. Vec3s needed. But it throws the error

    already at the create method "Compile Error: Identifier 'Create' not found".

    @ VicToMeyeZR

    Thats just because the forum uncourteous changed code to comments.

    I had to add a ' at the end of every comment and forget that one.

  4. Hello Tyler,

     

    Could you possibly share how you did it?

     

    I really wanted to do that, but I thought my solution is

    not really good. That's why I wrote "sufficient".

    Ok, here it is.

    Code in Blitzmax:

     

    Function ApplyShockwave(position:tvec3, intensity:Float)
    Local body:TBody
    For Local gameobject:TGameObject = EachIn TGameObject.list
    	body = gameobject.body
    	If body <>NULL
    		' create a marker to make point of shockwave visible, replace with a pivot later '
    		Local marker:TMesh = CreateCylinder(8)	 
    		PositionEntity(marker, position)
    
    		Local mpos:TVec3 = EntityPosition(marker)
    		Local spos:TVec3 = EntityPosition(body)
    		Local distance:Float = EntityDistance(marker, body)
    
    		Local force:TVec3 = New TVec3
    		' substract position vecs  and calculate force to apply'
    		force.x = (spos.x - mpos.x) / distance
    		force.y = (spos.y - mpos.y) / distance
    		force.z = (spos.z - mpos.z) / distance
    
    		If distance < 1 Then distance = 1 ' because of massive force if <1 '
    		force.x = force.x / distance * intensity
    		force.y = force.y / distance * intensity
    		force.z = force.z / distance * intensity
    
    		Local tforce:TVec3 = TFormVector(force, marker, Null) ' thanks Flexman! '
    		If EntityDistance(TEntity(body), marker) < 10 ' shcokwave only affects bodies in this distance
    			AddBodyForce(body, tforce)
    		EndIf
    	EndIf
    Next
    

    I am cycling through all my gameobjects because I couldn't figure out how to pass the two vec3s

    to TAABB in Blitzmax at the moment.

    Local t:TAABB = New TAABB.Create(Vec2(10, 10), Vec2(0, 0))
    

    throws an error.

  5. I have a ship and an exploding mine.

    The mine shall create a shockwave which affects the ship.

    Playing with AddBodyForceAtPoint() did not lead me in the right direction.

     

    I could do a pointentity() from mine to ship and shoot an invisible body,

    but I don't like the idea.

     

    Inspirations, please.

  6. Thanks Josh.

     

    I've tried multiple values but it seems like its not working.

     

    If I use 10 for the first value, the shadow quality is perfect but the distance is very short. If I change it to 20, the distance increases but the quality drops.

     

    What exactly do these numbers mean? As in what is the first number do and the second number and the third number?

     

    I looked it up in the wiki but it only references the BlitzMax code version of it, not Lua/Ini or editor.

    http://www.leadwerks.com/wiki/index.php?title=SetShadowDistance

     

    Try to change the stage parameter of Shadowdistance.

    Do you do some scaling for your scene?

    May be this thread helps:

    http://forum.leadwerks.com/viewtopic.php?f=2&t=4819

  7. Fails here on my PC , I just can batch convert 1-4 files.

    Skips a few pics on my Laptop. From 32 only ~25 get converted.

    The png files I'm talking about are produced with TimelineFX, I don't know

    if they are incorrect.

×
×
  • Create New...