Author Topic: Contest Entry - Time Shift  (Read 8568 times)

0 Members and 1 Guest are viewing this topic.

SirCmpwn

  • Guest
Re: Contest Entry - Time Shift
« Reply #15 on: May 20, 2011, 02:01:04 pm »
700 frames...a few frames...
SirCmpwn, what the Hell is your fps?
What I mean is that it is currently tracking 700 frames, which is about 30 seconds of rewinding time.  I will eventually restrict the amount the player can actually rewind to a few seconds.  The FPS is just over 20.  Let me explain more about rewinding actually works:
First of all, every equation in the whole thing, instead of saying "+1", "-2", etc, instead says "+M", or "-(2*M)".  For example, the movement code says: "Y+(M*getKey(1))-(M*getKey(4))→Y" (I'll add better physics soon).  M represents the time mode.  When time progresses normally, M is 2.  When paused, M is 0.  When slowed down, M is 1, and 4 when fast forwarding.
Rewinding is handled somewhat differently.  I use the variable K to store the current keypress (getKey→K, plus some fancy stuff to handle multiple keys).  Almost every place that would normally use a getKey(*) instead checks K.  In addition to this, the value of K is logged every frame.  When in rewind mode, instead of using "getKey→K" to set this frame's K value, it instead pulls a logged keypress and uses it.  In addition to this, M is set to -2 while rewinding.  What this all adds up to is that every action is reversed, and the keys are pressed in reverse order.  This seems to me what the fastest and most efficient solution was.

I also have to keep track of some more things later on, like a list of destroyed objects and what time they were destroyed at, and perhaps some magic with physics (cause objects that stop have a velocity of 0, which is a big gaping hole for inverse equations).

Also, I have a decent demo, I just need to add more to it and pull it off my calculator for screenies.  I'll be doing a lot of cool stuff for that, don't worry.  It may be a while, since I'm quite busy with graduation and job hunting and such.
« Last Edit: May 20, 2011, 02:01:33 pm by SirCmpwn »

Offline aeTIos

  • Nonbinary computing specialist
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3915
  • Rating: +184/-32
    • View Profile
    • wank.party
Re: Contest Entry - Time Shift
« Reply #16 on: May 20, 2011, 02:08:10 pm »
Sounds cool! Also, Art_Of_Camelot: You double-posted (Probably double-clicked or so). You can't help though, cuz they are on 2 pages (And its probably a mistake cuz its exactly the same msg). (Not offensive, I just noticed it ;) )
I'm not a nerd but I pretend:

Offline ztrumpet

  • The Rarely Active One
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 5712
  • Rating: +364/-4
  • If you see this, send me a PM. Just for fun.
    • View Profile
Re: Contest Entry - Time Shift
« Reply #17 on: May 20, 2011, 07:15:33 pm »
Wow.  This sounds awesome!  I can't wait. :D

Offline TIfanx1999

  • ಠ_ಠ ( ͡° ͜ʖ ͡°)
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 6173
  • Rating: +191/-9
    • View Profile
Re: Contest Entry - Time Shift
« Reply #18 on: May 20, 2011, 07:33:22 pm »
Sounds cool! Also, Art_Of_Camelot: You double-posted (Probably double-clicked or so). You can't help though, cuz they are on 2 pages (And its probably a mistake cuz its exactly the same msg). (Not offensive, I just noticed it ;) )
Fixed. Thanks for pointing it out. I post from my phone when I'm at work and it likes to double post sometimes. Even if I do notice I can't delete posts from work because of my phone's limited browser.

@Sir: Can't wait to see screenies of this in action. That's a lot of rewind time to keep track of! I also hope that you've had a chance to back this (and your other projects)up. Data loss is a bitch.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Contest Entry - Time Shift
« Reply #19 on: June 07, 2011, 10:49:38 pm »
This idea seems interesting. I hope you can finish it. Also do you think you'll be able to make screenshots soon?

Offline leafy

  • CoT Emeritus
  • LV10 31337 u53r (Next: 2000)
  • *
  • Posts: 1554
  • Rating: +475/-97
  • Seizon senryakuuuu!
    • View Profile
    • keff.me
Re: Contest Entry - Time Shift
« Reply #20 on: June 07, 2011, 11:04:28 pm »
Sir told me that he can't do anything because his parents confiscated his calc; it's a pity because i really wanted to see ow this would turn out ><
In-progress: Graviter (...)

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Contest Entry - Time Shift
« Reply #21 on: June 08, 2011, 12:45:25 am »
Ouch that sucks. I wonder if he'll have time to rush in his entry during the final 2 weeks of the contest (after he moved out)... but again he might be busy at first. When I moved out, I spent an entire week cleaning and stuff. X.x

Offline TIfanx1999

  • ಠ_ಠ ( ͡° ͜ʖ ͡°)
  • CoT Emeritus
  • LV13 Extreme Addict (Next: 9001)
  • *
  • Posts: 6173
  • Rating: +191/-9
    • View Profile
Re: Contest Entry - Time Shift
« Reply #22 on: June 10, 2011, 08:47:34 am »
D: Well, regardless of if it gets finished in time for the contest, it's still something I'd like to see completed. =)