• Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
  • Read Evilhog's interview with Gregory Alper, the original composer of the music for WarCraft: Orcs & Humans 🔗Click here to read the full interview.

How About...

Status
Not open for further replies.
Level 8
Joined
Nov 9, 2008
Messages
502
Bear in mind, this idea is coming from a perspective of a pvp map with minimal number of units/entities.

I was just wondering and an idea came to me which could be useful for many pvp maps...

A real, in-game, replay of a recorded period mimmicking unit movement and environment.

So it could function like an instant action replay providing an in game replay for the last, say, 10 seconds.

The concept of it isn't too complex. Just a matter of setting tons of variables and remwritting them every something (0.1??) seconds. The the game would have a short (10 seconds) history of the positions of any units/projectiles.
Somehow would have to register each action too, like spells and such, maybe create a register with a time stamp.

Then hit a button and the game pauses and replays the last 10 seconds, reading each iteration of variables subsequently to then manipulate each unit command; producing a cinematic.

This would be especialy interesting for player vs player maps to replay the killing blow end game supah punch of any such object. Especially if you have made a highly customised interface on a tangent to the traditional warcraft maps, where you have a potentially high level of feedback from triggers to register as events to be recorded.
JASS:
function PlayBack takes something returns maybe

loop 
LoopNo = n of 6000
grab loopN variables
define playback speed
define clocked actions

perform defined actions
move units
animate
effects
projectiles

endloop
endfunction

Possible Issues
  • Can Warcraft handle it? FPS would take a big hit.
  • The Blizzard created replay system seems to work in an almost exact fassion, some possibilities to get the replay data as its recorded by the in-built one?
  • The system may be too complex or resource hungry for larger maps.

Like?
 
Last edited:
Level 4
Joined
Apr 16, 2009
Messages
85
i don't think it would be a nice idea for large maps (to resource hungry), but it would defiantly be a cool thing

for the implementation side i would use event for that as its got the same O() but in reality recording every action will take much less space as an timer loop

with a timer you would have to record 25 frames per second that means you would fill a array of 8190 elements in about 5,5 minutes when only recording for one unit - with 10 units you would fill it in 30 sec and you could still miss out on something - so for very small implementations i would just catch every order save it into 4 arrays (1. unit, 2. order, 3. exact time (relative to start), 4. order target) and o/c all units start x,y/facing/owner/fly height and that would still be pretty messy if the units could move before you track them so the only real implementation is see is for arenas (for these regular battles that take place in most arenas)

would be pretty cool as a mini replay (and no you can't access replay data/and or play it)

oh and 10 seconds sounds fair enough you won't need more in most cases (and if you have a trigger for all event anyway you wont really need extra cpu time (just a tiny little bit nobody will notice anyway))
 
Level 8
Joined
Nov 9, 2008
Messages
502
for the implementation side i would use event for that as its got the same O() but in reality recording every action will take much less space as an timer loop

Can you explain this?

It would fit perfectly into my map where I have put everything on a 2D plane and I'm controlling all movement through triggers anyway....

2 ways to do it would either:
Record actions when they happen and any targets then replicate those orders (less resources needed, potentially less accurate)
...or/and...
Record positions and effects then piece together to make a cinematic (more resources, potentially more accurate)
 

Dr Super Good

Spell Reviewer
Level 64
Joined
Jan 18, 2005
Messages
27,287
The whole problem is you can not reset the random number seed. If everything is triggered it is easy but for non triggered actions involving random numbers, it will not replay 100% exact.

The best would be to try and simulate a replay, whereby the last attack and animations and stuff is replayed in slow motion, but not 100% correctly.
 
Level 8
Joined
Nov 9, 2008
Messages
502
In any case, for traditional maps it would have to have in-built damage detection to even consider replicating damage stats, not to mention this random number seed you have mentioned.

Then a whole host of problems arise to actualy replicate exp and stats, far more complex than I first thought and would require too many in-built systems and customisation to any maps wanting to use it.

However, for custom made maps it is not unfeasable to achieve this. It all depends on the map.

I agree with DrSuperGood; probably making a replication of a replay would suffice. I'm already triggering damage and all attack animations, as well as basic movement also so I can get feedback from these triggers.

I was thinking about the build of the system. This is how I would do it. Please comment if you think of a better way.

A master integer array with range of 6000 to clock when a 0.1 second timer expires.
An array for each possible type of command, for each unit, when command is given it will place the information into the array index corresponding to the current master array index.
During playback, will check each variable array, if entry == null then skip, else do action.

That is a basic explanation, which I see in my head.

Aww man, couple this with some sweet cameras and its gonna be epic!

Question: If a hashtable is a series of arrays anyway, you think it would perform just as well as if I did it manualy with arrays?
 
Last edited:
Status
Not open for further replies.
Top