Git Product home page Git Product logo

Comments (14)

pandasquee avatar pandasquee commented on August 10, 2024

Please see log: https://pastebin.com/9zanjqg7

from aspace.

mloftis avatar mloftis commented on August 10, 2024

I didn't look terribly close but a few pointers (I did mention the softcode is rough) --- @space/makeship will not set the &SPACE attrib. The @space/load included requires an at least empty &CONSOLES attrib to load a ship into sdb on startup, without that you get Lots Of Weirdness because sdb is never told to fully read the object in. To fix the SPACE attrib in an already loaded SPACE-OBJECT th sdb(p,<SDB#),1,sp) to put the thing in space 1. Objects in different spaces don't see eachother, and can be "bugged" ... they can be docked to an object in a different space when created. @space/makeship in this one also I don't think is setting up correctly -- always assumes docked/landed/connected or somesuch (might be comign from the included specs) If it's a SPACE-OBJ w/o a CONSOLES attrib you're better off fixing the space-object attribs and then re-reading it using th sdb(r,

from aspace.

mloftis avatar mloftis commented on August 10, 2024

Also dbl check the existing STARTUP's .... ISTR @space/load like behavior in two places (on #10 and #1?) -- and maybe one of them didn't have the hasattrp(...CONSOLES...)

from aspace.

mike347 avatar mike347 commented on August 10, 2024

from aspace.

mloftis avatar mloftis commented on August 10, 2024

Not seeing each other and not producing power sounds like space code is not iterating. Make sure space iterate is called every second as the wiki instructions indicate (hardcode).

Hadn't thought that iterating wasn't working hah....you can check number of objects being iterated by (as wiz) th sdb(i) -- that'll give you count of active objects AND iterates them (once) if things unstick for one cycle with a th sdb(i) then your timer isn't firing....so you make sure the 1s timer is in local.c or you build a "space clock" object in SC that iterates it from SC (Thats how we used to do it :D) &SPACE #nn=0 isn't special AFAIR and "works". undocking, setting power, etc, will all work, just nothing happens because no iterate is happening....which with STARTUP shown on #10 there could. Which SPACE num you use as "the real world" is entirely up to you. We used to use one of the other SPACEs to pre-position anything we wanted to pop in/out. (for TPing say transwarp transits....I was thinking about setting up a let the players discover real transwarp and creating a network of TW gates where the exit was into "transwarp" space and there were the other gates relatively close together, in heavy nebula, so it wasn't 6+hrs of travel time...)

from aspace.

pandasquee avatar pandasquee commented on August 10, 2024

It is not iterating, when I used th sdb(e), everything ticked and worked for a second. I am still not sure where to look in the hardcode to fix that though.

from aspace.

pandasquee avatar pandasquee commented on August 10, 2024

My local.dst entry:

{

/* Register local_timer to be called once a second. You can also

  • register other callbacks to run at other intervals. See local_timer()
  • below for an example of what the callback function needs to do if it
  • should be run more than once.
  • Arguments are: Number of seconds from now to run, the callback function,
  • a data argument to pass to it, and a softcoded event name to run at the same
  • time. The latter two can be null pointers. The callback function returns true
  • if the softcode event should be triggered, false if it shouldn't.
  • You can also register call backs in milliseconds, see below for example.

/
#if 1 /
Change to 1 if you need local_timer functionality. /
sq_register_loop(1, local_timer, NULL, NULL);
#endif
#if 1 /
As above, but in milliseconds */
sq_register_loop_msec(250, local_timer, NULL, NULL);
#endif

(void) initSpace(); /**< ASpace Related */
}

/* Add you own runtime configuration options here, and you can set

  • them in mush.cnf.
    */
    void

from aspace.

mloftis avatar mloftis commented on August 10, 2024

Only enable the 1s or the 250ms. And aspace only needs/wants the 1s. And there's more than just one place you need to make edits. Just changing the #if isn't enough. Follow the wiki.

from aspace.

pandasquee avatar pandasquee commented on August 10, 2024

I made all of the changes to local.dst according to the wiki before i compiled pennmush. I just think that I might have put that in the wrong place or not configured it correctly.

from aspace.

mloftis avatar mloftis commented on August 10, 2024

sdb(e) doesn't tick, it just finds what sdb considers the first available SDB (which may or may not be true, because you could have S-Os not loaded) ... sdb(i) does run do_space_db_iterate -- which if you've followed the instructions -- is in local_timer in local.dst -- local.c won't get overwritten/updated by building -- it's a copy from local.dst if it doesn't exist --

We already established earlier you weren't carefully following the wiki WRT local.dst changes, and had missed even adding initSpace initially. So go back to that, make SURE you've done everything...theres some stuff for dump/shutdown and the timer along with that initSpace. And the wiki...I'll make an edit to mention there's a couple #if 0's at least in 1.8.8...

from aspace.

mloftis avatar mloftis commented on August 10, 2024

Having the timer running 5x/sec I won't directly hurt anything with ASpace...just not sure. It was built sort of assuming about 1s iterate calls, and only has a 1s resolution (it stores the last time an sdb was updated, and uses the delta between that time and now wherever it's making calculations-over-time like movement, main reactor coming up, etc)

But you really do not want to call it more often. You also don't want to unnecessarly increase the internal definition of the maximum number of space-objects, because it walks the whole thing every time it ticks, for active sdb's with a valid type it then does all the details. sdb(i) returns that count of active+valid type back to you after calling do_space_db_iterate. On modern hardware...eh...whatever number it has as default is probably conservative (remember this was all written when ~300Mhz was smoking fast)

from aspace.

pandasquee avatar pandasquee commented on August 10, 2024

I'm sorry I'm new and trying really hard to understand this. Thanks for the patience and help. I'll go back and make sure ive added everything. I am just not sure im adding things to the correct place. for example in

/
#if 1 / Change to 1 if you need local_timer functionality. /
sq_register_loop(1, local_timer, NULL, NULL);
#endif
#if 1 / As above, but in milliseconds */
sq_register_loop_msec(250, local_timer, NULL, NULL);
#endif

}

/* Add you own runtime configuration options here, and you can set

them in mush.cnf.
*/
void

where am I supposed to add (void) do_space_db_iterate(); /**< ASpace Related */
also, if i change this file do i have to ./configure or make install before sh restart?

from aspace.

mloftis avatar mloftis commented on August 10, 2024

It tells you which aspace functions go in existing callback functions in the wiki. https://github.com/aspace-sim/aspace/wiki/local.dst-changes -- ANY HardCode (C/pennmush) change requires a recompile (make install) and at least @shutdown/reboot. The Wiki really does assume you know how to do basic C development, and basic PennMUSH development (Which is why until just five minutes ago there were no details about the gotchas). ....

Lets take this out of issues, join me over on my discord? https://discord.gg/GbX6VRmX

from aspace.

pandasquee avatar pandasquee commented on August 10, 2024

Fixed with lots of handholding from @mloftis .

from aspace.

Related Issues (14)

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.