Author Topic: Freeplay  (Read 112813 times)

0 Members and 3 Guests are viewing this topic.

Offline MikeyMouse

  • Senior Member
  • Posts: 1690
  • Vladivostok Brother | Addicted To Taxi's
    • View Profile
Re: Freeplay
« Reply #195 on: January 05, 2013, 05:09:48 PM »
It might just be my PC dannye, but on the new version of freeplay in SAiVC, if I freeze the replay, then use the 'c' camera, place it where I want it, and then unfreeze the replay, my game crashes. It only occurs when the camera is not facing the player, not sure what's going on, but it's happening every time without fail.

Offline Dannye

  • Veteran Member
  • Posts: 3580
    • View Profile
Re: Freeplay
« Reply #196 on: January 05, 2013, 05:30:41 PM »
Hmm, actually that sounds kinda like what I was just describing (does it?), perhaps I shouldn't be too surprised.

Does it crash if:
  • You try the exact same thing in VC?
  • You do the exact same thing but don't touch the mouse while the camera is frozen?
      (I know this mightn't help because you probably want to use the mouse to angle the camera, but it would be good to know if it is the same crash I am noticing)

Probably not helping the situation is another bug which exists in all the current released versions (I have fixed this on my WIP rewrite) -> while Freeplay is supposed to be okay left open over multiple game instances, it IS NOT OKAY (if you plan on using 'freeze camera' on subsequent VC openings). So, if your VC crashes, close Freeplay too and open a new Freeplay for the new VC. Sorry!

Offline MikeyMouse

  • Senior Member
  • Posts: 1690
  • Vladivostok Brother | Addicted To Taxi's
    • View Profile
Re: Freeplay
« Reply #197 on: January 05, 2013, 05:43:02 PM »
It's a very similar issue, but the main thing is the player visibility, i can freeze the replay, go into the 'c' camera, move it around with the mouse as much as i feel free to, and as long as I keep the camera on the player, i can unfreeze the rep perfectly fine.

  • You try the exact same thing in VC?

It works perfectly in VC and LC, no issues there at all, can place the free cam wherever I like, don't have to look back at the player, and can unfreeze the rep. For me at least it's only an issue in SAiVC.

  • You do the exact same thing but don't touch the mouse while the camera is frozen?
      (I know this mightn't help because you probably want to use the mouse to angle the camera, but it would be good to know if it is the same crash I am noticing)

I'll try this for you tomorrow as I'm currently rendering some stuff, but i'm pretty sure it won't make a huge deal of difference, but yeah i'll try it out and let you know (you can always do little tricks like get the right angle of the camera before you hit 'c' and then just move it and leave the mouse alone  :lol:).

+ yeah i've been doing that every time the game crashes, opening up a new version of freeplay, ran as admin, and still this issue occurs.

It's not the biggest issue in the world, the new feature can still be used perfectly in SAiVC as the camera is focusing on the player the entire time, it's just the still shots as the player would drive past or over the camera, anything like that. Cheers for replying man, hope there's some sort of solution for this :).

Offline Dannye

  • Veteran Member
  • Posts: 3580
    • View Profile
Re: Freeplay
« Reply #198 on: January 05, 2013, 06:13:18 PM »
Quote
Cheers for replying man, hope there's some sort of solution for this
I hope so too! Unfortunately these are two of the nastiest (complicated/confusing/I-got-no-idea-what-i-am-doing) features, so I fear I may lose my mind before I find it, heh.

I suppose another temporary alternative is to not use 'freeze replay' (x). Leave the replay running while you 'freeze cam' (c) to find that perfect angle, then 'save camera' (pageUp), restart the replay and 'load camera' (pageDown). However the length of the replay then determines how much time you have to get that perfect angle. But not necessarily: You can always cut down your work outside of the replay - 'save camera' works both inside and outside of replays! (eg. 'function lock' Freeplay, use the USCM (or something else) to jetpack around to roughly the right spot, 'un-lock' then 'save', start replay, then 'load').

Offline MikeyMouse

  • Senior Member
  • Posts: 1690
  • Vladivostok Brother | Addicted To Taxi's
    • View Profile
Re: Freeplay
« Reply #199 on: January 05, 2013, 06:20:13 PM »
Yeah you got a point there, move it up bit by bit in a rep or just find the right area in the game first of all. Only really noticed this issue on reps with only one attempt, as with reps with multiple attemps there's no need to freeze the rep, you can just play around with angle whilst the attemps whizz past  :lol:.

Anyway cheers for the help, i'll let you know about that 'non mouse moving' in SAiVC and see if it crashes.

Offline Dannye

  • Veteran Member
  • Posts: 3580
    • View Profile
Re: Freeplay
« Reply #200 on: January 05, 2013, 07:14:47 PM »
The problem (or at least the one I am experiencing), seems to be with the Vehicle (1st/3rd person etc) and Cinematic Camera after having 'x' then 'c' then move camera with mouse then 'un-c'. You can do all those things with no problems/crashes if on 'un-c'-ing you immediately enter the 'Freecam' camera mode (the one which is where you move the camera with your mouse around the player), which you almost certainly will automatically (but you can increase the odds by making sure you have 'a' turned on). Then if you need to use the Vehicle or Cinematic cameras (or don't have 'a' on and the game will force you back to cinematic when 'jiffy' time expires), you need to F3 out of the replay, and F3 back in.

So its something to do with these 2 camera modes (the freecam mode is fine, Vehicle modes cause freezing/stuttering until you go back to freecam, and Cinematic mode can crash the game)... and then only in this specific scenario...
(Nevermind this post, mainly just trying to jot down my thoughts so I don't forget. I am getting no closer to a solution alas.)
« Last Edit: January 05, 2013, 07:16:47 PM by Dannye »

Offline MikeyMouse

  • Senior Member
  • Posts: 1690
  • Vladivostok Brother | Addicted To Taxi's
    • View Profile
Re: Freeplay
« Reply #201 on: January 06, 2013, 08:30:09 AM »
Any idea why it's only happening in SAiVC (for me anyway)? My guess is that it's because SAiVC has a much larger map, and the combination of the game loading all the textures in shot and freeplay unfreezing the rep just causes the whole system to have a meltdown, then the game crashes.

Offline Dannye

  • Veteran Member
  • Posts: 3580
    • View Profile
Re: Freeplay
« Reply #202 on: January 11, 2013, 06:41:48 AM »
Have had my head buried in assembly code for the last few hours. Good times!
No success on fixing the previously mentioned bugs, but who cares, I found some cool new features I can hopefully add!

- Normally while zooming in/out (holding mouse buttons), up/down mouse movements don't affect the camera's up/down angle - it kinda 'locks it in place' so only left/right motions move the camera. This is kinda neat, and now I should be able to make it a simple toggle like everything else, so if you ever want to lock the camera position on that axis, you can do so, without constantly holding down two mouse buttons.
- Some possible improved versions of the 'hold cinematic angle' and 'force change cinematic angle', but they both already work fine, so nothing too exciting here. Not sure if I'll even bother with the new methods or not. Although I may have found some improvements to 'F12' - you may recall my long post describing the woes of a particular 'evil cinematic angle', well I might be able to fix some of that so F12 should work perfect every time.

- But I'm nowhere near as excited about any of that as I am for this: a potential new function that removes 'obstruction checks' during freecam (the standard move-your-mouse-to-move-cam-around-player camera)!!!! No more (if you so desire) will a pole or building or anything passing between the camera and the player cause ugly cuts as the camera trys to always see you! Take that VC!

Apologies for the strange post, I am wired and tired! I should really go to bed now.

Oh, and update on the source code front: I have completed the VC rewrite and the code is much nicer now (plus a couple minor bug fixes). I will either release it sometime soon, or hold off a bit while I try and add some of this new functionality too. If there is much interest in the source, I may as well do the prior - incase properly implementing these guys takes a while.

Sorry I got no ideas MikeyMouse regarding your SAiVC woes (they do seem to be something slightly different to what I am experiencing in VC [which I don't know how to fix either]). I don't have the mod so cannot test/replicate these bugs myself. You could be right that the extra complexities of SAiVC are causing problems. Also for any mod that messes with the exe too much (and I beleive SAiVC is right up that alley) there is an increased chance of incompatability.
« Last Edit: January 11, 2013, 06:43:38 AM by Dannye »

Offline Samurai

  • ATS Crew
  • Veteran Member
  • Posts: 2097
    • View Profile
Re: Freeplay
« Reply #203 on: January 11, 2013, 07:28:06 AM »
Thanks for putting the time into making a clean open sourced version Dannye.

I wouldn't know if i could ever add new functionality, but might as well ask as you've probably looked into it. Think it is possible for someone to code in having a toggle to slo mo reps, perhaps to "adrenaline" speed + 2x "boooooooring"  :hmm:


A replay version of the Kan's TFC intro  :happy:

Offline Dannye

  • Veteran Member
  • Posts: 3580
    • View Profile
Re: Freeplay
« Reply #204 on: January 14, 2013, 01:39:09 AM »
'Fast forward' had been on my wishlist for a while, but I hadn't considered 'slowmo' before, both would be nice. I actually was able to pull off the prior in SA Freeplay (pretty much the only thing SA has which VC doesn't). That was a fluke though, I've got no idea how to do either for VC, alas.

---

Source is here now! I am calling it v4.0a, saving a neat v4.0 for when I add some interesting new functionality (the stuff from my previous post). If you're not interested in the source, there's probably not much point downloading this latest version. Here's the small list of changes:
  • Complete Re-write/Cleanup of the source code in preparation for this release
  • Potential performance improvements due to the improved code, I am not sure, certainly nothing noticeable.
  • One main bug-fix that I remember (possible other minor stuff too): the 'can leave Freeplay open over multiple instances of VC' ability was broken until now, causing the game to crash on the use of 'freeze cam' on any subsequent VC instances after the first.
  • Removed 'Invisible Vehicle' function (the one on 'INSERT'). Nothing too dire here, probably never used by anybody. And it can still be performed: enter 'first person' camera in a vehicle, then move the mouse to enter 'freecam' (its an oddity of VC, the now-removed feature pretty much did exactly this). Can 'turn off' by going back to any 'third person' view. Freeing up the INSERT key I believe alleviates potential conflicts of Num0 + Shift (not uncommon a key combo when moving a frozen camera, but keyboards can treat this combo as 'insert' too, which could've lead to unintentional use of this function)
  • Manual Zoom Controls (num+ and num-) no longer 'force-enable' Expanded Zoom Limits. If the expanded limits function is enabled, you wont be able to num+/- past the games defaults. Solution is to simply enable the expanded limits function first.

I think thats it. See link below. I will add this to the first post shortly.

https://dl.dropbox.com/s/37s3d5y8vzh8nfv/VC_Freeplay_v4.0a_With_Source.zip?dl=1
« Last Edit: January 14, 2013, 03:22:43 AM by Dannye »

Offline Reynard The Fox

  • Reynolds
  • Senior Member
  • Posts: 3291
    • View Profile
Re: Freeplay
« Reply #205 on: January 14, 2013, 02:51:10 AM »
Oh wow so the vehicle/player pointer is the same one in the replays! Is it the same for SA? Also I read on the gtamodding wiki that the player pointer +0x160 gives the speed value. Have you checked that out? I'm highly interested in making a speedometer for replays so that sudden boosts and handling.cfg changes can be recognized.

Can't wait to ding in further! Also do you plan on releasing the SA source?

Offline Dannye

  • Veteran Member
  • Posts: 3580
    • View Profile
Re: Freeplay
« Reply #206 on: January 14, 2013, 03:09:34 AM »
Dunno, if it looks like its the same and it works, then I guess so! Hehe, its been a long time since I wrote lots of it, I don't remember. I seem to recall looking into vehicle speed, or maybe it was that I was thinking of looking into it, not sure. I certainly don't recall discovering anything, so it was probably the latter.

Regarding SA Freeplay source: just as the VC version had been (up until now), its all a bit of a mess at the moment (its also nowhere near as cool as the VC version). So if I were to do it I'd need a bit of time to clean it up for you guys.

I probably have a bunch of resources for anyone interested in this sort of thing: minor snippets of code, interesting-sounding memory addresses, and whatnot. If there's much interest, perhaps I can peruse it, see if there's stuff worth sharing (though most is probably straight from common sources such as GTAForums' Memory Addresses topics). Also, for those who are new to the whole idea of memory editing, if I could find the time perhaps I could whip up a little 'beginners guide' type thing, if people would like (with big disclaimers attached to say that I am by no means an expert, I could quite possibly be suggesting bad ways to do things, and other people could probably guide you better, etc etc).

The first post has now been updated to include a link.
Happy coding!
PS: If anyone comes up with cool new stuff while messing around with the source, feel free to share it in this thread.
« Last Edit: January 14, 2013, 03:34:23 AM by Dannye »

Offline Reynard The Fox

  • Reynolds
  • Senior Member
  • Posts: 3291
    • View Profile
Re: Freeplay
« Reply #207 on: January 14, 2013, 06:27:46 AM »
I couldn't compile the source because PROCESS_SUSPEND_RESUME isn't part of windows.h. I fixed it by adding
Code: [Select]
#define PROCESS_SUSPEND_RESUME   0x0800 to utilities.h.

Also the speed thing didn't work, it returns 10 when in a replay and 0 when you're not. 


Offline Dannye

  • Veteran Member
  • Posts: 3580
    • View Profile
Re: Freeplay
« Reply #208 on: January 15, 2013, 01:25:35 AM »
Sorry about that. Strange... must be some weird compiler settings I have or something?

All the PROCESS_ stuff was new to me with this release, previously I had always just passed in a single flag for 'allow all'. In doing the most recent rewrite I found a page documenting these flags and it mentioned some potential compatibility issues with using the 'all' one, so I had to do them all separately. Perhaps I put more in than necessary, not sure - I started off with only a few that sounded like what I needed, which worked but the game wouldn't close while Freeplay remained open, so I chucked a few more in and that did the trick.

---

For anyone interested in the project (perhaps even adding to it), here's a culled list of hopefully feasible, cool-sounding ideas which I (and other members here) had for potential Freeplay features (but as of yet I haven't tried to implement, or haven't been successful in doing so):
  • Speeding up and/or slowing down the replay (eg. 'fast forward', 'slowmo').
  • Speeding up the time-of-day (the replay would play at normal speed, just time would advance quickly... think seeing timelapse-style sunrise/setting during the course of one stunt)
  • Simplified/Improved 'freeze camera' functionality (if possible still including the ability to aim with mouse while frozen)
  • Make it work for users of VC v1.1 patch (if that's anyone?). There is a 'VC Version Library' which should make this easier, I just never fully looked into it.
  • Improved 'no camera shake' which works in all situations (this is an old idea, I am not sure exactly what is not covered currently, 'on foot' perhaps?)
  • Remove a weapon being held in the hand of the player (handy!)
  • Improved 'camera say on current vehicle even when I get out' functionality (eg. so it works in 'freecam' too). Perhaps extend to a more generic 'change/lock camera vehicle target' which even lets you toggle through *any* 'previous' vehicles?
  • Remove the rubbish that can appear on the ground (texture mods can do this presumably, but still, in Freeplay would be nice too)

There's more too, some of it obscure or implausible, others pretty simple I should have done myself, thus weren't really worth mentioning. And there's a couple more that had been on the list for ages but the other night I discovered how to do them (see a few posts back), and hopefully they'll see the light sooner rather than later.
« Last Edit: January 15, 2013, 01:27:24 AM by Dannye »

Offline Reynard The Fox

  • Reynolds
  • Senior Member
  • Posts: 3291
    • View Profile
Re: Freeplay
« Reply #209 on: January 15, 2013, 04:29:47 AM »
Yesterday I found all the offsets for the handling values and I think I might be able to determine whether someone landed the stunt in the replay with a modified handling.cfg. I still need to gather all the defaults values to compare them to though.

I will look at some of your ideas particularly the time lapse thing, I don't think that would be too hard.

 

SimplePortal 2.3.7 © 2008-2024, SimplePortal