Search Unity

Kings War - Game Made With Unity Fpssample

Discussion in 'FPS.Sample Game' started by karstenv, Apr 12, 2019.

  1. karstenv

    karstenv

    Joined:
    Jan 12, 2014
    Posts:
    81
    Hello fellow FPS devs :)

    We, at Mechanical Fruits is done with our first prototype of our upcoming game Kings War.

    So we would like to showcase for you what we have made so far.

    Brief overview of the game idea:

    In Kings War, you can run and you can hide.
    But not forever.
    With unique game mechanics that pushes you out into the open in full sight of you opponents.

    Out in plain sight you need to restore your health, replenish your ammo and reset your play-time…
    If you want to survive, long enough to win the game, you don't want to run out of any of these three essentials.

    Become the king to win the game.
    There can be only one!!!



    We have spend the last 11 weeks working full time on this.
    I have worked around 60 fun hours each week with some help from a few friends, family and some interns from the Copenhagen's School of Design and Technology as part of their education.
    They had no prior experience with Unity or C#

    We have added some many features to the game that I really don't know where to begin.
    Some of them are shown in the video, some are not as they are more behind the screen stuff.

    We have generated more that 2200 new files.
    Added 5+gb to the project.
    Done 550+ pushes to Collab (when it worked)

    We have gotten rid of most Unity game assets, but there is still a few bits left around.
    We are still using the FPSSample animations, for now.

    Let me see if I can name a few of the things we have added :)

    - New weapons and new characters.
    - New game mode.
    - 4 teams (one man teams, but still teams)
    - Team colors that are used throughout the game
    - Crouch
    - Playtime (limited to prevent camping)
    - Ammo inventory
    - Refill ammo
    - Health packs/Station
    - Frag Grenades
    - Smoke Grenades
    - ADS (Aim-Down-Sight) with slight zoom
    - Scope with 4x zoom
    - Dynamic in-game commentator
    - Server Command to restart the game
    - Dynamic stats with damage collection, K/D ratios etc...
    - Buy zones for Heros
    - A 3d scoreboard directly in the levels.
    - Fall damage
    - Bullet hole decals
    - Blood on character impact
    - and al lot more I have forgotten :)

    We will keep working on this and will keep you all posted on the progress.

    Thanks for help we have gotten in here and thanks to Unity for their not so insignificant part.
    Hope you like the video!
     
  2. AggressiveMastery

    AggressiveMastery

    Joined:
    Nov 19, 2018
    Posts:
    206
    I had a blast watching that video! Great work, and neat concept!

    The stock animations animated well with the faster run speeds too, would love to see any "key bits learned" :)

    Second project displayed this week! Exciting!

    Cheers!
    Micah
     
    DaftPuzzler and Stexe like this.
  3. ClaudiaTheDev

    ClaudiaTheDev

    Joined:
    Jan 28, 2018
    Posts:
    331
    Someone really like to write text ... Please change the video starting with reading tutorial like wall of text until finally seeing some action. It is so boring I was just about to stop watching.. The rest looks fine but potential players don't want to read they want to see action!
     
  4. thongtm3d

    thongtm3d

    Joined:
    Jan 30, 2019
    Posts:
    10
    So amazing, I wish my game could have some of your functions like: crouch, new weapon & character and grenades :v
    Have a nice weekend!
     
  5. karstenv

    karstenv

    Joined:
    Jan 12, 2014
    Posts:
    81
    thanks guys for the positive feedback.

    @Gor-Sky
    This video isnt really meant for gamers but more for you guys in here, other devs.
    Just to showcase the changes we have made using the same fps sample that you guys most likely is working with.
    I would never have added so basic stuff like scope, crouch ADS etc.. in a video for gamers.
    These things should be mandatory in a fps these day and isnt really anything special to showcase.
    This video i made just for you guys and few selected others who have an interest in what we are working on.

    I might soon do a full game video where I simply play a full match while commentating it live.

    @thongtm3d
    Weapons were fairly easy to implement, Just add a new 3d model on top of the old one and then deactivate the old one.
    Later on you can clean up the prefabs etc...
    Remember that each weapon has a 1p and a client prefab version and that the 1p need a FOV=40 assigned in itts materials to match the gameworld.

    Our grenades are based on the robots grenade launcher, his secondary ability.
    We just removed the weapon and moved the functionallity from right mouse buttom to key F.
    The smoke grenade is just a normal grenade with out damage and a longer smoke particle effect.

    The crouch function is using a crouch animation we found in the sample, used by the terraformer in the menu scene and then we did a simple crouch function. There should be plenty tutorials on how to add a crouch function on youtube.
    The only problem is that the crouch animation dont have movement. So for now we can only sit still while crouching.
     
  6. AggressiveMastery

    AggressiveMastery

    Joined:
    Nov 19, 2018
    Posts:
    206
    Awesome reply Karstenv!
     
  7. d12duke

    d12duke

    Joined:
    Mar 22, 2016
    Posts:
    37
    Nice job on the speed and using the animations provided. With that said, it's very "mono".

    Maybe using some post processing Chromatic effect? I don't really know. It's like an island full of trees, rocks, grass and bushes but it's missing something. (I suppose in some way we're all looking for that answer.)
     
  8. karstenv

    karstenv

    Joined:
    Jan 12, 2014
    Posts:
    81
    @d12duke
    "Mono" is actually a design decision as we wanted to create a detailed game world not using colors but other types of details like normal mapping and a richer polygon variety. "Mono" is the premises that makes the colors (which are our main twist) stand out :)

    With that said, this is only 11 weeks of work and we still have a lot of work in front of us before we can call this done.
    Hopefully we will find every missing part along the way.

    Up til now my main focus has been on "fun"!
    Is this game/idea fun to play?
    And after 10 testing Fridays with the devs and 8 testing weekends with my 4 kids and 1 tournament held, I can safely answer this question!

    Yes, it is fun to play :)
     
    d12duke and keeponshading like this.
  9. Stexe

    Stexe

    Joined:
    Feb 2, 2014
    Posts:
    217
    Looks like you have Playback disabled on the embedded video.

    That is some pretty amazing stuff! I've been struggling to modify FPS Sample with anything unique or interesting and it looks like you've done some crazy cool stuff.

    Wish you shared your findings and how you implemented stuff like ammo, new weapons / characters, health pack, fall damage, and more. So many things I've been trying to do with little success. I spent about 12 hours implementing a health pack that only barely works (it respawns slightly hovering above the ground at times on some clients).
     
  10. karstenv

    karstenv

    Joined:
    Jan 12, 2014
    Posts:
    81
    @Stexe
    Thanks for your kind words :)

    We started with a health pack system first. Well its more like a trigger zone that you have to be inside to regain health

    We based this on the AreaDamage script where you lose health when inside this trigger zone.
    So we just flipped it and added negative damage to the player resulting in, well health :)

    Then there is the usual stuff like capping it at the max health etc..

    We also based our playtime feature on this idea.
    The playtime feature is where you lose playtime constantly overtime and once you are below 0 you will start to lose health, over time. To stop this you enter the play-time trigger zone and refill your bars.

    Adding ammo should be quite simple and any tutorial on youtube should be enough to get it working.

    Basically the FPS Sample has unlimited ammo and you set an int with your max value and then subtract 1 for each shot fired. Adding clips/mags etc. it also pretty standard stuff.

    But the restock ammo function, that was tricky as it was hard to understand how the server/client stored these values.

    All data values are gotten from the scriptalble objects files (.asset) and it was kinda hard to set these values at runtime.
    I cant remember if the server didnt allow changes to them or what. But we fixed it somehow as its working now.

    But also remember that I worked on this 8 hours everyday with the help from a few interns.
    Ever if they hadnt any experience in game dev they still managed to read through Unitys un-documented code to find solutions.
     
    Last edited: Apr 15, 2019
    keeponshading and Stexe like this.
  11. Stexe

    Stexe

    Joined:
    Feb 2, 2014
    Posts:
    217
    Yeah, I did the same thing for Health Packs. Capping health I've found is easy as well as checking for overheal if you want. Didn't know if you had actual pick ups or just zones with cooldowns. The zones with cooldowns I figured out, but not the object moving and coming back, but I guess you didn't do that either. If only it was easier to implement, lol.

    Gotcha for the ammo. I haven't looked into it much.

    Yeah, I haven't been putting that much time into it as this is just one class of many. Right now I'm working on finishing an area control map based around a space train. My earlier maps are a deathmatch map on a spaceship. Been trying to figure out "low gravity" zones and have it working somewhat ... but that "somewhat" isn't enough for it to actually be playable. And I have a cooperative version of the spaceship map where you're working with a teammate to shoot down asteroids that are coming at your ship. Was thinking about implementing ammo in that so there's more teamwork involved in shooting and then going into the ship to reload.
     
  12. karstenv

    karstenv

    Joined:
    Jan 12, 2014
    Posts:
    81
    I think the problem with pickups is that they should run on the server and the clients should then replicate them.


    Perhaps take a look at the exploding barrels in the sample to see how they are set up.

    We did actually got the health packs to work for a while but since it didn't really fit into our game design we didn't go further with that.
     
    Stexe likes this.
  13. Stexe

    Stexe

    Joined:
    Feb 2, 2014
    Posts:
    217
    Yeah, I've looked at those. The problem I believe is how the server/client does interpolation. The exploding barrels don't move so they are easily synced together, but when you start having things move it becomes ... complicated to say the least.

    I'm also trying to set up collision detection on non-player objects. Such as having an environment shoot missiles out or something.

    Would also love to know how you set up multiple different character types. Did you just take the existing two unit types and expand it to 4?
     
  14. karstenv

    karstenv

    Joined:
    Jan 12, 2014
    Posts:
    81
    All our characters are based on the Terraformer and yes we did just expands it to more, we actually have 7 at the moment, the 4 in the game, 2 test characters and a cameraman (spectator).

    But you have to create some of the parts of them through Create/FPSSample/Characters/TypeDefinition and Create/FPSSample/Hero/HeroTypeDefinition - Based on memory :)

    But you cant just duplicate all parts of them.
    And then they need to go through all those weird regs. to get them to work.

    Its a long process but it can be done :)
     
    Stexe likes this.
  15. d12duke

    d12duke

    Joined:
    Mar 22, 2016
    Posts:
    37
    Ya man I watched the video again today. I like the way you're using the monochromatic world to signify the player's 'kill count'.. I also REALLY like the scoreboard in the scene! I'm having a hard enough time even getting the server to launch without null references lol so Kudos to you brother!
     
  16. karstenv

    karstenv

    Joined:
    Jan 12, 2014
    Posts:
    81
    @d12duke
    I have had a lot of null refs myself. Mostly they are due to missing refs in the editor (a prefab somewhere) and not i code.
    With this server/client stuff its a bit harder to set all refs in code as a fail-safe, so my suggestion is to go over all relevant prefabs to look for missing bits.
    You can run the game in preview mode (normal play mode in the editor) and then go through game objects in the hierachy and search fro missing refs.

    The in-game scoreboard is actually only working on the clients, for some reason :)
     
    Stexe likes this.
  17. IanHonorato

    IanHonorato

    Joined:
    Apr 9, 2019
    Posts:
    9
    Hello, first of all, congratulations for the project. I am studying the FPS Sample, but I have found it difficult to understand the ECS architecture and some points of the project. Do you have any tips on how to set up and use the inputs at some points in the game, for example, add a command to conquer the goal in Assault mode.

    thanks in advance.
     
    Stexe likes this.
  18. karstenv

    karstenv

    Joined:
    Jan 12, 2014
    Posts:
    81
    I'm not really sure what you mean by adding a command to the assault game mode.

    But we haven't used the default game modes at all as one of the first things we did was to add our own game mode to suit our game.

    Regarding the ECS structure then there is plenty of blogs and tutorials around explaining what it does and how. So maybe you should learn that first outside of the fps sample project.
     
    IanHonorato and keeponshading like this.
  19. d12duke

    d12duke

    Joined:
    Mar 22, 2016
    Posts:
    37

    Ahhh :( I kinda gave up on it brother and a buddy of mine wrote what we needed from scratch. It's an awesome sample though! It definitely works once you get it going but two days of fighting with Collab and then that made me weary.
     
  20. IanHonorato

    IanHonorato

    Joined:
    Apr 9, 2019
    Posts:
    9
    @karstenv

    thanks,

    on the command, you could even use the command.use (from the 'E' hotkey) that is already added to the input system, to get the point if and only if the hotkey is pressed, but I'm not sure how to do this, or in which files I need to change.
     
  21. IanHonorato

    IanHonorato

    Joined:
    Apr 9, 2019
    Posts:
    9
    Hi @karstenv

    I would like to know how you did the ADS and Scoope part for the sniper.
     
  22. karstenv

    karstenv

    Joined:
    Jan 12, 2014
    Posts:
    81
    These two functions are already covered in many tutorials on Youtube. There isn't really anything related to the FPS Sample that makes it any different or harder.

    In short: For the ADS make a new animation of the placement or you weapon and trigger that animation when holding down right mouse button. Then we zoomed in a bit by making a ref to the main camera and changing the FOV.
    When you release the mouse button you just change it all back.

    For the scope part you do pretty much the same but add a scope overlay: If I remember correctly that can be placed in CharacterHUD prefab.
     
    AggressiveMastery likes this.
  23. konsic

    konsic

    Joined:
    Oct 19, 2015
    Posts:
    995
    Hi,
    could you explain how to create camera for the hands and the gun in HDRP?
     
  24. karstenv

    karstenv

    Joined:
    Jan 12, 2014
    Posts:
    81
    This is already a part of the FPS sample!!!!
     
  25. nanodiniz

    nanodiniz

    Joined:
    Feb 19, 2019
    Posts:
    4
    Hello @karstenv, it is a big pleasure to finnally talk to you, its been a year we are working a game using the FPS sample as core, its been a journey.. thank you so much in advance for all the work you' have done with your students, its amazing, we got a lot of stuff from your initiative, thank you.

    Professor, please, do you have anything like a Discord, Skype or something? Can we talk someday about points we dont understand to culminate some ideas?
    I am the director of the game, i work together with @IanHonorato and @Djalmadias, who are here in the forum aswell.
    And we are proud to annouce here finnaly that we will make a online competitive fps game with this fpssample core, and we will have such joy, we have a lot of stuff to show to you guys here soon, get ready :D

    Well its a pleasure anyway, cya!
     
  26. karstenv

    karstenv

    Joined:
    Jan 12, 2014
    Posts:
    81
    @nanodiniz I an not a professor and I don't really teach Unity. I am a game director in a commercial company working on making games full time. So I don't really have time to make tutorials or give 1-1 lectures. So in these forums I cant really do much more than guide you in the general directions of solutions.
    But what we did was to just sit down and read the code for long enough until we understood what it did. From there we started to implement new features.

    So I'm sure you guys can do the same and get your game up and running.
    Looking forward to seeing what you make :)
     
    AggressiveMastery likes this.