Search Unity

[RELEASED] MULTIPLAYER SURVIVAL TEMPLATE

Discussion in 'Works In Progress - Archive' started by Nitugard, Mar 1, 2017.

Thread Status:
Not open for further replies.
  1. Nitugard

    Nitugard

    Joined:
    May 10, 2015
    Posts:
    343

    You can watch more videos here.


    Core features of the asset:
    • Server authority
    For every multiplayer game this feature is the best one. It protects your game from hackers. I designed this template to protect everything from hacking this includes: player movement, camera rotation, player inventory, loot containers, world interaction, combat, crafting, saving and loading, construction...
    • Network optimized
    Asset is highly optimized while keeping the abilty to extend it easily.
    • Crafting system
    This system like every other is built with really easy way to add new blueprints and manage them. Crafting is done on the server side for each player and this process is highly optimized, bandwidth usage is at minimum.
    • Container system
    Having players share a container is not as easy as it sounds, plus when you add server authority. But this asset makes sure you don't have to worry about this, just make sure you create a nice UI for container and that's it.
    Players don't know what is in the container unless they send request to open it, server accepts request and sends info back to them. This is also optimized as much as possible.
    • Inventory system
    Container system and inventory system are connected to each other and are really easy to extend. You would just need to create UI with the slots and that's it.
    • Sync ragdoll physics
    When player is killed, ragdoll is spawned for every player with a correct force applied.
    • Third person view
    This enables viewing a world from third person perspective, it's the same player that others players see.
    • First person view
    First person view is built so you don't have to worry for third person and also for first person separtly, models and animations used are exactly same for both views.
    • Clothing system
    Easy to add clothes that others player can see with the option of deforming the cloth with the armature. This is really a whole clothing system which can be used in the singleplayer game, actually this whole template can be used to create a single player game!
    • Integrated with unity proximity checker
    This feature saves a lot of bandwidth, since you only load the players in proximity and you receive updates for them. This is also true for other objects such as door, fire...Correctly implemented so when things enter proximity, object state is corrected.
    • Easily add new items, blueprints, structures or containers
    The whole asset is built keeping the ability to easy edit. All items, blueprints and structures are found and edited in resources folder from which game loads them.
    • Construction system
    Easily create a structure and a rule about structure placement. There are a lot of rule examples included. This is the only thing you have to worry about. Player can then place the structure from the inventory with server authority with no extra code. Structure placement to socket is also implemented.
    • Damaging system
    This system is implemented to contain advanced data and mechanics when it comes to damaging other objects.
    • Server saving of structures, containers, player health, player positions
    The only thing currently not implemented is the saving of the in progress crafting when player leaves the server, but it is planned for another update and is very easy to implement.
    • Spawn system (two players with the same name can not connect)
    This can be further expanded in a login system.
    • Well structured code with at least 90% of which is commented
    Since there are a lot of features, I tried to make a clear, well structured and commented code so you can even learn from it how correct multiplayer game is created.
    • Developer console
    This system is really nice when you have to debug. Contains easy way to create new commands and already contains some commands which are server side.
    • Basic survival elements implemented
    Asset is called "multiplayer survival" but now when I think about it I should have called it just multiplayer template since it contains so many things that can speed up the progress of so many games which can also just be a singleplayer...

    Planned:
    This would only be possible if people are interested in it. My priority is listening to my customers, and I am already working on update.
    • Porting to other networking engines such as Bolt
    • Vehicles and new weapons
    • Multiplayer shooter example
    • [Possible] Enemies or mobs
    I plan on improving this asset, so any feedback is welcome.
     
    Last edited: May 2, 2017
  2. Nitugard

    Nitugard

    Joined:
    May 10, 2015
    Posts:
    343
    Here is a new video, just to test out the network on real server which is working fine:
     
    Last edited: Mar 8, 2017
  3. Nitugard

    Nitugard

    Joined:
    May 10, 2015
    Posts:
    343
    Great news! You can now get it on the asset store, hopefully you will like the price:
    https://www.assetstore.unity3d.com/en/#!/content/84298

    Tomorrow I'll be posing video tutorials as well as adding some new stuff to the template, if you have any suggestions I'd like to hear it!
     
    Last edited: Mar 24, 2017
  4. siblingrivalry

    siblingrivalry

    Joined:
    Nov 25, 2014
    Posts:
    384
    Hi, congratulations on getting on the store.

    What are you using for networking? and when you say its authoritative server for everything, do you mean absolutely everything?

    I am always concerned that will cause a lot of lag when having many players and data needing to be handled at the same time. Especially when it comes to combat.
     
  5. Joeronimoe

    Joeronimoe

    Joined:
    Dec 15, 2015
    Posts:
    12
    I had 10 players on last night, basically spearing each other to death, and building houses. We did not have any issues that was noticeable. I have not tested with more than 10 though.
     
  6. siblingrivalry

    siblingrivalry

    Joined:
    Nov 25, 2014
    Posts:
    384
    Thanks for the reply Joeronimoe. is it using Unet?

    I was hoping to get a reply from the dev though.
     
    Joeronimoe likes this.
  7. Nitugard

    Nitugard

    Joined:
    May 10, 2015
    Posts:
    343
    Hello, I am sorry for not responding I was quite busy. I will update main post with more detailed information about every feature.
    Server authority is the best feature, almost every network game without this feature would eventually fail if anyone decides to hack it. I implemented server authority of player movement, camera rotation, player inventory, containers, crafting, construction, combat and damaging system, saving, world interaction...and so on. Which means that none of these things can be hacked, nothing can be hacked.
    This asset is using unet (unity networking). This enables some cool features such as proximity checker.

    Network games must be optimized, and I optimized this as much as I could keeping in mind that it should be easy to extend. Currently unet is not the best, but it is getting improved.
    This template shows a correct way and possibly the best to implement all of these features mentioned. I think that many could learn from this template, that's why the price is low.

    Soon I'll do a test how well this perform and I'll record a video.
     
    Last edited: Mar 28, 2017
  8. siblingrivalry

    siblingrivalry

    Joined:
    Nov 25, 2014
    Posts:
    384
    Hi, thanks for the reply. So does that mean the source code is open?
     
  9. Nitugard

    Nitugard

    Joined:
    May 10, 2015
    Posts:
    343
    Yes, entire source code comes with the asset.
     
  10. Nitugard

    Nitugard

    Joined:
    May 10, 2015
    Posts:
    343
    Hello guys,
    Here is a quick video in which you can see my friend killing me, not the best story ending.
     
    Last edited: Mar 30, 2017
  11. siblingrivalry

    siblingrivalry

    Joined:
    Nov 25, 2014
    Posts:
    384
    Unfair as you were busy with the tree :)

    Why was the player motion so slow in the video?
     
  12. ExDeaDguY

    ExDeaDguY

    Joined:
    Aug 25, 2009
    Posts:
    503
    Hey there, I'm not trying to be a "Hater" but I did want to say.. For what you have here, I believe 30$ is over priced. I mean.. as a software developer myself, I would charge 30$ an hour on a job... However, what you're offering is quite unpolished in its current state and most likely 50% of the code would need to be ripped apart to be stuffed into and work with an already existing project. Not to mention, you're selling a generic package. (To the masses, so re usability should diminish price. I rarely want to spend 20$ on a complete AAA video game, Why would I pay 30$ for 2% of one?) You also need to be careful giving guarantees about "Unhackability". You're using unet, which... as dynamic and as great as it is, its peer 2 peer and imho aimed at small scale casual games, So the server (Or host) is most likely a separate client of the game running physics, visuals, and everything it shouldn't know about. (Costing performance), and unless it is doing checks and verification on every packet that comes through (Which would be intensive as well), its unlikely unhackable, just secure against easy access. I give you props for releasing this and wish you the best of luck, I hope you're code is understandable and polished for the buyers out there as well! But just be careful about overselling the product as you've essentially given your word and guarantee "in writing" about a few specific things and if the "S*** was ever to hit the fan" with a project that went large scale (Using this as a start template) you could likely be held accountable I think. lol.


    Anyways, Just my 2 cents and advice based on experience, but; Looking good overall! Maybe polish it up some more, Throw some rigging of clothes features in? Add some elbow grease to the UI textures, Get those gawd awful player names out of the 3D environment and into the view/ui controller (use scaling of the text to mimic the 3d effects of player distance) and you might have a hit. ^_^
     
    00Fant likes this.
  13. Nitugard

    Nitugard

    Joined:
    May 10, 2015
    Posts:
    343
    You started by showing work of your project in my own thread and now this. I'll just say that I spent half a year on this asset and that the price should be much larger but I thought many could you use this as a learning project since everything is implemented correctly and structured well.
    Every game is hackable, in the end you can just hack a server directly. This asset can be easily converted to advanced networking systems if unity networking is not good enough.
    Now when we are talking about re usability, this is not a generic template that should work by default with everything. You have to put some work on your own.

    This template is a product of just one person working on it, me. So excuse me if you don't like the animations/models...art in general.

    I did not aim for a finished game, this is just a template with a lots of features. Hopefully you did not expect whole finished multiplayer game for a free?
     
    Last edited: Mar 31, 2017
    Glock113 and LadyAth like this.
  14. Nitugard

    Nitugard

    Joined:
    May 10, 2015
    Posts:
    343
    He probably rotated faster but since this is a multiplayer game you can't send updates about rotation every frame. So after player rotates minimum specified amount, update is sent from the server to other players. On remote players I use linear interpolation to smooth out rotation and avoid jumping from one rotation to another.

    Also the movement is not so smooth right now, I'll be working on gameplay smoothness soon.
     
    Last edited: Mar 31, 2017
  15. LadyAth

    LadyAth

    Joined:
    Jan 17, 2014
    Posts:
    158
    I purchased a few days ago and I really like what I see so far. The asset is more than reasonably priced when you look at the amount of templates out there that all hover around the $60+ range.

    Please do not waste your time on making anything pretty, rather on extending functionality and features. My wish list on possible future features would be:
    * Farming
    * Animal breeding
    * Mount system (cause you mentioned vehicles!)
    * Animal/pet training (basic)

    Things like combat, more items, enemies...lots of assets are available for that already. Unless you really want to make this a full one-stop asset? The problem then is the amount of effort required to build and integrate a vast array of features which would justifiably kick the price a lot higher. I have given up on several 'BIG' templates just because the development never finishes and interest wanes.
     
    Nitugard likes this.
  16. ExDeaDguY

    ExDeaDguY

    Joined:
    Aug 25, 2009
    Posts:
    503
    No need to get butt hurt buddy. Like I said, I was not trying to disrespect this project, Just giving input (My Opinion) what would make this worth the value you're asking for. I understand that you're a programmer and not an artist, I fight that same battle every day. I was providing criticism on what personally I think would make this a better asset. You're on a forum board bud, if you think every post is going to be butterflies and rainbows than your quite mistaken. I'm giving constructive criticism.. That's what this board is meant for. You, and others, May have different views... just as you all have your own opinion.. Regardless, This is a community, every voice can be heard, weather you take my advice as a grain of salt or as good advice.. well that's up to you. Simply put: If this was my asset, these are the points I would work at. Obviously you have buyers and admirers, so you must be doing something right.. So, like I said before.. Keep at it and keep up the good work.

    PS, I removed my original first post. I was not aware that this caused any issues. I was not advertising one bit as that is not even a project that's existent anymore, Just though it was humorous at the time.

    Cheers!
     
  17. thenamesace

    thenamesace

    Joined:
    Jan 25, 2014
    Posts:
    157
    Ok so I just brought this to play with have followed all instructions and when I load the game (host server) the player does not spawn and I just have the camera view that is in the main game scene ? am I missing something? using 5.5.2f1
     
  18. Nitugard

    Nitugard

    Joined:
    May 10, 2015
    Posts:
    343
    Hi, You have to build and run. This way you can create two game instances, first one would host a server and the other one would join a server.
     
  19. thenamesace

    thenamesace

    Joined:
    Jan 25, 2014
    Posts:
    157
    Doh! thanks for that :)
     
  20. Nitugard

    Nitugard

    Joined:
    May 10, 2015
    Posts:
    343
    Day and night cycle [WIP]
    There will probably be simple occasional rain/thunder implemented and maybe fog. While working on this I am thinking about how would I implement farming, if you have any ideas I'd love to hear them.

     
    Last edited: Apr 7, 2017
    errandfox likes this.
  21. Kalle801

    Kalle801

    Joined:
    Mar 3, 2013
    Posts:
    80
    Seems to be a good template, maybe ill buy this.
     
  22. Nitugard

    Nitugard

    Joined:
    May 10, 2015
    Posts:
    343
    Thank you! If you do please don't hesitate to share with us your thoughts about it.
     
  23. LadyAth

    LadyAth

    Joined:
    Jan 17, 2014
    Posts:
    158
    Some thoughts on farming:
    • Obtain seeds either as random drops from 'harvesting' a generic plant or have it as a drop when harvesting the same kind of plant in the wild.
    • Till a square piece of land (perhaps using the building system to create a plantable section?) with each square being able to hold x number of plants. These could be rather small squares in case someone wants to maybe make a garden around their house.
    • The seeds are then used on the land.
    • If you are adding a day & night cycle, have the plants grow after a few days. A simple prefab swap-out could represent the stages. Scaling the plants sometimes gives odd results (or has for me!).
    • After x days, the plants are mature and can be harvested.
    • A sickle or scythe is needed to harvest.
    • When a plant is harvested, it drops whatever fruit/vegetable it represents, a seed/seeds and destroys the plant.
    • The tilled soil tile would be destroyed and the cycle starts all over again.
     
    Nitugard likes this.
  24. yang-yu

    yang-yu

    Joined:
    Mar 8, 2013
    Posts:
    21
    the UNet part using Hight Level API or NetworkTransport API?
     
  25. Nitugard

    Nitugard

    Joined:
    May 10, 2015
    Posts:
    343
    @yang-yu multiplayer is built upon high level API. Lack of documentation for LLAPI is one of the big reasons why I decided to go with HLAPI.

    @LadyAth That's almost what I had in mind but I was not so sure if this simple mechanics is good enough.
     
  26. lowbudgetdesigner

    lowbudgetdesigner

    Joined:
    Feb 15, 2016
    Posts:
    14
    Hello accidentally purchased this when I was trying to see if the purchase would cost tax. Could I get a refund? Haven't even downloaded it.
     
  27. Nitugard

    Nitugard

    Joined:
    May 10, 2015
    Posts:
    343
    Sure just send me your invoice number to my email onedragutin@gmail.com
     
  28. lowbudgetdesigner

    lowbudgetdesigner

    Joined:
    Feb 15, 2016
    Posts:
    14
    E-mail sent. Waiting on you. Thanks.
     
  29. Nitugard

    Nitugard

    Joined:
    May 10, 2015
    Posts:
    343
    Please check your email. I did refund you.
     
  30. Legend458

    Legend458

    Joined:
    Mar 13, 2016
    Posts:
    190
    Is the new update coming soon? Will players be able to host and play on the same computer, from one application? (not 2). Also can they name their servers? Hopefully it includes those things.
     
  31. Nitugard

    Nitugard

    Joined:
    May 10, 2015
    Posts:
    343
    Hi, update was supposed to be finished this week but due to amount of work to be done It may take little longer.
    Currently I am working on allowing hosting and playing at the same time. So this will be included. New update will include unity matchmaking service.
     

    Attached Files:

    • menu.PNG
      menu.PNG
      File size:
      35.3 KB
      Views:
      1,266
  32. Legend458

    Legend458

    Joined:
    Mar 13, 2016
    Posts:
    190
    It looks good!
     
    Nitugard likes this.
  33. Legend458

    Legend458

    Joined:
    Mar 13, 2016
    Posts:
    190
    How is the update going now?
     
    Firesoft likes this.
  34. Firesoft

    Firesoft

    Joined:
    Dec 20, 2016
    Posts:
    308
    Yeah, can we expect it this week?
     
  35. Nitugard

    Nitugard

    Joined:
    May 10, 2015
    Posts:
    343
    I am working on it. I will hopefully finish it by the end of this week. It will take few days to upload it on the asset store so it wont be possible to be published this week.

    It is really not easy to implement hosting and playing at the same time since this was not planned and if I remmember correctlly it is even mentioned somewhere in unity docs that this should not be allowed in real enviroment.
     
  36. Nitugard

    Nitugard

    Joined:
    May 10, 2015
    Posts:
    343
  37. Nitugard

    Nitugard

    Joined:
    May 10, 2015
    Posts:
    343
    Here is one good question:
    Should I remove server authority?

    Please tell me what you think about this, here is my opinion...It would be 10 times easier to edit the template, template would look 10 times better. What is then downside you may ask? Well it is 100 times easier to hack.

    If I remove this, I'd be able to include a lot more things much faster...right now it is taking a lot of time.

     
    121Gamers and Firesoft like this.
  38. Firesoft

    Firesoft

    Joined:
    Dec 20, 2016
    Posts:
    308
    I would say yes.
     
  39. Legend458

    Legend458

    Joined:
    Mar 13, 2016
    Posts:
    190
    I'm not sure if it should be removed......if it is removed, how much easier would it be to add objects in the game? I would say keep the server authority.
     
  40. MMOInteractiveRep

    MMOInteractiveRep

    Joined:
    Apr 7, 2015
    Posts:
    88
    Removing Server authority would make your product useless to anyone really trying to make a game with it. It would only be a good for games with a few friends and that's it.
     
  41. Nitugard

    Nitugard

    Joined:
    May 10, 2015
    Posts:
    343
    Server authority is the core of the asset and also it is a reason why I spent more than a half a year developing it. I would not feel happy to remove it, but without it I feel like I'll be able to create one of the best templates when it comes to networking.

    It is not that hard to add new basic items it is rather very simple.

    Well at least for now anyone can continue developing on top of this asset without server authority.
     
  42. errandfox

    errandfox

    Joined:
    Apr 22, 2015
    Posts:
    42
    Mate, it looks great, I'm especially interested in the unet setup. I tried to buy it but it's saying needs unity update on the asset store? asset store wouldn't let me download. I'm assuming that's because of the recent unet updates. But anyway, definitely keep server authority, i'll be using this template to see how it's implemented as the documentation isn't the best.
     
    Nitugard likes this.
  43. Nitugard

    Nitugard

    Joined:
    May 10, 2015
    Posts:
    343
    Thank you very much! I am not sure what the problem with buying is, hopefully next update will fix it.
     
  44. errandfox

    errandfox

    Joined:
    Apr 22, 2015
    Posts:
    42
    figured it out, i had to update my own unity version, doh. Now am working through hooking up a different character controller/animator. mine uses fp camera to set rotation and pitch, not the body rotation/pitch to set the camera. i suppose that makes little difference to the server though as long as it gets the variables it needs.
    I've been using photon previously which is semi authoritative at best - in photon you would send 'server' your position/rotation after applying it on local player, and 'server' would just send rpc to replicate on other remote players, after perhaps a very basic validity check.
    i see here i must send intended position/rotation to server and let it move or correct my local player as well as move the remote players. this will be interesting :)
     
  45. Nitugard

    Nitugard

    Joined:
    May 10, 2015
    Posts:
    343
    You figured it out pretty fast, still if you need any help I'd be happy to help.
     
  46. Nitugard

    Nitugard

    Joined:
    May 10, 2015
    Posts:
    343
    Update 1.2


    Here is the new update, which should be live on the asset store this week.

    This update contains a lot of improvements, which includes:
    -Improved gameplay smoothness
    -Lowered bandwidth usage
    -Reworked main menu
    -Fixed bugs
    -Implemented mode to host and play at the same time
    -Added matchmaking
    -Added running when pressing shift
    -Added footsteps when walking on grass
    -Added farming with one basic plant
    -Added attributes for player and easy sync (implemented stamina, hunger and thirst)
    -Code structure improved
    -Compatible with unity 5.6
    -Added farming mechanics
    -Added day and night cycle
    -And much more​
     
    Last edited: May 2, 2017
  47. Firesoft

    Firesoft

    Joined:
    Dec 20, 2016
    Posts:
    308
    Im very excited to try it out! :)

    You didnt add guns :(
     
    Nitugard likes this.
  48. Nitugard

    Nitugard

    Joined:
    May 10, 2015
    Posts:
    343
    @Firesoft guns... well I am not sure how well it will suit this template, I think there would be so much stuff in one template...
     
  49. LadyAth

    LadyAth

    Joined:
    Jan 17, 2014
    Posts:
    158
    The updates are looking really good!
    I'm more keen on the template features than stuff like guns or other weapons use - more than enough assets on the store for that. Oh, and please do keep the server auth - I agree with the views above that it makes a game far too easy to hack and abuse if it is not there. I'm very happy with the rate of updates, so please take what time you need. There are lots of templates on the store that get no updates for months on end.

    Farming!!! :D
    *still holds thumbs for animal breeding...*
     
    Nitugard likes this.
  50. Legend458

    Legend458

    Joined:
    Mar 13, 2016
    Posts:
    190
    Update looks really cool! I will update my review once I've tried it out.
     
    Nitugard likes this.
Thread Status:
Not open for further replies.