Log in to reply

[SCRIPT] [RELEASED] On-Foot Cinematic Cam

  • @DazRave I look at helping people in the sense that I can either a) Write 30 or 40 lines of text explaining a solution, which is usually not that clear in the end. Or b) I can spend the same amount of time writing the same amount in code, that shows it very clearly.

    Option b) is the far better choice in my opinion.

  • @LeeC2202 haha, option b is the one for me!

    I've created a pretty nifty in-built debug mode that's speeding 'process of elimination' bug catching ten-fold now. I should probably separate it out actually into it's own .dll but unsure if you can pass values between .dll's which I'm using in the debug messages etc.

  • @DazRave Yes you can pass values between dll's, or more to the point, if you add a dll as a reference to your project, you can call functions that way.

    I have a set of debug classes that writes to a log file and displays a debug window at the bottom of the screen. They exist in a GTAVDebugClasses.dll that sits in my scripts folder. If I am using the Debug configuration in Visual Studio, it switches all that stuff in and if I am using the Release configuration, it doesn't use it.

    I simply wrap all my debug code with the #if DEBUG, #endif tags

  • @LeeC2202 That would seem like a sensible thing to do then, since I can use it in other scripts I might like to write. Coming from a PHP background, I find myself constantly trying to find the alternatives to methods!

    Am I right in thinking that writing in C# actually offers more functionality/flexibility then writing in C++ for GTAV? There's plenty of tutorials etc for both, so i'm not quite sure which is better then which really. Not that I'm going to switch to C++ of course, to late in the mod for that malarkey now haha!

  • @DazRave Writing in C# offers access to all the natives that C++ coders can access, if it isn't covered by the wrapper API, you can call the natives directly. I don't think either offers more or less flexibility than the other, C# can just be easier to get to grips with and for people like myself, that never got round to learning C++, it's the most practical route.

    Programmers tend to go with what they know and usually say that their language of choice offers them the best of all worlds. Out of the 10 languages I've coded in, I find C# the most comfortable now, so that's what I go with... can't see much chance of a ScriptHook6502 on the horizon, that's for sure. ;)

    I don't think I've got the mental capacity to cram another language in at this point in my life, so it's probably the last language I'll learn as well.

  • It seems like it's been a while since I uploaded a video, so here's a short one. It's a comparison between the melee camera in version 2.51 and the one I am currently using, version 2.60.

    Oh yeah and anyone who says "What's the difference" gets the satisfaction of making me weep with sorrow. ;)

  • So just shifting back to an earlier task of finding the right origin points for vehicles to use when entering and exiting. I now have all wheeled vehicles with doors using the correct door for entry and exit... for the most part. I still have the problem where if the driver's door is blocked, you will exit from the passenger's door. I think given how rare an occurrence that is, I'm not going to dedicate a whole heap of solution finding for that at this point. Buses on the other hand exit through the right side door by default, so the camera is positioned correctly for those.

    With planes, I am using the driver's seat as the origin point and that has the added bonus of there being no need to do special checks for long planes, as the door is right by the driver's seat.

    I do however seem to have a major issue when doing pretty much any isolated task, enter vehicle, melee attack, when the OnFoot camera is activated... so it's bug hunting time... my fave! :(

  • Damnit there's some persistent bugs in here tonight. I seem to have written lots but accomplished absolutely nothing, apart from backing the bug into an opposing corner... very frustrating. Let's hope tomorrow proves to be more fruitful.

  • @LeeC2202 I forgot to ask the other day, you mentioned this mod was just a part of a much bigger idea/mod?

    Is said idea/mod a secret?

  • @DazRave Did I really say that? I honestly don't remember and I can't find anything to jog my memory. So to answer your question, it's so secret, even I don't know what it is. :)

    I know that sounds stupid but if I write something, I don't remember it but if I see something, it's in my head forever... it's the bizarre way my memory works. That's why I can change a line of code, run the game, watch things go wrong and then struggle to find what I changed that caused it. I waste so much time chasing that kind of thing and it probably makes no sense to anyone reading this. Yet if I was doing graphics, I could change a pixel and then find it again instantly.

    And having a couple of days like I've just had, will wipe out pretty much anything from before that, until my memory drags them back from the mental recycle bin. So I'm not trying to deflect the question, I just have no idea what the answer is. :(

  • @LeeC2202 I'm probably mistaken actually... I think it was a post you made helping on someone else's forum topic... probably referring back to this mod. My bad!

  • :angry: At times I hate the stupid amount of unique checks this mod has to do to function properly. I thought I had the vehicles all sorted yesterday and I had, apart from one vehicle. The Dashound bus has a single front door, on the passenger side... but it's classed as the "door_dside_f". So it's the only bus that has just the driver's door on the passenger side of the vehicle, so my door finding function screwed up because when you approach from the right, it expects to find the normal right side door, "door_pside_f".

    And there was a situation last night involving a pair of vehicles that park in the desert around 6pm. I could get into one of them by any door and it was fine, I could get into the other one by the passenger door and it was fine but when I used the driver's door, it caused a crash. But if I moved that car just a fraction forward or backward, it was fine.. it made no sense as there should have been clear probes.

    Every time I find one of those unique situations, I get less convinced that I will be able to find them all through testing. That means that I am always going to release a mod that will fall over and crash at some point... and that's... disheartening to say the least. :(

  • @LeeC2202 Not sure why you're hunting to be perfect when nothing is ever perfect, to be honest.

    90% working is better then 0% released.

  • @DazRave Because that's just my nature. When you spend 25+ years working on games that are going to be sold, they are expected to work... that's the mentality I have grown up with. Just because this mod is free, I can't change that way of thinking...

    It absolutely must work 100% of the time when it's finished. As a WIP, it has leeway but as a finished mod, it doesn't get that luxury. Crashing is unacceptable, so if that 10% involves the mod crashing, then that is unacceptable.

    That's why I spend so many hours walking into places where I think it might crash the mod. It's why I drive round looking for troublesome spots in the map to park, then spend 10 or 15 minutes moving the cars inches back and forth, trying to cause it to crash. I will spawn a runway full of different vehicles and spend 30 minutes getting in and out of them repeatedly, in different orders, to make sure combinations of entries/exits don't cause problems.

    As you noticed from my post yesterday in the Safe Mods thread, I strongly believe that a developer has a huge responsibility to the people that use their software, be it applications or mods. It must work, it musn't crash... those are the only rules I know.

    If it's only 90% working, then it deserves to be 0% released.

    And of course being an artist more than a programmer doesn't help. :(

  • @LeeC2202 What a reply!

    I got nothing, nadda, zilch, that i'm able to say to counter that comeback.

  • @DazRave Sorry... that was a bit intense in hindsight. :(

    It's just that when we used to get to the end of projects, it was all about the game. I used to get in to work at 9am, work to 5:30pm, get back on my computer at home at 7pm to carry on working and then go to bed at 2, 3 or 4pm... seven days a week. And whilst I am not doing that level of intensity on this, I get so wrapped up in making it work, that it feels like it. I switch my PC off, get into bed and am trying to solve bugs by memory alone.

    I look at some mods on here and I see people with problems and nothing from the author for months, I don't know how anyone can do that. If you know your mod has a problem... fix it. If you know your mod has a problem and you don't really care, remove it. If I get to the point where I genuinely feel I cannot get this mod to the 100% working condition I want it to be in, I will probably remove it.

    I was never the best when it comes to what I can do but I will make sure it's the best I can do.

  • Just booted up VS and I have a conflict of interests... I can't resist dabbling in other people's requests (which is precisely how this mod came to be). Someone mentioned the radios that play in the safehouses and part of me wants to get distracted trying to sus those out now.

    At times, I have the mental focus of a puppy in a room of squeaky toys. :D

  • So I've been back on testing duty since 2:30am and what a great time to find another bunch of vehicles that don't conform to standards. Quad-bikes and the sodding Dune Buggy. All in OffRoad (which simple trainer annoyingly listed as Off-Road, so my class name checking was wrong) and none have doors.

    It looks like I am going to have to stand on the big airfield in the desert and spawn every single vehicle, in every single class check the vehicle class and the vehicle name and make a note of any that don't fit-in.

    Fun times ahead... I can appreciate now what fun our QA departments used to have.

    Edit: :cry: Emergency vehicles... there's a bus, a motorbike and a frigging helicopter.

    Final Edit: And at 4:30am, my spawning session is done... and that sounded so much better in my head.

  • @LeeC2202 Please now get some sleep then! haha

  • @DazRave I tried, but I was awake again at 8am, so another day on three hour's sleep. The odd thing is, I feel tired now, but come 2am tomorrow, I'll still be at my keyboard.

  • So today's tasks... whilst spawning god knows how many vehicles last night, I did notice some that don't work well with the extreme angled probe to the rear, so some minor tweaking is required there perhaps. But given why that probe is there and the fact that the problems were on the big trucks/box vans, which won't fit in your garage anyway, I might just stick with what's there.

    Boats: Because you enter boats at the back, I need to find something I can use as a location point for those. There does seem to be several rudder bones listed, so that should work fine... although it probably means another spawn & crash session to find out which vehicles have which bones. I'm pretty sure Jet Bikes don't have rudders but they can use the vehicle origin as they're that small, it shouldn't matter. That's going to be fun in the water.

    Planes: I have to do a spawn & check test with all the aircraft to see if I need to use the special case camera settings I had originally.

    Turreted Vehicles: There are certain vehicles that you can get into and use turrets on, they need special cases creating for them. I had them in the earlier versions but that hasn't been transferred over to the new system yet.

    So tonight Matthew, I'm going to be Mr Tester (and that probably makes no sense to anyone who isn't a) old and b) from the UK) :D

  • @LeeC2202 Ha, funnily enough, Mr Kelly is from about a mile up the road from me, although not really the best claim to fame I could ever make. I did meet the Chuckle Brothers once? does that count instead? haha.

    Back on topic, I was thinking last night how when in first person mode... and if I'm ever hit by a car and or jump out of a car when it's moving (therefore kicking in the rag-doll physics). It hurts my eyes watching the world literally flip by over and over.

    Are you/have you created any cinematic cam's that detect if the player has just left a vehicle and is currently rolling right across the floor in a heap? Would be nice to flick away and watch that happen from 3rd person rather then waiting to gain control of the character and not actually able to focus on much because of the movement.

  • @DazRave I have an empty block of code that is basically:

    if (pdPlayer.IsJumpingOutOfVehicle)

    But I am not sure yet what conditions will make that trigger. You get the same kind of problem if you try and exit a vehicle after you've driven it into a lake.

    There is a bool Game.Player.Character.IsRagDoll, so I can probably check for that and disable the camera when it happens.

    Or maybe the solution is to cut to a static camera... oh god, don't let me think things like that because then I start thinking... if I delay the camera switch for a frame, I can find out which vehicle hit you, take the positions of the car across two frames, that will give me the speed and direction so I can place a predictive camera... I really don't think I want that level of special case cameras. No, I must wipe that idea from my head right now... spawning boats will get rid of it. :D

    But it's on my #TODO list anyway.. the camera flipping problem that is.

  • Okay, so I'm going to ignore boats for now, because they're hacking me off already... not in the mood for chasing boats round a lake as they decide to float off, just to see if they will crash the game when I get in them. :angry:

  • @LeeC2202 I dunno if anyone reported it yet....getting into add-on vehicles actually crashes the script for me,and the minimap is gone after that :D
    Oh and also is it possible to get the special camera automaticlly when you are falling from a high altitude like jumping off a building?like how it is in GTA IV....

Log in to reply

Looks like your connection to GTA5-Mods.com Forums was lost, please wait while we try to reconnect.