Jump to content
The Dark Mod Forums

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


Lavender
 Share

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.

 Share

  • Recent Status Updates

    • freyk

      Some years earlier i created some launchers for TDM. uploaded today some new sourcecode and executables on my github repo.
       
      · 0 replies
    • Epifire

      Say, I know it's been a while since the site got overhauled from the crash. But did we ever figure out if/how to get the recent topics & replies list back? It's not a total deal breaker but it was nice for becoming a thread creeper again...


      · 2 replies
    • Epifire

      Some of you who've been on the TDM discord know I was out of work last Winter, just putting in hrs for the developer portfolio. Currently I've been working a seasonal job to pay the bills and now I'm finally in my last week before I get bumped off. Things will be tight but I'm planning a long off period to make as much content as I can. Big plans in Unreal Engine as well as my most ambitious TDM collab yet! Never been so excited to be a stuck at home to pursue my life's work. With a lotta time and maybe some luck, I'm hoping to get enough art work done that I may start applying around to studios.
      · 4 replies
    • STiFU

      I finally got around to play Prey and I truly loved it. It is an incredible homage to System Shock and Deus Ex. While the gameplay is not en par with those two titles, the game makes up for that with its well written lore and story. The whole "world" just feells so authentic and it features a ton of really god environmental story-telling. Recommended for every immersive sim fan, i.e., everyone on this forum.
      · 2 replies
    • jaxa

      Alder Lake has arrived:
      https://forums.thedarkmod.com/index.php?/topic/18055-2016-cpugpu-news/page/15/&tab=comments#comment-466190
       
      · 0 replies
×
×
  • Create New...