Powder Sim 2

  • firefreak11
    15th Jun 2013 Member 0 Permalink

    New game engine? Do we really need to do that? TPT is already thousands of lines of C++, most of which I have no idea how it works.

  • cyberdragon
    15th Jun 2013 Member 0 Permalink

    No, don't. Add to existing, unless you plan to have over 255 elements.

  • wolfy1339
    15th Jun 2013 Member 0 Permalink

    @firefreak11 (View Post)

    @cyberdragon (View Post)

    If you look through the comments @randalserrano brought it up to us:

    randalserrano:

    They all are huge mods themselves. It is going to be ridiculus to mix the 3 together to form a super mod. You would almost need a new engine to power it. We were thinking of making a new engine for powdersim before we abandined it. 

     

    Comment on Page 5

     

  • mniip
    15th Jun 2013 Developer 0 Permalink
    @cyberdragon (View Post)
    having more than 255 elements isn't hard. Internal type for particle type is int (4 bytes) since a long time ago, only thing you have to adjust is the save format
  • cyberdragon
    15th Jun 2013 Member 0 Permalink

    It's a mod, there won't be any saves.

  • mniip
    15th Jun 2013 Developer 0 Permalink
    @cyberdragon (View Post)
    stamps, local saves, ctrl+c/v/x/z cache? They all use the OPS format
  • cyberdragon
    15th Jun 2013 Member 0 Permalink

    Stamper Stamp loader, if it is, it doesn't care.

     

    void Simulation::Restore(const Snapshot & snap)
    {
    parts_lastActiveIndex = NPART-1;
    std::copy(snap.AirPressure.begin(), snap.AirPressure.end(), &pv[0][0]);
    std::copy(snap.AirVelocityX.begin(), snap.AirVelocityX.end(), &vx[0][0]);
    std::copy(snap.AirVelocityY.begin(), snap.AirVelocityY.end(), &vy[0][0]);
    std::copy(snap.AmbientHeat.begin(), snap.AmbientHeat.end(), &hv[0][0]);
    std::copy(snap.Particles.begin(), snap.Particles.end(), parts);
    std::copy(snap.PortalParticles.begin(), snap.PortalParticles.end(), &portalp[0][0][0]);
    std::copy(snap.WirelessData.begin(), snap.WirelessData.end(), &wireless[0][0]);
    std::copy(snap.GravVelocityX.begin(), snap.GravVelocityX.end(), gravx);
    std::copy(snap.GravVelocityY.begin(), snap.GravVelocityY.end(), gravy);
    std::copy(snap.GravValue.begin(), snap.GravValue.end(), gravp);
    std::copy(snap.GravMap.begin(), snap.GravMap.end(), gravmap);
    std::copy(snap.BlockMap.begin(), snap.BlockMap.end(), &bmap[0][0]);
    std::copy(snap.ElecMap.begin(), snap.ElecMap.end(), &emap[0][0]);
    std::copy(snap.FanVelocityX.begin(), snap.FanVelocityX.end(), &fvx[0][0]);
    std::copy(snap.FanVelocityY.begin(), snap.FanVelocityY.end(), &fvy[0][0]);
    std::copy(snap.stickmen.begin(), snap.stickmen.end()-2, &fighters[0]);
    player = snap.stickmen[snap.stickmen.size()-1];
    player2 = snap.stickmen[snap.stickmen.size()-2];
    signs = snap.signs;
    }

     

  • xetalim
    15th Jun 2013 Member 0 Permalink

    @Wolfy1339:

    The question is:WHAT element

  • The-Fall
    15th Jun 2013 Member 0 Permalink

    I dont recommend re-writting this game.

    I went about attempting to make a flash version... that did not go over so well. 

    Most of the code I cant even understand, I can understand parts of it, but there are some very obscure variable names. Especially in Simulation.cpp.

  • wolfy1339
    15th Jun 2013 Member 0 Permalink

    @xetalim (View Post)

     "Noble Gases"

    They are written in c so you will have to rewrite them in c++

Locked by jacob1: lock requested