Log in to reply
 

[SCRIPT][WIP] 28 Frags Later



  • 28 Frags Later

    Introduction

    I know what you're thinking... "not another zombie mod!"...but hear me out.

    I've downloaded, played and reviewed as many of the GTAV zombie based mods I could find and, all of them are quite simply, a bit plain. Therefore I've decided to take matters into my own hands and start work on a zombie mod with a twist.

    I've no idea if I have enough of the skills required to ever finish this mod. Therefore the full details as well as source code can all be found over on GitHub.

    28 Frags Later

    Overview

    This is a Grand Theft Auto V Mod written in C# loosely based on the popular post-apocalyptic zombie film titled '28 Days Later'. The Mod adds an additional set of missions to the GTAV single player game for PC.

    Synopsis

    Day 1 - Exposure:
    A group of missguided animal liberation activists break into the Humane medical research laboratory, unaware that the animals are infected with a highly contagious rage-inducing virus. After breaking out the animals, the virus quickly spreads across the surrounding rural area, wiping out the entire population nearby towns.

    Day 3 - Infection:
    Just a few days after the Humane laboratory is breached, news of a virus spreading across Blaine County causes mass panic. Emergency services are stretched and riots soon break out.

    Day 8 - Epidemic:
    After the Military is deployed on the streets to keep the peace, official advice is to stay indoors, but not everyone has the same idea.

    Day 15 - Evacuation:
    A safe zone is setup and maintained around Los Santos International Airport. Allowing Titan aircrafts to line up on the tarmac for intimidate evacuation of the city... "Please walk to the exit in an orderly fashion".

    Day 20 - Devastation:
    With people either fleeing or infected, the Palmer-Taylor Power Station shut down for the first time in over... well, a few days... plunging the remaining citizens into total darkness.

    Day 28 - Alone:
    ...

    Contributors

    As a one man band at the moment, everything has been copied, pasted and written by myself. Any help anyone would like to provide is accepted with open arms!

    Just get in touch gta@dazrave.uk



  • @DazRave Just a bit of friendly advice from someone who also writes mods (and games and applications in general)... change the end of the first line in your second paragraph "I've downloaded, played etc...". Because if I was a modder coming in here to help, I would have left at the end of that line. I haven't directly quoted it so that you can change it... if you want to that is.

    If you want respect and help from fellow modders, then you need to start off on the right foot. You obviously didn't like those mods you downloaded, they clearly weren't what the mods you were looking for... but they still probably took the developers of them a fair amount of time. People might think the same of my mod, but I would respect their opinion a lot more if they said "I don't like it because... " instead of the words you used.

    And if your mod turned out to be no better, then you've already dug yourself a hole you're not going to climb out of. Tactical diplomacy based on the saying "One man's meat etc..." might just get people to come in here and stay here.

    I reiterate again, your words are entirely your choice... I am just offering the view of that choice from the other side of the table.

    I sincerely wish you good luck with your mod, because I can assure you, they can escalate from a simple concept to a spaghetti junction in no time... have fun. :D



  • @LeeC2202 - Absolute valid point. No offence was intended either. I can see how it can come across as quite strong to some people.

    I'll reword slightly, but I still stick by my opinion, the level of quality and diversity is very poor which is the inspiration for me to try something different.

    Thanks for the comments either way :) I always appreciate honest feedback.



  • @DazRave No problem, I was just hoping you didn't take offence at my post... I have an uncanny knack of digging holes for myself on a regular basis. Things said with good intent, often go awry.

    As I am sure you are aware, creative types are a delicate bunch when it comes to criticism... none more so than myself probably... or I suspect that will be the opinion my my ex-bosses. ;) So sometimes, erring on the side of diplomacy is often a good idea... as much as it kills you to do so.

    I'm one of the creators on this site who will do absolutely everything I can to encourage more people to create. It's all I have done for my working life, so I know how rewarding that can be. I hope you can get people interested as there are a lot of very good modders on this site... and a lot of good ideas.

    I'm not a fan of Zombies, so there's not much I could add but I am sure many are, and if you can get the feedback loop going, you're bound to get some good input. I know my mod wouldn't be half of what it is without the people throwing ideas into the ring. Even if it's not an idea you want to use, it can spark another idea that you do.



  • @LeeC2202 I was checking out your Mod earlier on, absolutely love it. I also love the very thorough updates and release information too. It's not hard to tell you've been around this sort of thing for a while now!

    Absolutely no offence was taken by your original post, much the opposite. In fact, in terms of impressions, it was the first reply I've had to my very first post on the forums at gta5-mods... so it's a good start indeed!

    As for my own mod... as strange as it might sound, I don't like zombies much either. I'm more interested in post-apocalyptic scenarios and the 'jump out of your skin' factor. I'd say 70% of the mod won't actually include 'infected' (as their technically not zombies in 28 Days Later). I want to create the feeling of how a whole city grinds to a halt in an crisis.

    Although, as I also said in the original post, never coded with C# before nor anything for GTA. I'm just hoping my slightly dusty PHP developer skills are good enough to convert to C#.

    While I have your attention... in terms of 'ticks' within the script, is it possible (or ok to..) have more then one tick thread running? I'm currently dumping all the things I want to be checked against in the one place and I really hate messy code. I'd prefer to be able to separate it out a tad. I've not quite got my head around ticks yet other then they run per frame unless I state otherwise.



  • @DazRave I'm not sure on the multiple tick threads. I'm not that familiar with multi-threading, so I tend to work with what I'm used to. I tend to have the one OnTick handler and from that, I call multiple Update() functions across the classes as required.

    So my OnTick handler basically handles input, flag checking and then jumps out to more specific functions as required. I have an UpdateProbes() function that gets passed the ElapsedTime and that handles everything to do with my probe system. So all that exists in the OnTick for that, is a single function call, the main code is elsewhere.

    Just as a side-note, the idea behind passing ElapsedTime to a function can be useful for system where users might be using different frame rates. A speed of 10 units per frame would result in different speeds for 30fps and 60 fps systems... even more on a fluctuating system.

    So what you do is pass the elapsed frame time to your movement function. I have this in my OnTick()

            CurrentGameTime = Game.GameTime;
            ElapsedGameTime = CurrentGameTime - LastGameTime;
            LastGameTime = CurrentGameTime;
    

    That keeps track of how many milliseconds have elapsed between ticks. I then I pass that to my Update function as:

            UpdateProbes(ElapsedGameTime);
    

    My movement is then basically:

        private void DoMove(int _elapsedGameTime)
        {
            float TimeModifier = (float)_elapsedGameTime / 1000;
            float newMovementSpeed = ProbeSpeed * TimeModifier;
        }
    

    That first line gets you a value that represents what fraction of a second has elapsed (1 second = 1000 milliseconds). So on a 60fps system, a single frame is 16 milliseconds, which gives you .016. You then multiply any values you want to remain constant by that TimeModifier... I used MovementSpeed as an example.

    That way, no matter what FPS your game shifts to, or runs on, the movement speed is always completely relative to the amount of time that has passed, and will remain constant. If more time elapses, the movement speed is a higher value to compensate and visa versa.

    As for multi-threading, from what I understand, multi-threading has its benefits and its pitfalls, especially when it comes to synchronising data across the threads. With my ability to cause problems for myself quite easily, the less pitfalls I add into the mix, the better. :D



  • @LeeC2202 ... quite simply. Legend.

    An amazing amount of detail in your explanation. I have a much better understanding now and I completely agree with your method regarding the onTick.

    I'll be revisiting my code and trying to apply the same thing.

    Once again, thank you! I only hope I can return the favour eventually. I'll keep my eye on your mod and jump in when ever I feel I could add value!



  • Progress on this is steady so far, I'm currently working on 'Day1' and parts of 'Day28'.

    As it stands, the mod will be a series of 'missions' covering the outbreak of the Rage virus. Unlike the film it is based on, which shows you how the outbreak started but then quickly fast forwards to 28 days later (duh).. I will be covering what happened within those 28 days.

    One thing I'm trying to do is make the missions as dynamic as I can so that there's a few combinations/options to take. The original 28 Days Later film had multiple alternative endings and I believe the film used a different one to the book of the same name. Therefore I'm hoping to allow different endings to the mod too, depending on the route you take during the missions. We'll see.


Log in to reply
 

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