Jump to content
The Dark Mod Forums

Would "time rewind" be possible in the TDM engine?


Lavender

Recommended Posts

My intuition is it'd take quite a bit of source code tweaking.

Of course, having the full source code, anything is technically possible.

It would just have to be a fork project.

The only other option would be some very clever scripting to give the illusion of reversing time (like playing reversed animations, etc).

That'd take a lot of work too, but at least that could be played by people.

What do you see when you turn out the light? I can't tell you but I know that it's mine.

Link to comment
Share on other sites

Auto-restarting the map on failure is already easily scriptable. But if with "reloading" you meant going back to arbitrary points in the past... then nope - not without implementing some sort of game state history in the engine itself.

 

But for a single mission, there might be ways to fake it without changing the engine:

- Scripting saves and reloading of those

- Storing the state history (like locations and status changes) for selected game world objects and reinitializing those on demand.

 

The id Tech 4 scripting system is touring complete but does not support arrays of arbitrary lengths. So you probably would need to invent some workaround for that (maybe by using custom entities for storage) to keep track of the selected entities' state or created saves.

Edited by Abusimplea
Link to comment
Share on other sites

For this type of gameplay (rewind while stealthing) you could take a look at the game "Shadwen". This game does exactly this.

Doing it like in shadwen would certainly need C code inside the engine.

 

Hmm, could saves be made to and kept in memory while the mission is loaded?

This would also need code in the engine. It seems to be possible to safe and load to and from disk by script though. The wiki page about Saint Lucia mentions the needed script "events". Fun fact: That page about a mission also is the only page to mention the loadGame "event". saveGame is also mentioned in the TDM Script Reference...

Link to comment
Share on other sites

I had an idea - imagine a Sands of Time -style "rewind" system, but used for stealth. You explore the map, note events (maybe on an automatic notepad that gets new notes from in-map triggers) and the time they take place on, and plan an optimal route from AI movements. The map would have a deadline via a timed objective to force you to plan.

 

Obviously this type of gameplay is not for everyone - I'm not even sure it's my own cup of tea - but I'm curious as to if TDM could support this. You could simply reload the map yourself until you get it right, but that would not be quite the same. Could the map reload in the background, while in-engine events take place? Would this require engine modifications?

I thought about something like this a while ago, too. Sort of "Groundhog Day". The most direct approach would be to reset the game via loading a saved game (or simple restarting the mission), but allow for an additional data set to allow changes to be made depending on the players actions during their previous playthrough. One possibilty that came to my mind was to use xdata, as currently used for readables. Currently this system is for read-only purpose, though (at least as far as I am aware of), so the ability to write data would need to be added. I guess this would be a minor tweak in the source code, though.

 

Doing the mission load in the background while the mission is still running would be a major change, though, and depending on how exactly the engine handles mission date it might even be an impossible undertaking. It would still be beneficial to investigate this imho, as such a feature, used by several modern games, could also be used for other purposes. Splitting up large missions into smaller ones is one thing that comes to my mind. Getting to see the loading screen is the one thing that makes this alway problematic. Think of Thief 3 compared to Thief 4.

 

Letting the time run backwards as in Sands of time would be an even more dramatic change to the source code from my expectation, and is very unlikely.

 

However, all of those things need code changes, no matter how big or small they might be. So it is nice that you "had an idea", but unless you are a coder .... :)

  • Like 2

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to comment
Share on other sites

I'm sorry, I had to be more clear. Map in d3sm_backintime.pk4 has architecture, swapped by something (I'm not very experienced with id tech 4) like scripting and has it explained as ostensibly time manipulation. At first, I, considering requirement of BSP recompilation, thought about teleportation between different, yet similar parts of map, but noclip revealed nothing like that.

Edited by Boiler's_hiss
Link to comment
Share on other sites

At first, I, considering requirement of BSP recompilation, thought about teleportation between different, yet similar parts of map, but noclip revealed nothing like that.

I think Dishonored 2 and other games use teleportation between different parts of the maps to simulate different times.

Link to comment
Share on other sites

I'm sorry, I had to be more clear. Map in d3sm_backintime.pk4 has architecture, swapped by something (I'm not very experienced with id tech 4) like scripting and has it explained as ostensibly time manipulation. At first, I, considering requirement of BSP recompilation, thought about teleportation between different, yet similar parts of map, but noclip revealed nothing like that.

It is done via scripting. Parts of the map are hidden whereas others (which started hidden) are shown.

FM's: Builder Roads, Old Habits, Old Habits Rebuild

Mapping and Scripting: Apples and Peaches

Sculptris Models and Tutorials: Obsttortes Models

My wiki articles: Obstipedia

Texture Blending in DR: DR ASE Blend Exporter

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recent Status Updates

    • Petike the Taffer  »  DeTeEff

      I've updated the articles for your FMs and your author category at the wiki. Your newer nickname (DeTeEff) now comes first, and the one in parentheses is your older nickname (Fieldmedic). Just to avoid confusing people who played your FMs years ago and remember your older nickname. I've added a wiki article for your latest FM, Who Watches the Watcher?, as part of my current updating efforts. Unless I overlooked something, you have five different FMs so far.
      · 0 replies
    • Petike the Taffer

      I've finally managed to log in to The Dark Mod Wiki. I'm back in the saddle and before the holidays start in full, I'll be adding a few new FM articles and doing other updates. Written in Stone is already done.
      · 4 replies
    • nbohr1more

      TDM 15th Anniversary Contest is now active! Please declare your participation: https://forums.thedarkmod.com/index.php?/topic/22413-the-dark-mod-15th-anniversary-contest-entry-thread/
       
      · 0 replies
    • JackFarmer

      @TheUnbeholden
      You cannot receive PMs. Could you please be so kind and check your mailbox if it is full (or maybe you switched off the function)?
      · 1 reply
    • OrbWeaver

      I like the new frob highlight but it would nice if it was less "flickery" while moving over objects (especially barred metal doors).
      · 4 replies
×
×
  • Create New...