Giter Club home page Giter Club logo

Comments (5)

kz-dev avatar kz-dev commented on July 28, 2024

I will start to check this issue !

So I found AdvanceToLocation who take a turn. So we could store all first turn of each level and used them when we press "<" with a confirm prompt.

What do you think about this technique ?

from broguece.

tmewett avatar tmewett commented on July 28, 2024

I think storage of first turns on each level may not be necessary. How does the implementation of go to next level ('>') work? I think we might be able to define '<' as something like

  1. save (current depth - 1) to N
  2. rewind to start of recording
  3. do '>' max{0, N-1} times

from broguece.

kz-dev avatar kz-dev commented on July 28, 2024

">" implementation is just a "while" until we are to the next level (with some option to fastforwarding) :

pauseState = rogue.playbackPaused; previousDeepestLevel = rogue.deepestLevel; if (!rogue.playbackPaused || unpause()) { if ((unsigned long) rogue.deepestLevel < maxLevelChanges) { displayCenteredAlert(" Loading... "); commitDraws(); rogue.playbackFastForward = true; while ((rogue.deepestLevel <= previousDeepestLevel || !rogue.playbackBetweenTurns) && !rogue.gameHasEnded) { rogue.RNG = RNG_COSMETIC; // dancing terrain colors can't influence recordings nextBrogueEvent(&theEvent, false, true, false); rogue.RNG = RNG_SUBSTANTIVE; executeEvent(&theEvent); } rogue.playbackFastForward = false; rogue.playbackPaused = pauseState; displayLevel(); refreshSideBar(-1, -1, false); updateMessageDisplay(); } else { flashTemporaryAlert(" Already reached deepest depth explored ", 1000); } } rogue.playbackPaused = pauseState;

And the function

void advanceToLocation(unsigned long destinationFrame) {
allow us to go at a turn number.

Can we standardize "<" and ">" function with this function (advanceToLocation) ?

  • We just need to store an array with the turn number of each start level when we read the recording file (parseFile)
  • When < or > press key : Navigate in the array with advanceToLocation

It's just an idea, else I can implement your previous suggestion.

from broguece.

tmewett avatar tmewett commented on July 28, 2024

When the target location is in the past, advanceToLocation works in a similar way: by rewinding to the start and fast-forwarding. Because of this, storing any data is unnecessary - instead of fast-forwarding until we hit a certain turn number (advanceToLocation), we just fast-forward until we get to a certain depth. Does that make sense?

from broguece.

kz-dev avatar kz-dev commented on July 28, 2024

Yes, my reflexion was a bit stupid... I will propose you something !

from broguece.

Related Issues (20)

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.