Author Topic: [Static Map] Mario Kart DS: Rainbow Road! [Reduced Datablocks!]  (Read 3732 times)

complete with working textures, collision and transparency.
since Blockland's vehicle physics are so bouncy, most cars will end up bouncing off of the map. Most cars are also too slow to do the loops. I modified the SpeedKart handling and made them compatible with the map! (can do loop-de-loop, etc)

https://leopard.hosting.pecon.us/dl/qyruv/Map_DSRainbowRoad.zip  <- Should have better transparency, and like under 1% of the original datablocks.

Karts: still working on, will upload again today


enjoy.
« Last Edit: July 15, 2019, 11:50:21 AM by sadboi »

Neato.  Collision seems to be solid.  That's pretty cool.

LegoPepper found a way to reduce the datablock count on maps like these:
Quote from: LegoPepper on 01/14/2019 @ BCC:StaticTerrainResearch
Code: [Select]
package LoadMapPackage
{
    function GameConnection::startLoad(%client)
    {
        if(!isObject("MapGroup"))
        {
            exec("Add-Ons/Map_Planar_Fields/place.cs");
            MissionCleanup.add("MapGroup");
        }
        Parent::startLoad(%client);
    }
};
activatepackage(LoadMapPackage);

datablock staticShapeData(SSPlaneData)
{
    shapefile = "Add-Ons/Map_Planar_Fields/shapes/Plane.dts";
};

function addExtraResource(%name)
{
    if (MissionGroup.addedResource[%name]) return;
    MissionGroup.addedResource[%name] = "1";
    $EnvGuiServer::Resource[$EnvGuiServer::ResourceCount] = %name;
    $EnvGuiServer::ResourceCount++;
    setManifestDirty();
}

function loadShapes()
{
    %pattern = "Add-Ons/Map_Planar_Fields/shapes/*";

    %file = findFirstFile(%pattern);

    while(isFile(%file))
    {
       // echo("adding " @ %file);
        addExtraResource(%file);
        %file = findNextFile(%pattern);
    }
   
}

loadShapes();

As far as I can tell, this method puts the .dts collision shapes into the environment section of the file manifest(the one used for skyboxes and such).  Then the TSStatic objects you use for collision don't need a datablock anymore.  They just need the client to have downloaded their .dts shape.
That should reduce the datablock count of this map by ~1000.

Also, because you're using transparency, you should split any nontransparent objects such as the pipes off as a separate object.  I think that would help with the pipes clipping through the track.

Neato.  Collision seems to be solid.  That's pretty cool.

LegoPepper found a way to reduce the datablock count on maps like these:
As far as I can tell, this method puts the .dts collision shapes into the environment section of the file manifest(the one used for skyboxes and such).  Then the TSStatic objects you use for collision don't need a datablock anymore.  They just need the client to have downloaded their .dts shape.
That should reduce the datablock count of this map by ~1000.

Also, because you're using transparency, you should split any nontransparent objects such as the pipes off as a separate object.  I think that would help with the pipes clipping through the track.
:) Thank you, Tendon! And proxy thanks to LegoPepper. If that script works, I'm gonna go on a map-making marathon... I ported Slopes but it had 3k datablocks.

I realize my mistake with the object separation. The track, though transparent, isn't a TSStatic object - just a transparent material. It's contained in the same object as the opaque pipes. I don't want to make the track TSStatic because I like how the transparency looks as it is, and I had a feeling it wouldn't look how I want it to if it were TSS. Anyway, I'll separate the track, and hopefully things will appear properly. If not, I'll just have to make the track TSS too. Thanks again!

Oh, also, regarding the collision - I find that once I've mapped all the collision, scaling the collision pieces (in Blender) to 0.99 so that there are little gaps between the pieces seems to help avoid vehicles getting stuck, bumped, launched, etc.
« Last Edit: July 14, 2019, 06:39:25 PM by sadboi »

:) Thank you, Tendon! And proxy thanks to LegoPepper. If that script works, I'm gonna go on a map-making marathon... I ported Slopes but it had 3k datablocks.

I realize my mistake with the object separation. The track, though transparent, isn't a TSStatic object - just a transparent material. It's contained in the same object as the opaque pipes. I don't want to make the track TSStatic because I like how the transparency looks as it is, and I had a feeling it wouldn't look how I want it to if it were TSS. Anyway, I'll separate the track, and hopefully things will appear properly. If not, I'll just have to make the track TSS too. Thanks again!

Oh, also, regarding the collision - I find that once I've mapped all the collision, scaling the collision pieces (in Blender) to 0.99 so that there are little gaps between the pieces seems to help avoid vehicles getting stuck, bumped, launched, etc.
Might have to make a tutorial on how to use that datablock decreasing script.. Also making the road a TSStatic would make the transparency work with shaders.

Might have to make a tutorial on how to use that datablock decreasing script.. Also making the road a TSStatic would make the transparency work with shaders.
I figured the script out. Had to go in data.cs
I'm gonna make a voiced-over video tutorial on making a staticmap, as well as using the datablock reducer.
I also fixed the object xraying, making the track TSStatic would remove the transparency because the texture is actually fully opaque - I left it as a regular Static so Blockland would do its weird half-transparency thing.