Jump to content
This site uses cookies! Learn More

This site uses cookies!

armedunity.com uses cookies to improve user experience.

By continuing to use this site, you agree to allow us to store cookies on your computer.

Leaderboard


Popular Content

Showing content with the highest reputation since 03/05/2013 in Posts

  1. 133 points
  2. 70 points
    Hey guys, so I decided to make a thread about the useful scripts that are in this very useful forum. This thread will be updated regularly as soon as I (or you) find some useful scripts. If you found this helpful then leave a "like"! FORMAT: (thread name) by (author of thread) [language (C#/JS)] LIST [@DaBossTMR] Flashlight Script v2.1.1 by DaBossTMR [C#] Bullet Trajectory/Physics by DaBossTMR (credits to Jeremy Clark) [C#] Player Push (less glitchier) by DaBossTMR [C# and JS] [NGUI] Changing Screen Resolutions by DaBossTMR [C#] Top-down Shooter Camera by DaBossTMR [C#] Object Impact Sound by DaBossTMR [C# and JS] Populate Terrain Grass by DaBossTMR [C#] Realistic Camera Shake by DaBossTMR [C#] (credits go to UTnT) Find Closest Transform With Tag by DaBossTMR [C#] Disable ALT-F4 In Game by DaBossTMR [C# and JS] Extended FPS Counter by DaBossTMR [C#] [@OneManArmy] Jeremy Clark's FPS Scripts by OneManArmy [JS] RTS Camera by OneManArmy [JS] Rigidbody Controller by OneManArmy [JS] Buoyancy (Floating Objects) by OneManArmy [C#] Audio Effect When Falling by OneManArmy [JS] Cigarette Smoke Trail by OneManArmy [JS] [@OcularCash] Save/Load Method (Player Prefs) by OcularCash [JS] Health Regeneration by OcularCash [JS] Bouncing Betty/Freddy by OcularCash [JS] COD Style Cooked Grenades by OcularCash [JS] Javelin Script by OcularCash [JS] Stealth Bomber by OcularCash [JS] Harrier with Airstrike by OcularCash [JS] Anti-Spawn Trapping by OcularCash [JS] Predator Missile by OcularCash [JS] Weapon Wheel (GUI) by OcularCash [JS] MW2 Style Semtex Grenade by OcularCash [JS] Team Selection (Private Match) by OcularCash [JS] Flare Gun (with Exploding Rounds) by OcularCash [JS] Explosion (Linear Falloff Damage) by OcularCash [JS] Using Enums To Call Functions by OcularCash [JS] Basic Procedural Player + Movement + Walkable Area by OcularCash [JS] [@Duxducis404] Quake Map Loader (pk3 files) by Duxducis404 [C#] [@YoungDeveloper] Simple Teleport by YoungDeveloper [C#] [@T3kaT0kIkuTa] Particle Magnet by T3kaT0kIkuTa [C#] [@DarkChaos] Wall Avoidance by DarkChaos [JS] Disable Shadows For One Camera by DarkChaos [JS] Improved Sniper Scope System by DarkChaos [JS] Frames Per Second Counter by DarkChaos [JS] Knife Script with Animation Support by DarkChaos [JS] Countdown Timer by DarkChaos [JS] [@themars2011] Extended Timer/Counter by themars2011 [JS] Useful Networking Scripts by themars2011 [JS] Toggle Aim by themars2011 [JS] Mouse Look w/ Custom Editor by themars2011 [JS] [@bxboy15] Weapon Sway/Rotation by bxboy15 [JS] [@ProRussianMn] Save/Load Method (XML) by ProRussianMn [JS] [@jordanblythe104] Weapon Sway Script (Red Orchestra Style) by jordanblythe103 [JS] [@aeditz50] Cinematic Camera Shake by aeditz50 [C#] [@nightbird0] Smart FPS Counter by nightbird0 [C#] [@Epic-Shot] Fullscreen Video Using GUI (Pro Only) by Epic-Shot [C#] [@loftail] Zombie AI (Pro Only) by loftail [JS] [@dreadt9] Sentry Gun by dreadt9 [JS] l4mishotiz (Unity Forums) FPS Starter Scripts by l4mishotiz [uNKNOWN] [@jediaction] Peek Script by jediaction [JS] SIMPLE SCRIPTS/TOOLS Simple Tips System by pspdude [JS] Javascript to C# Converter by M2H [C# people]
  3. 39 points
    Hello guys and welcome to my showcase of our futuristic tactical action FPS game called Darkraze. Currently, it is being developed by a team of 2 people (including me) named Renegrad Studios. This game will be FREE. I will be releasing updates spanning from 1-2 weeks (or longer). You can follow these updates by clicking on Follow Topic at the top right, liking our facebook page, and subscribing to DaBossTMR on YouTube! Facebook Page: Darkraze Official Page YouTube: DaBossTMR IndieDB: Darkraze Main Update List (Changelogs and Videos): > Update #1 > Update #2 > Update #3 > Update #4 > Update #5 ---------------------------------------------------------------------------------------------------------------- ---GENERAL--- Game name: Darkraze Game genre: Tactical/Action Style FPS Main game modes: Singleplayer, multiplayer, and survival. Time Period: 2172 on a planet similar to Earth. Futuristic themed. Price: Free ---SINGLEPLAYER STORY--- Rough plot: The story takes place in 2172, when Earth's resources are nearly depleted and its once beautiful nature is now ruined. 15 years ago (2157), Project Javelin has launched a new transportation to allow transportation to nearby planets quickly (at that time) and efficiently. This has led to a discovery of Planet X. On the planet in current time, emergency deploy unit (EDU) (main character) Atlas-163 wakes up from "sleep mode" (slows down the replication and death of cells) to a code-red alert when attacked by an unknown race. Blahblahblah, the story continues from there. ---MULTIPLAYER--- Max. Players Per Server: 2-16 (may change later) Matchmaking Methods: Quick Match (searches and places you in a random match automatically) Join (join games from server list) Game modes (6): Weapons: Aiming for about 25 - 35 weapons. Maps: Scaling from small (COD) to large (BF3), 8-12 maps. ---------------------------------------------------------------------------------------------------------------- Info on the F2P game: - ABSOLUTELY NO pay-to-win items, any potential purchasable items are only used for stylistic purposes (cosmetics). STATISTICS (as of March 15th, 2015): 272 scripts, 35,500 lines of code (ALL WRITTEN BY US). Complete Uncompressed Build Size: 407 MB.
  4. 33 points
  5. 33 points
    [ Disclaimer ]: Uses Legacy Unity RakNet In order to understand how networking works, and how communicating between computers, it is useful to learn the sequence of connecting to a server. It is convenient to use one server version of each scene in a Unity project and one client version of each scene. This is useful for when you want to separate the server and client applications from each other. Connecting client and server Network Views RPC Details State Synchronization Details Authoritative Server Leave a like if you found this useful!
  6. 28 points
  7. 27 points
    Title: not decided yet In development: since 16.03.2014 Visit armedunity facebook page: https://www.facebook.com/armedunity ***** Jetpack: Update #1 (v0.3) Update #2 (v0.4) Update #3 (v0.5) Update #4 (Menu)
  8. 26 points
    Advanced Building System nDev Studios Version 1.0 Alpha Version 1.1 YOUTUBE ACCOUNT REMOVED SORRY No Videos Videos For any questions please first make sure that are not answered on the documentation and then ask me here or at devstudios@gmail.com. Thank you guys. Use it both commercial or non-commercial but Give Credits!
  9. 22 points
    Vehicle Physics. Info: So. I have noticed a lot of community members have been seeking Vehicle Physics.. I was going to create a project from scratch for the community but i have been sidetracked by my Racing Game Project ATM. So i took Andrew Gotow's Vehicle Physics & Customized - Rewrite the Code So the Vehicle Handles & Behaves Better. Has a real center of mass. Anti Roll Bars. etc. This Project Will Not Be Receiving Anymore Updates Because My Current Project is taking up a lot of my time. So I hope everyone here enjoys the projects & Makes something cool from them I will be here for support, If you have any issues / Bugs please let me know & I will be more then happy to help You out! NOTE: You are free to use this Commercially If You Replace All The Models / Sounds With Your Own. Please Do Not Upload This & Share It. If You want to share with you Friends Send Them A Link To This Thread. Features: Automatic Gearbox. Handbrake. Deceleration Speed. Anti Roll Bars. Skid marks With Smoke & Audio. Vehicle Has Max Speed. Steer Angle Is Adjustable In The Inspector. DEMO: Video Preview: Downloads. V1 : Just The Physics. https://www.mediafire.com/?kel5si16p3saxsr V2 : The Physics & First Person Controller Enter And Exit System. https://www.mediafire.com/?1i3enlz6cdhitay Downloads For 4.3. V1 : Just The Physics. https://www.mediafire.com/?vp7trxeffs3p6k3 V2 : The Physics & First Person Controller Enter And Exit System. https://www.mediafire.com/?vp7trxeffs3p6k3 Update #1 Improved The WheelAlignScript. & Made it able to handle all wheels at once. Instead of multible scripts being ran on all four wheels. How To Use The Updated Script. Step 1. Delete the WheelAlign Script. Step 2. Create a new script called WheelVisuals & Paste The Above Into The Script. Step 3. Assign This Script To The Vehicle. Step 4. Assign Your Wheel Colliders Matching The Names. & The Wheel Meshes. Step 5. Hit Play & Notice Everything still works Beautifully yet its easier to Manage. Note: "Mesh Is The Actual Wheel Model." "Wheel Is The Actual Collider" Note: SkidSmoke = SlipPrefab. Credits: OneManArmy - Enter & Exit Source From FPSKIT. Andrew Gotow - Vehicle Physics. http://www.gotow.net/andrew/blog/?page_id=78 Andrew Laverack *Epic-Shot* - Edit & Rewrite. http://armedunity.com/user/8297-epic-shot/ Angel Garcia *Edy* - Anti Roll Bar. http://forum.unity3d.com/threads/50643-How-to-make-a-physically-real-stable-car-with-WheelColliders Roylen - Easy Skid marks. http://forum.unity3d.com/members/86349-Roylen
  10. 22 points
    My gun has been released now Completely free get it herehttps://www.assetstore.unity3d.com/en/#!/content/46033
  11. 21 points
    Special thanks to DannyIsSoPro for the logo! This is similar to the "game of the year" contest, just with games made by you! The top three winners will get their topic (if there is one) pinned for one week. Until (December 31th, 2014), you must have a PLAYABLE DEMO or GAMEPLAY VIDEO OF AT LEAST 5 MINUTES (only if you are on the contestants list before registration deadline), the game has to be made in the Unity3D game engine. From the 1st January to the 4th you can vote. On the 5th we will announce both winners. VOTE FOR THEM HERE: http://armedunity.com/topic/10796-indie-game-of-armedunity-contest-2014-vote/ Current Contestants (6): themars2011 - Cold Bodies - Survival FPS - Submitted DaBossTMR - Darkraze - Tactical Action Sci-Fi FPS - Submitted ratses - Scream In The Forest - Survival Horror - Submitted Blueagardq13 - Extraction Point - Multiplayer FPS - Submitted RedCrusaderGames - Societatem - Tactical FPS - Submitted YoungDeveloper - Fantasy MMORPG - MMORPG - Submitted VOTING RULES: If you are a developer of one of these participating games, DO NOT VOTE FOR YOUR OWN OR YOU WILL BE DISQUALIFIED. Your member account must be authorized, and not a spam account that you just created during voting day. All poll results will be checked for 'consistency' Please do not vote for the person only because you like them, but instead vote for the game that YOU would most likely play. In other words, be as unbiased as possible. Jury: Some suggestions: OneManArmy DaBossTMR✔ OcularCash✔ Connor Gibson✔ DannyIsSoPro✔ willywill✔ The juries will judge the games with these critic: Gameplay: Scale from 1 - 10 PLUS Unique/Not Unique Graphics: Scale from 1 - 10 Controls: Scale from 1 - 10 Customization of settings: Optional. Additional comments... There will be two winners (most likely): Voting Winner (Popular Vote) Judge Rating Winner IMPORTANT INFO FOR THE VIDEO: DO NOT USE COPYRIGHTED MUSIC! PRIZES? The winner's topic gets pinned and can win the Ultimate Inventory from nightbird0, and also...
  12. 21 points
  13. 21 points
    Part I - Introduction _____________________ Objective: To make ones own custom image effects by the end of the tutorial. Materials: Unity Pro, Script Editor Need to Know: Must know and understand the basic functionality of scripting and how to use the Unity documents, if stuck. Shoutout: Jmaster for requesting the tutorial! Part II - The Shader First line of any shader must look like this: Shader "Custom/ShaderTutorial" { } Shader tells unity this is a shader. "Custom/xxxxx" Custom says what category the shader is located (see example below). "Custom/ShaderTutorial" This says to place "ShaderTutorial" under "Custom" category when selecting a shader. You don't need a subcategory. Its just for organization; you could essentially do it like this: Shader "ShaderTutorial" { } Next is the properties box. When creating image effects, keep in mind the only thing that needs to be in the properties box is _MainTex. We will get more in depth later. Shader "Custom/ShaderTutorial" { Properties { _MainTex ("Base (RGB)", 2D) = "white" {} //No semicolon in Properties! } } Then you have the SubShader, the actual shader location, the Pass, you can have more than one, and the CGPROGRAM. Shader "Custom/ShaderTutorial" { Properties { _MainTex ("Base (RGB)", 2D) = "white" {} } SubShader { Pass { CGPROGRAM ENDCG } } } Subshader as stated before is the actual shaders location. It contains all Passes. Pass is the place where you can enter a CGPROGRAM. If you want multiple CGPROGRAMs you need more passes under SubShader to contain them. CGPROGRAM is the CgFx code. The Cg language adopted by Unity, made by Nvidia, supports both HLSL(High Level Shading Language) and GLSL(OpenGL Level Shading Language?) commands. You can find out more about it here: http://http.developer.nvidia.com/CgTutorial/cg_tutorial_chapter01.html CGPROGRAM is where you will place the actual code for the shader in the Cg language. The language derives from C so if you know C# this is a piece of cake to understand. ENDCG just tell Unity, "Hey you can stop sending this info to the GPU now!" Now lets dive into some shader code.. Shader "Custom/ShaderTutorial" { Properties { _MainTex ("Base (RGB)", 2D) = "white" {} } SubShader { Pass { CGPROGRAM #pragma vertex vert_img #pragma fragment frag #include "UnityCG.cginc" uniform sampler2D _MainTex; float4 frag(v2f_img i) : COLOR { float4 theScreen = tex2D(_MainTex, i.uv); return theScreen; } ENDCG } } } #pragma - you've seen this before I hope, It gives special instructions prior to the codes execution.Vertex Shader - http://en.wikipedia.org/wiki/Shader#Vertex_shaders A vertex shader for image effects just needs the screen coordinates because we're not applying this to an object we don't need an object's vertices. #pragma vertex xxxx - says, "whats the name of the vertex shader so I can find it?". The vertex shader here is "vert_img". But Wait! I dont see it anywhere in the shader!? Thats because its inside the file "UnityCG.cginc" which we have included thanks to pragma. It contains all the info we need so we don't have to worry about it. Phew Fragment/Pixel Shader - http://en.wikipedia.org/wiki/Shader#Pixel_shaders A pixel shader tells how the screen/object should be shaded. In our case we need to shade the screen which is why we arent concerned with the vertex shader and pushed it aside and used the built in "vert_img" vertex shader. #pragma frag xxxx - says, "whats the name of the fragment shader so I can find it?". Pixel shaders are nothing without a vertex shader sad but true. They need the vertex shaders information so they can begin with shading the screen. float4 frag(v2f_img i) : COLOR float4 - similar to Vector4, it contains xyzw or rgba components. Your fragment shader must be a float# (theres more but leave that for later). You put this in the front of the fragment shaders name. If you are returning a float3 it must be float3 before the name. In this case the fragment shaders name is frag. Nostalgia hitting you yet? It should because "frag" is also what we've told Unity our fragment shaders name is a few lines up in #pragma fragment frag. (v2f_img x) - ignore the x for now. Also located in "UnityCG.cginc". It is the name of a struct that contains the vertex program "vert_img". (v2f_img i) - Ok back to the variable i. "i" is the variable for accessing the struct. You must have one but you can name it what you like. Ex. (v2f_img myvariable). xxx : COLOR - This is called a semantic. It says, "Hey, what type of info is this?". Funny though because you can name it almost anything below but keep it COLOR. Semantic Types http://msdn.microsoft.com/en-us/library/windows/desktop/bb509647(v=vs.85).aspx uniform sampler2D _MainTex; float4 frag(v2f_img i) : COLOR { float4 theScreen = tex2D(_MainTex, i.uv); return theScreen; } uniform sampler2D _MainTex - samples the screen as a texture. Or to simplify, takes a screenshot of the current screen and places it in your shader as a 2D texture. float4 theScreen is a new variable called the screen that holds 4 components, rgba or anything else but lets focus on rgba. theScreen = tex2D(sampler2D, coordinates). The sampler2D is the main image or _MainTex. The coordinates it will use are the screen coordinates, which we take from the vertex struct v2f_img and access the uv components by saying "i.uv". http://msdn.microsoft.com/en-us/library/windows/desktop/bb509677(v=vs.85).aspx We then return the screen in its original state but of course lets modify it! Lets take the red component of the main image and amplify it! float4 theScreen = tex2D(_MainTex, i.uv); theScreen.r += 0.5f; return theScreen; This takes the red component only of the screen and adds 0.5 to it. It should turn out more red once we finish. But we should make the value of redness changeable in the inspector. Lets do it.. Shader "Custom/ShaderTutorial" { Properties { _MainTex ("Base (RGB)", 2D) = "white" {} } SubShader { Pass { CGPROGRAM #pragma vertex vert_img #pragma fragment frag #include "UnityCG.cginc" uniform sampler2D _MainTex; uniform float _Redness; float4 frag(v2f_img i) : COLOR { float4 theScreen = tex2D(_MainTex, i.uv); theScreen.r += _Redness; return theScreen; } ENDCG } } } I've added a variable _Redness that will let me control the redness once we get to the script you will see. Part III - CSharp and RenderTextures I won't go into too much detail but here is the basic script for rendering Image effects. using UnityEngine; using System.Collections; [ExecuteInEditMode] //See changes in realtime public class ShaderName : MonoBehaviour { #region Variables public Shader CustomShader; public float Redness = 1.0f; private Material curMaterial; #endregion #region Properties Material material { get { if(curMaterial == null) { curMaterial = new Material(CustomShader); curMaterial.hideFlags = HideFlags.HideAndDontSave; } return curMaterial; } } #endregion // Use this for initialization void Start () { if(!SystemInfo.supportsImageEffects) { enabled = false; return; } } void OnRenderImage (RenderTexture sourceTexture, RenderTexture destTexture) //sourceTexture is the source texture, destTexture is the final image that gets to the screen { if(CustomShader != null) { material.SetFloat("_Redness", Redness); //Links the shader value to the C# value so it can be updated at anytime in the Inspector Graphics.Blit(sourceTexture, destTexture, material); //Draws a full screen texture to be displayed with the material named "material" which also has the shader attached to it (See line 19) } else { Graphics.Blit(sourceTexture, destTexture); //If the computer doesnt support Image effects or cant run the effect just use the main image without a material applied } } // Update is called once per frame void Update () { Redness = Mathf.Clamp(Redness, 0.0f, 1.0f);//Clamp values in here to keep things from going overboard and you can't get bigger than 1.0 unless HDR is used on the render texture format } //When we disable or delete the effect..... void OnDisable () { if(curMaterial) { DestroyImmediate(curMaterial); //Destroys the material when not used so it won't cause leaks } } } Now we have an image effect that lets us control the values of redness in the inspector. Time to red this up Part IV - Conclusion After attaching the script to a camera and changing its name inside and outside the cs file to anything you want, apply the shader to the CustomShader slot. You can name the shader anything, it doesn't have to be the same as it was in the code. And thats all. Make up your own task. Challenge yourself and see what you can do with this newly acquired knowledge. Before and After screens: Before After
  14. 19 points
    Welcome, to a very long tutorial on how to make your Unity3D games look "better". I say "better" because not everyone's art styles appeases to realism and I will respect anyone's artistic style here. Now this post will cover the following topics and will be updated on a day-to-day basis so make sure to stop by and read up on the updates. The Unity Pro related topics will be highlighted with PRO next to them. Directional Lighting Ambient Lighting Global Illumination H.D.R. Tonemapping Bloom Image Processing Reflections Textures Anti-Aliasing Translucency Miscellaneous Materials Physically-Based Rendering Alright, so these topics will not be typed up in any particular order. The first topic I will cover will be an easy one, which is directional lighting. Directional Lighting in Unity3D is simply a light vector in 3D space, more specifically in world space, disregarding shadows, that cast lighting on all objects. This form of lighting is approximated with the function NdotL, or the dot product between the light vector and the normal of the objects. Where θ is the angle between them known as the angle of incidence. Without using the cosine function, we discovered the dot products of these two vectors are equal to the cos(θ). This NdotL is a very cheap approximation of subsurface scattering, also known as diffuse. Diffuse meaning scatter or spread. It is a way to account for the Sun and is often tinted with a light color to give artist freedom in what color the "Sun" is. This is commonly known in video games as Lambertian shading. It can be coded as such (Cg) : //pseudo code float3 NormalVector = normalize(NormalVecFromVertexShader); //normalize means to make all the vectors a unit length of 1 float3 LightVector = if you're using Forward Rendering - normalize(_WorldSpaceLightPos0.xyz); if you're using Deferred Rendering - normalize(-_LightDir.xyz); float3 NdotL = max(0.0f, dot(NormalVector, LightVector)); //Can't have less than no light being reflected on a surface. so at most no light. With a "Sun" in our games giving us an approximation to diffuse lighting, it also gives us the opportunity to create shadows. Shadows are a crucial part in video games. You are allotted 1 Directional Light with Hard Shadows in Unity Free so make sure your taking advantage of the opportunity! Example of Directional Lighting: Attenuation is the gradual loss in intensity of any kind of flux through a medium. The way Unity attenuates light is based somewhat off of the typical approach in 3D games and not a physical approach. See [physically based rendering] to see how we can get a far more physically-based results using the Inverse Square Law. Now, enough of the physics and math, with this we will figure how we can use the knowledge to our advantage. As you may already know, you can fake ambient light using multiple directional lights. This will lead us into our next topic, ambient lighting. Ambient Lighting in the simplest terms is everything that's not directional lighting. Ambient lighting in the real world is what is known as global illumination where every surface absorbs, (diffuse global illumination), obscures, (ambient occlusion), reflects, and/or refracts light (specular global illumination). In video games, it is common to use a constant color as ambient lighting. Its easier! Rather than calculating some expensive GI you just say that entire scene has a blue ambient color. But, there are better ways to solve for ambient lighting in ways that are much more accurate. [All pertaining to the first image inside the example] Notice the occlusion, and the absorption of the ambient lighting. There isn't very much reflection or refraction going on. When it's reflected or refracted the objects would be shiny. I will show a comparison. For now take note of the following. Ambient occlusion only exist within ambient light The diffuse term of the ambient light is not a constant color There is not ambient specular lighting within this scene Example of Ambient Lighting: AMBIENT LIGHTING IS KEY TO A GREAT LOOKING GAME! Far Cry 3 for example uses an excellent ambient lighting system that I highly recommend you all check out. Now, the question is how do I get better ambient lighting? How do I replace Unity's crap of an ambient lighting system (that will be replace in Unity 5 )? Many many ways. Very small filtered or blurred cubemaps for example a 4x4 size cubemap. You can take these cubemaps in Photoshop and paint them how you please. Get creative! Hemispherical Ambient Lighting. Use fake lighting vectors multiplied by an attenuation term which is what I use in conjunction with cubemaps. Spherical Harmonics although this one isn't practical in real-time just yet. Importance Sampling, what Unreal Engine 4 uses to filter cubemaps, what I will be using in the future. Global Illumination techniques Light Probes I will give a quick tutorial on Hemispherical Ambient Lighting based from this article here: http://devlog-martinsh.blogspot.com/2011/08/simple-and-efficient-skylight-setup.html Sky light for simple reasons can just be computed as the dot product between the down vector and the normals of the surface, multiplied by a sky color and sky intensity value. PRO It's best to apply this to all objects in the scene, you can do this via post process by using sampler2D _CameraDepthNormals or by adding it into the deferred rendering and applying it to the global normals there. float3 SkyLightVector = float3(0.0, -1.0, 0.0); //Fake light pointing down float3 GroundVector = float3(0.0, 1.0, 0.0); //Fake light pointing up float3 BouncedLightVector = -LightDirection; //Opposite of the light direction float3 _SkyColor; // - passed in from via script float SkyIntensity; //The others are very similar, just replace SkyLightVector below with the others and multiply by separate colors and intensities float3 SkyLighting = dot(normals, SkyLightVector) * SkyIntensity * _SkyColor; float3 ImageBasedLighting = SkyLight + GroundLight + BouncedLight; ImageBasedLighting *= AttenuationTerm; // This can be halflambert like in the reference or any other attenuation term ImageBasedLighting /= PI; //See below why we divide by PI We divide by PI at the end for Physically-based reasons. I called it image-based lighting because I was lazy and copied and pasted Read this here - http://seblagarde.wordpress.com/2012/01/08/pi-or-not-to-pi-in-game-lighting-equation/ - and check out the [ physically based rendering] section as well. I will probably come back to this because ambient lighting is a very in-depth topic but my internet connection being throttled. [stop Tom Wheeler, save the internet!] Directional + Ambient Diffuse
  15. 17 points
    Hey guys! I would like to show you our new asset, which has been published just a day ago. As you can see in the title, Quantic is an advanced character controller solution for any first-person game. Featuring multiple movement types, such as traditional first-person movement, realistic zero gravity movement, and free-roam spectator style movement as well. It is a really smooth, gravity and state based character controller system with dynamic footstep sound, and head bobbing mechanics as well. We also give you a total of 12 high quality footstep sounds! It is 100% game ready, you can just drag and drop the character into the game and you are good to go! No programming required at all! Don't worry, we also thought about experienced developers, so we made a state system which you can use to get every information related to the character. With this system in place, you can extend the controller with ease and without limits. Here is the Asset Store page: https://www.assetstore.unity3d.com/en/#!/content/86326 I know that you came for the giveaway so lets talk about that. As a contribution for the community I will be giving away 5 copies of the asset, which is worth $100. If you want to participate in the giveaway you have to do the following steps: You have to have at least 20 posts on the forums. Like this post, I don't know... just why not! Leave a comment under this post. Hope for the best! The winners will be selected on April 16, 2017 by a script in Unity just to make it more fun! Good luck everyone, and have a nice day!
  16. 17 points
    Download me. If you have any questions, just ask. Please leave some feedback
  17. 17 points
    Q. How to use this script? A. Just drop this script on root of your weapon GO and adjust all parameters in Inspector. var amount : float = 0.02; var maxAmount : float = 0.03; var smooth : float = 3; private var def : Vector3; function Start (){ def = transform.localPosition; } function Update (){ var factorX : float = -Input.GetAxis("Mouse X") * amount; var factorY : float = -Input.GetAxis("Mouse Y") * amount; factorX = Mathf.Clamp(factorX, -maxAmount, maxAmount); factorY = Mathf.Clamp(factorY, -maxAmount, maxAmount); var Final : Vector3 = new Vector3(def.x+factorX, def.y+factorY, def.z); transform.localPosition = Vector3.Lerp(transform.localPosition, Final, Time.deltaTime * smooth); }
  18. 17 points
    This doesn't include any models, just universal animations for movement of weapons. The pack includes Idle (Not Moving), Walk, Run With Scoped Weapon "LongRun", Run With Non Scoped Weapon "Medium Run" And Run With Pistol "ShortRun". Here's a preview of the idle, walk and scoped weapon run: https://www.youtube.com/watch?v=CJPS-7FVKc8&feature=youtu.be To use, just create an empty gameobject and place it as a child of the weapon camera (or anywhere under the weapon camera) and zero out the position and rotation. Then move everything that is parented to the same object to under the new gameobject. Place an Animation component on the new gameobject and drop the animations onto it. Easy as that. Animations.zip
  19. 17 points
    This small building enterable. I hope you like it Licene: Commercial Use Donwload: https://mega.co.nz/#!74wggR6C!ARjNa9hdozQYm--uNYWlg5QGjYW1Oz1smI54_UzzE6c PS: Unity generated the normalmap badly. Sorry about it.
  20. 17 points
    Hey Guys! I now have another shader to showcase and release soon, my ocean shader! This shader Is sort of based on Martians water shader but of course its mainly different from his. Anyways me and willywill have been making some shaders together as a collaboration and this is one of them. Anyways now the Screen shots!!! V1 (Main Shader, With Fresnel, Specular, Reflections, Color (Lerped with Shallow Water Color), And Waves 1. https://www.dropbox.com/s/tbpljh6w7dmrchi/Screenshot%202014-04-11%2022.50.55.png 2. https://www.dropbox.com/s/24kf4olnr3c0mq0/Screenshot%202014-04-11%2022.51.08.png 3. https://www.dropbox.com/s/gvhbkmjsbzaujq3/Screenshot%202014-04-11%2022.51.27.png 4. https://www.dropbox.com/s/gxy4h17icwtigag/Screenshot%202014-04-11%2022.53.33.png V2 (Vertex Displacement Implemented) 1. https://www.dropbox.com/s/6mwyaeskj6lpzth/Screenshot%202014-04-12%2012.26.21.png 2. https://www.dropbox.com/s/r2xaqd06v0e3xhy/Screenshot%202014-04-12%2012.27.45.png 3. https://www.dropbox.com/s/vlfs9exd9z8nkie/Screenshot%202014-04-12%2012.28.06.png 4. https://www.dropbox.com/s/2ceptclltwh9rp2/Screenshot%202014-04-12%2014.07.06.png V3 (Foam) 1. https://www.dropbox.com/s/32qvvwodi5y7ma0/Screenshot%202014-04-12%2016.01.54.png 2. https://www.dropbox.com/s/94wrwjp4vwe3a8q/Screenshot%202014-04-12%2016.03.25.png 3. https://www.dropbox.com/s/1g4ivlc3hihkel5/Screenshot%202014-04-12%2016.03.49.png 4. https://www.dropbox.com/s/ws17hhlv6t6k2qc/Screenshot%202014-04-12%2016.04.29.png V4 (New Fresnel) 1. https://www.dropbox.com/s/skqzlm44bomlw7p/Screenshot%202014-05-06%2015.25.37.png 2. https://www.dropbox.com/s/4vigan7led0kvml/Screenshot%202014-05-06%2015.26.12.png 3. https://www.dropbox.com/s/0pxqyl1maq9kifb/Screenshot%202014-05-06%2015.27.32.png 4. https://www.dropbox.com/s/k4dfq2pi4ja1jq5/Screenshot%202014-05-06%2015.27.55.png V4 Download - https://www.dropbox.com/s/g9vs7hqqt8alz0u/water.unitypackage NOTE: Keep the ocean prefab position coords at 0 0 0, if you want to move it, move it very slightly otherwise it will disappear, this is an issue with the vertex displacement Anyways The ocean shader is still a WIP and is far from finished, but so far it looks really good (in my opinon). Yet To Do - Physically Based Specular - Depth Fog - Sub Surface Scattering - Improve the Fresnel Term (Done) - Use a BDRF model (Working) Known Bugs - Specular isn't Facing to the Light Dir Correctly For this to work you must have a card that supports SM3.0 or Higher. And will not work with DX11 enabled, sorry If your going to use this in a commercial project, be sure to credit me So anyways What do you guys think? Best Regards, Frosty5
  21. 17 points
    Ocean with BRDF lighting. https://www.youtube.com/watch?v=cRWCLF9Mi68 Information and download link you can find here: http://scrawkblog.com/2013/06/04/ocean-with-brdf-lighting-in-unity/
  22. 17 points
    The FPSKIT Multiplayer v1.2_0.3MP A biiiiiiiiiiiiiiiiiiiiiiiiig update for everyone. Tutorial about how to add a weapon coming out soon. A Serverlist! A Chat! Killmessages! shooting over network works You have a server list your own playername, level and total score (works over playerprefs) a chat kill messages in chat join message in chat cars and helicopter do now work but you cannot be seen driving on the network i uploaded it on Mega DOWNLOAD GAME(Windows only): https://mega.co.nz/#!2M43SRYa!TLbMb0Ha8bLXebEjMUcdjBzGD7BMWn10iZWGYmzKCGE DOWNLOAD SOURCE: https://mega.co.nz/#!2EQjhKDY!PBDpj0fd7PsuZuarxC4lnBphfZYt3_LwVy7DdO_vn6A WEBPLAYER DEMO: -uploading- extra controlls: G - Spawns a Zombie H - Spawns a Beast J - Spawns a Giant Beast V - Removes all enemys spawned and death how to edit the player? the player is in the root of the project as a prefab. insert it into the scene. edit it and press in the root of the player on apply in the inspector. if youre finished, remove the player from the scene. You need Unity 4 to edit the project. If you make the game public, you have to credit me(pokeyoshi3) or pixel studios(my team). old release: Want to support me for free? click here: http://adf.ly/1c4eR (click on skip ad, you will be redirected to my Youtube channel)
  23. 16 points
    Hi guys! I updated the Horror Kit and this is the result: IMPORTANT: - GIVE CREDITS TO MasterDevelopers - I MADE THE PROJECT USING UNITY 4.6.1 PRO VERSION Tell me what do you think
  24. 16 points
    NEW PACKAGE! This one is a bit late but sure was worth the wait I guess. It's a new pair of FPS Arms which you can use without crediting anyone from this site! It was made by me, and can be used ROYALTY FREE! Feel free to use it in whatever project you like! Please read the text file in the package before proceeding after download! Thanks! Download! Image: ___________________________________________________________________________ Original Post here at my website: 7XFGAMES
  25. 16 points
  26. 16 points
    KICKSTARTER IS NOW LIVE! https://www.kickstarter.com/projects/1726296933/downfall-of-the-state-open-world-strategic-shooter I posted my attempt at this game a long while back but I hit a dead end as I didn't want to follow through with yet another zombie survival game. After copious amounts of caffeine I decided to branch out the familiar theme of an FPS/TPS game with elements of strategy, exploration and a huge variety of classes to cater for anybodies play style (RPG, Run and Gun, Tactical etc.). Whilst the following youtube clip doesn't show any elements of the open world dynamic military base capture system I wanted the video to act merely as a teaser. It's primarily an FPS game with a large chunk of strategy involved, the main concept is that the Middle East is about to collapse and forces across the world are attempting to claim land as their own. The player's job is to either liberate regions of the middle east or conversely create an empire of their own ranging from Northern Africa all the way to Siberia. The player starts in the Middle East and can conquest in any direction they wish and as they go along they must loot resources in order to equip their army although the loot can be invested in mercenary disciplines (where the player can play more like a lone wolf) or military disciplines which will aid the army as a whole. Please support my greenlight: http://steamcommunity.com/sharedfiles/filedetails/?id=544095552 (HAS BEEN GREENLIT) LATEST UPDATE [29/03/16] - [YouTube Videos] : [screenshot Showcase] :
  27. 16 points
    This is a very inspector-configurable spawn system, which is executed in waves. Reduces additional programming to minimum if you are happy with features it comes with. Everything is randomly chosen and randomly spawned from current wave settings, so enemy spawning does not feel linear. You can: Set any amount of spawn points, and set/ change delay effect on it Set any amount of enemy types, set preferred spawn points for each of them, spawn ratio (per wave), and should that enemy be spawned from beginning or specific wave call Set specific events for specific waves, for example boss enemy/wave at wave 5 and 10 (in my example) You can set specific spawn points for specific enemies, so you could have specific enemies coming from certain areas (like flying, or wall crawling enemies) Certain spawn point can be locked and unlocked You can easily add any type of enemies via inspector, you could almost achieve same effect as in cod zombies in couple minutes Demo Move using AWSD, enemies are killed when you touch them. Play till level 10, so you would understand how it works. Spawn Manager script As it would be pretty confusing to set up, i am giving the whole project which shown in demo above. Download: Spawning.rar
  28. 16 points
    This is something like a sample model for the pack im working on right now. If everything is cool it will be on AssetStore soon. I was kinda out from modeling / game developing, but im gonna share you my latest work. The idea was something like a city block where some survivors tryed to make this place safe. Im used seamless textures for better resolution, and also tryed to optimized the mesh. Download Verts: 2710 Faces: 1587 Tris: 3598
  29. 15 points
    FPS Kit v1.4.0a With One Man Army and myself having our own projects to work on and very little time to work on Kit Updates, I've decided to show you the progress on the newest version of the Free Kit and let you test it out with a downloadable player. This way you can test out the features without having multiple browsers open. As you've figured out by now, yes, multiplayer has been added upon several requests for such. Also, a simple weapon selection menu has been added to give you a start for your weapon managing needs. Check below for updated list of bugs. Build x86 DOWNLOAD Build x86_64 DOWNLOAD Project Files DOWNLOAD FPS Kit v1.4.0b Beta version will be released at a later date. The beta version will include fixes from alpha, vehicles and much more. Check back in the future for release dates. FPS Kit v1.4.0 Full version will be released after beta testing. The full version will include all fixes from alpha and beta. Check back in the future for release dates. Current Bugs Dead Replacements show up if exiting and re entering a server (will be fixed in beta version) If a server closes, the scene players are not removed (Easy fix, but will be fixed in beta version) Weapon does not show on other players in your scene (will be fixed in beta version) How To's PLAYER MESH SWAP : https://www.youtube.com/watch?v=XlRaZhjomuI Demo: https://dl.dropboxusercontent.com/u/230875276/Preview/Preview.html
  30. 15 points
    [COOP will be added when uNet is released!] Hello guys and welcome to the showcase of my coop survival FPS game called Cold Bodies. It's currently developed by Mars Industries which consists of 10 team members currently. Updates will be released unregulary, but atleast 1 per 8 weeks. You can follow the Updates by Following the topic (Look at the top right) or subscribing my Channel. Website: http://coldbodies.info/ YouTube: Mars Industries Facebook: ColdBodiesOfficial Indiedb (team): Mars Industries Indiedb (game): Cold Bodies Updates: Sorted: Oldest - Newest ---2014 DEVELOPMENT--- Update #1 Teaser #1 Small Update (HUD) M98B Model Preview Update #2 Update #3 Player Reflections [Akimbo Guns in Testing Project] Devlog #1 (Bombs) Devlog #2 (ArmA style action menu, timed bombs) --From now on only hyperlinks because of some limit-- Info Video (Ryts Holm Airport showcase) Zombie AI Showcase Update #4 Survivor AI #1 Survivor AI #2 Revolver WIP 1 Revolver WIP 2 Revolver WIP 3 + M98B WIP 1 Mark 1 new animations [WIP 1 + 2] OST Track 1 - Exploration 1 M4A1 WIP 1 Update #5 ---2015 DEVELOPMENT--- Destroyable Barrier [Happy new year 2015!] DirectX 11 Features [Tesselletion Displacement] ArmA style ammo system [integrated in inventory] Crafting OST Track 2 - The Laboratories Squad AI first test Screenshots: ---GENERAL STUFF--- Name: Cold Bodies Genre: Singleplayer Survival FPS Time Period: 2014 Price: Not decided yet ---STORY--- Secret, for now I can only say it has something to do with Rabies. ---TEAM--- ---Donations--- Want to donate? Donators: paccione Zhavier mike123
  31. 15 points
    Hey guys, Here's some exciting news for those who want a FPS project for free, besides the nice FPS kit. It could be helpful for those who want this. Here's the link to the asset store: https://www.assetstore.unity3d.com/#/content/2561 This is the creator's message: All I can say for now. Have fun with it! Message from Blockfighter298 P.S. Oh yeah, and if you don't mind. A like/vote-up would be great, thanks.
  32. 14 points
    First of all, Thanx to TheMars2011, its he who instructing me how to add multiplayer, and thanx to pokeyoshi for his multiplayer scripts. --------- Features: -Buttons now auto resizable for any resolution! -New Menu music (created special for mp release) -Multilanguage -Map selecting -Many fun Download: http://deatrocker.ucoz.com/news/multiplayer_mobile_fpskit_by_deatrocker_free_download_unity3d/2013-08-01-151
  33. 14 points
    Hey guys, some of you may know i'm making an ak12. Right now working on the high poly, also practicing my rendering skills in blender. So everything shown here is made in blender and cycles so far. New Renders; Hope you enjoy Sorry for noise ;/ Will be releasing likely on the asset store, for the grand total of 0 dollars. So free... Feedback and a like always appreciated , although serious feedback I would prefer on polycount forums instead of here, shouldn't be too hard to find there in the 3d section. Will be making a post there shortly.
  34. 14 points
    UNITY3D NOOB TO PRO SERIES COLLECTION So I'm starting this new forum "series" to allow the community to answer some of the most frequently asked questions and (some of my own) in the most simple terms; for comprehensiveness sake. SHORTCUTS: What is a Shader? Best Answer What is a Prefab? Best Answer What is RayCast? Best Answer What is a RigidBody? Best Answer What is a GameObject? Best Answer What is an .FBX file & How is it different to other formats? Best Answer What is Lightmapping & How do you apply it? Best Answer What is NavMesh? Best Answer What is Occlusion Culling? Best Answer What is a Light Probe? Best Answer How do you create & implement a script, so that, when you collect a gameobject a message appears? ANSWER NOW! RULES: 1) Please, do NOT use this post for general discussion, provide quick, clear and in-depth answers. 2) Please, do NOT answer by telling us to look at the manual or watch a video. Each thread is supposed to answer their question and fill that gap in their knowledge and not to be insulted by their fellow community. 3) To win; you must provide a fully featured, helpful answer. 4) Good Luck & Have Fun! PRIZE: The winner shall get +1 rep and their answer shall be chosen as best answer. So today's NOOB to PRO question is: Today's question has closed. See who won and come back in a few minutes for the new question! ----- Meanwhile, give our thread a +1 if you enjoy it! -----
  35. 13 points
    Note: this is not MINE, but I've come across it quite a few times, thought I'd share! https://github.com/staffantan/unityglitch
  36. 13 points
    My second release of the day. This one is a keeper. I thought to myself, there are NO simplistic, easy to understand, yet findable ADS scripts for beginners out there. So I thought hell, it's time to contribute a really nice piece to the community. This is a nicely featured ADS script which uses FOV to zoom and the weapon coordinates are retrieved via transform. Now time to explain how to install the ADS script. [instructions to setup] Step 1: Drag the script to your weapon game object. Step 2: Within the 'Main Camera' slot, drag your weapon camera or your main camera there, depending on your FPS setup. Step 3: Set up the FOV variables and smoothing to your liking, and even then integrate to your weapon system if you wish. Step 4: Place the weapon in front of the camera to your liking, then take the weapon's X, Y, and Z and copy them into the default hip position slot in your inspector. Then do the same with the aim position, pretty simple huh? Step 5: Finally, set the smooth aim variable to your liking, and you're all set! Step 6: Enjoy.
  37. 13 points
    Day/Night system with color blend and dynamic fog system.
  38. 13 points
    Another enterable building for AbandonedCity pack. This is a shop but also good for a house. I hope you like it [Door Seperated] License: Commercial Use Donwload: https://mega.co.nz/#!zlIjlKSL!P-l0Nu5Kn6NgvVVAiNuez4CZlLsIUhidQfF1WJ6OfEA
  39. 13 points
    I don't even think I need to go over why I had to do this. But say hello to no more noise shadows! Requires Unity Pro! Just place this file inside a folder named "Resources" and restart Unity. If you want to greatly increase the shadow spread change the spread value indicated within the shader. Its still a WIP! File: https://www.dropbox.com/s/6ojaxym9bvq9e2k/Shadow-ScreenBlurRotated.shader Shader code:
  40. 13 points
    NEW PACKAGE! It is a map props package this time! Working on an FPS? TPS? RPG? And don't have the necessary models to make your map look EXTRAORDINARY? Well this package can help you out! It contains a few but good looking assets that will surely lighten your map up a bit with realism! This package contains 2 kinds of barrels, some crates, a metal door, some rusty railings, and 2 garbage bags WHICH you can duplicate and modify! Download! IMAGE:
  41. 13 points
    I had been creating a Unity FPS game for a while and I thinks it is time to share my progress. Version #1: Version #2: Credits: CSS: Map De_Dust2, Weapon Models/TexturesChaos: Animations, Scripts, Graphics
  42. 12 points
    *This kit is no longer supported* Hello ArmedUnity! I’ve made my first FPS Kit for you and me! It helps me to improve my current knowledge, playing around with code, making new systems.. etc. While Im learning I want you guys to use and improve my progress. You are free to make a game with this! But you will need to change every model! This is completely made from scratch! Even the FPS Controller! I hope I will get some feedback for it. Helps me improve this kit and my knowledge! This Kit will get Daily or Weekly updates! Description: FPS Controller Simple { Crouching, Jumping, Sprinting, Walking } Can Crouch detection under Objects Animated Legs PLACEHOLDER Player Simple Weapon Script Weaponswitching Weapon Drop Rigidbody dragging Simple UI Simple Wallrun Simple Ladder Climbing Simple Parkour Middle Level AI AI search for cover when attacking player AI search for cover that AI is safe AI search for nearest cover AI Weapon Script AI Weapon Reload AI Wandering Script AI Text on head (only visible if player looks at AI) and more! Update 2: Added Sprinting animation Added Pickup animation Improved Parkour Improved Ladder Climbing Improved Legs Fixed Bugs Added 3 Demo Scenes Added Main Menu Added Load Level OnTrigger Script Update 3: Added Simple UI Fixed shooting while running Updated Weapon Drag script Added smooth crouching Commented 50% of the code Added tooltips Update 4: Performance Update 1: Fixed Bugs Fixed Some Errors Added PauseMenu Edited MainMenu (Added Control info for now, next will be editable controls) Updated Weapon Script Updated Player Script Updated MainMenu Script Updated Player Canvas Updated Scenes Removed Several Models, Textures Edited Texture Quality and much more... Update 5: Performance Update 2 Fixed Bugs/Glitches Fixed Errros New Parkour Animation New Jump Animation New Middle Level AI New Gun Models New Gun Animations New Sounds New Ambient Sound New Leg Textures Added Animated AI Added Ammo Pickup Added Drag Collision Detection Added Camera Movement Updated FPS Controller Updated MadPlayer to be more effective Updated Demo Scene Removed 2 Scenes Removed Old Weapons Removed Old Sounds and more.. Update 6: Completly New Version Changelog coming soon.. To-Do: Making code cleaner New Weapons (Explosive) Work on wall running and more... Trello: https://trello.com/c/5g4Zzjyl/7-mad-fps-kit Please give me suggestions of what I could add. Unity version: Unity2017.3.1f or higher. File Name: MadFPSKitV0.9.rar File Size: 553.06MB Download Link: http://www.mediafire.com/file/y916as7a3grm9y1/MadFPSKit0.9.rar/file .EXE Demo Version Link: -- Showcase/Update Videos: Tutorial Videos: Happy Developing! MadWolf Games
  43. 12 points
    Hello there! Paxitium is a work-in-progress survival game set in the early 1900s. Facing obstacles ranging from natural needs such as hunger and thirst to dangerous wildlife and unfriendly human NPCs, the player must choose a role and survive in the wilderness. Eventually through venturing multiple neighboring islands, the player is able to discover numerous clues related to the background of the world they are in. Basic gameplay will include construction of structures for protection from enemies, looting items from abandoned towns, and more. Cooperation between players is highly encouraged, and the servers will offer extensive customization to settings such as PvP/PvE, day cycle length, difficulty of AI, and much more, to create a fresh experience for players. Everything that you see within these update videos are highly work-in-progress unless stated otherwise. Constructive criticism will also be highly appreciated. Update #4: Update #3: More info: IndieDB: http://www.indiedb.com/games/paxitium Discord: https://discord.gg/wFRbT4G Facebook: https://www.facebook.com/LutonStudiosDev Twitter: https://www.twitter.com/LutonStudiosDev
  44. 12 points
    As requested, here you go guys. Should also work on mobile devices. I've included some textures but none of these textures are commercial use. You can use the shader for commercial use but you must use your own texture. Screenshot: Download: https://www.dropbox.com/s/tytfan1p84vp3tv/Dirty%20Lens%20Bloom.zip
  45. 12 points
    Hey guys! I know i don't post a lot, but i hope you find this one handy! Note: this is for commercial use and more, but do not repost or sell this as your own script! Someone did that to the last script i posted.... Unity3d Java Script: #pragma strict var username = ""; var password = ""; var repassword = ""; var email = ""; var message = ""; var islogin = true; var isregister = false; var hdskin : GUISkin; var loguser = ""; var logpass = ""; var logmessage = ""; var level2load = ""; var isSuccess = false; var mainDomainName = ""; var generatednumber :int = 0; var numberinput:int = 0; var loginPHPScriptName = "unitylogin.php"; var registerPHPScriptName = "unityregister.php"; var HofBox = 25; function OnGUI(){ GUI.skin = hdskin; if(islogin == false && isregister == true){ GUI.Box(Rect((Screen.width)/2-250,20,500,480),""); GUI.Label(Rect((Screen.width)/2-100,30,200,50),"Please fill out the fields"); GUI.Label(Rect((Screen.width)/2-230, 130,200,50),"Username:"); username = GUI.TextField(Rect((Screen.width)/2-20,130,200,HofBox),username,45); GUI.Label(Rect((Screen.width)/2-230,190,200,50),"Password:"); password = GUI.PasswordField(Rect ((Screen.width)/2-20,190,200,HofBox),password,"*"[0],45); GUI.Label(Rect((Screen.width)/2-230,250,200,50),"Re-Enter pass:"); repassword = GUI.PasswordField(Rect((Screen.width)/2-20,250,200,HofBox),repassword,"*"[0],45); GUI.Label(Rect((Screen.width)/2-230,310,200,50),"Email:"); email = GUI.TextField(Rect ((Screen.width)/2-20,310,200,HofBox),email,45); GUI.Label(Rect((Screen.width)/2-230,360,150,50),"Please verify:"); GUI.Label(Rect((Screen.width)/2-80,360,100,HofBox),generatednumber.ToString()); numberinput = int.Parse(GUI.TextField(Rect((Screen.width)/2+80,360,100,HofBox),numberinput.ToString())); if(GUI.Button(Rect((Screen.width)/2-230,420,200,HofBox),"Register!")){ message = ""; if(username == "" || email == "" || password == "" || numberinput == 0){ message += "Please fill in the empty fields. \n"; }else{ if(password == repassword){ if(numberinput == generatednumber){ doRegister(); }else{ message += "The number you inputed is not the same number."; } }else{ message += "The passwords do not match. \n"; } } } if(GUI.Button(Rect((Screen.width)/2-20,420,200,HofBox),"Return to login")){ islogin = true; isregister = false; username = ""; //cleaning our variables password = ""; repassword = ""; email = ""; numberinput = 0; message = ""; loguser = ""; logpass = ""; logmessage = ""; } if(message != ""){ GUI.Label(Rect((Screen.width)/2-230,460,460,50), message); } }else if(islogin == true && isregister == false){ GUI.Box(Rect((Screen.width)/2-250,20,500,450),""); GUI.Label(Rect((Screen.width)/2-100,30,200,50),"Please login to play"); GUI.Label(Rect((Screen.width)/2-230, 130,200,50),"Username:"); loguser = GUI.TextField(Rect((Screen.width)/2-20,130,200,HofBox),loguser,45); GUI.Label(Rect((Screen.width)/2-230,230,200,50),"Password:"); logpass = GUI.PasswordField(Rect ((Screen.width)/2-20,230,200,HofBox),logpass,"*"[0],45); if(GUI.Button(Rect((Screen.width)/2-230,330,200,HofBox),"Login")){ if(loguser == "" || logpass == ""){ logmessage += "Please enter the necessary data! \n"; } else{ logmessage = ""; doLogin(); } } if(GUI.Button(Rect((Screen.width)/2-20,330,200,HofBox),"Register")){ islogin = false; isregister = true; generatednumber=Random.Range(1000,99999); username = ""; //cleaning our variables password = ""; repassword = ""; email = ""; numberinput = 0; message = ""; loguser = ""; logpass = ""; logmessage = ""; } if(logmessage != ""){ GUI.Label(Rect((Screen.width)/2-230,360,460,50),logmessage); } } } function doRegister(){ var form = new WWWForm(); form.AddField("user" , username); form.AddField("pass" , password); form.AddField("email" , email); var w = new WWW(mainDomainName + "/"+ registerPHPScriptName, form); yield w; if(w.error == null){ message += w.text; }else{ message += "Error : " + w.error + "\n"; } } function doLogin(){ var logform = new WWWForm(); logform.AddField("username" , loguser); logform.AddField("password" , logpass); var logw = new WWW(mainDomainName + "/"+ loginPHPScriptName, logform); yield logw; if(logw.error == null){ logmessage += logw.text; }else{ logmessage +="Error : " + logw.error + "\n"; } if(logmessage == "Login success! Please wait while the game loads..."){ isSuccess = true; } } function Update(){ if(isSuccess == true){ Application.LoadLevel(level2load); } } C# Converted Version, Credits to Connor Gibsoon! using UnityEngine; using System.Collections; public class Account : MonoBehaviour { public string username= ""; public string password= ""; public string repassword= ""; public string email= ""; public string message= ""; public bool islogin= true; public bool isregister= false; GUISkin hdskin; public static string loguser= ""; public string logpass= ""; public string logmessage= ""; public string level2load= ""; public bool isSuccess= false; public string mainDomainName= ""; int generatednumber = 0; int numberinput = 0; public string loginPHPScriptName= "unitylogin.php"; public string registerPHPScriptName= "unityregister.php"; public int HofBox= 25; void OnGUI (){ GUI.skin = hdskin; if(islogin == false && isregister == true){ GUI.Box( new Rect((Screen.width)/2-250,20,500,480),""); GUI.Label( new Rect((Screen.width)/2-100,30,200,50),"Please fill out the fields"); GUI.Label( new Rect((Screen.width)/2-230, 130,200,50),"Username:"); username = GUI.TextField( new Rect((Screen.width)/2-20,130,200,HofBox),username,45); GUI.Label( new Rect((Screen.width)/2-230,190,200,50),"Password:"); password = GUI.PasswordField( new Rect((Screen.width)/2-20,190,200,HofBox),password,"*"[0],45); GUI.Label( new Rect((Screen.width)/2-230,250,200,50),"Re-Enter pass:"); repassword = GUI.PasswordField( new Rect((Screen.width)/2-20,250,200,HofBox),repassword,"*"[0],45); GUI.Label( new Rect((Screen.width)/2-230,310,200,50),"Email:"); email = GUI.TextField( new Rect((Screen.width)/2-20,310,200,HofBox),email,45); GUI.Label( new Rect((Screen.width)/2-230,360,150,50),"Please verify:"); GUI.Label( new Rect((Screen.width)/2-80,360,100,HofBox),generatednumber.ToString()); numberinput = int.Parse(GUI.TextField( new Rect((Screen.width)/2+80,360,100,HofBox),numberinput.ToString())); if(GUI.Button( new Rect((Screen.width)/2-230,420,200,HofBox),"Register!")){ message = ""; if(username == "" || email == "" || password == "" || numberinput == 0){ message += "Please fill in the empty fields. \n"; }else{ if(password == repassword){ if(numberinput == generatednumber){ doRegister(); }else{ message += "The number you inputed is not the same number."; } }else{ message += "The passwords do not match. \n"; } } } if(GUI.Button( new Rect((Screen.width)/2-20,420,200,HofBox),"Return to login")){ islogin = true; isregister = false; username = ""; //cleaning our variables password = ""; repassword = ""; email = ""; numberinput = 0; message = ""; loguser = ""; logpass = ""; logmessage = ""; } if(message != ""){ GUI.Label( new Rect((Screen.width)/2-230,460,460,50), message); } }else if(islogin == true && isregister == false){ GUI.Box( new Rect((Screen.width)/2-250,20,500,450),""); GUI.Label( new Rect((Screen.width)/2-100,30,200,50),"Please login to play"); GUI.Label( new Rect((Screen.width)/2-230, 130,200,50),"Username:"); loguser = GUI.TextField( new Rect((Screen.width)/2-20,130,200,HofBox),loguser,45); GUI.Label( new Rect((Screen.width)/2-230,230,200,50),"Password:"); logpass = GUI.PasswordField( new Rect((Screen.width)/2-20,230,200,HofBox),logpass,"*"[0],45); if(GUI.Button( new Rect((Screen.width)/2-230,330,200,HofBox),"Login")){ if(loguser == "" || logpass == ""){ logmessage += "Please enter the necessary data! \n"; } else{ logmessage = ""; doLogin(); } } if(GUI.Button( new Rect((Screen.width)/2-20,330,200,HofBox),"Register")){ islogin = false; isregister = true; generatednumber=Random.Range(1000,99999); username = ""; //cleaning our variables password = ""; repassword = ""; email = ""; numberinput = 0; message = ""; loguser = ""; logpass = ""; logmessage = ""; } if(logmessage != ""){ GUI.Label( new Rect((Screen.width)/2-230,360,460,50),logmessage); } } } IEnumerator doRegister (){ WWWForm form= new WWWForm(); form.AddField("user" , username); form.AddField("pass" , password); form.AddField("email" , email); WWW w= new WWW(mainDomainName + "/"+ registerPHPScriptName, form); yield return w; if(w.error == null){ message += w.text; }else{ message += "Error : " + w.error + "\n"; } } IEnumerator doLogin (){ WWWForm logform= new WWWForm(); logform.AddField("username" , loguser); logform.AddField("password" , logpass); WWW logw= new WWW(mainDomainName + "/"+ loginPHPScriptName, logform); yield return logw; if(logw.error == null){ logmessage += logw.text; }else{ logmessage +="Error : " + logw.error + "\n"; } if(logmessage == "Login success! Please wait while the game loads..."){ isSuccess = true; } } void Update (){ if(isSuccess == true){ Application.LoadLevel(level2load); } } } Register Script PHP: <?PHP $host = "localhost"; //put your host here $user = "root"; //in general is root $password = ""; //use your password here $dbname = "unitytest"; //your database mysql_connect($host, $user, $password) or die("Cant connect into database");//connects to the mysql database with the credentials listed above. mysql_select_db($dbname)or die("Cant connect into database");//connects to the schema you listed above. $user = mysql_real_escape_string($_POST['user']);//gains the user data inputted. $pass = mysql_real_escape_string($_POST['pass']);//gains the password data inputted. $email = $_POST['email'];//gains the email data inputted. $check = mysql_query("SELECT * FROM accounts WHERE user = '".$user."'"); //checks if there is any username with the same username the player inputted. $usercheck = mysql_num_rows($check);//generates the rows with the same username. if($usercheck == 0){//if there are no rows with the same username, then proceed. $d = 'INSERT INTO accounts (user, pass, email) VALUES ("'.$user.'", "'.$pass.'","'.$email.'" )';//inserts the data you inputted into the mysql table. mysql_query($d) OR die (mysql_error());//executes the query or kills the script if there is an error. if($d)//if it works, then procceed. die("Success! Please login to play!");//kills the script because you are done with the registration. }else{//if there is a username that is the same one that you inputted, then it will spit an error at you. die("User already exists!");//kills the script because you cannot create that account. } ?> Login script PHP: <?PHP $host = "localhost"; //put your host here $user = "root"; //in general is root $password = ""; //use your password here $dbname = "unitytest"; //your database mysql_connect($host, $user, $password) or die("Cant connect into database");//connects to the mysql table with those credentials. mysql_select_db($dbname)or die("Cant connect into database");//and selects the database you wrote $dbname. or kills the php script if it cant connect. $username = mysql_real_escape_string($_POST['username']);//takes the username inputted from the wwwform. $password = mysql_real_escape_string($_POST['password']);//takes the password inputed from the wwwform. $data = mysql_query("SELECT * FROM accounts WHERE user ='".$username."' AND pass = '".$password."'");//selects all the information where the user and pass = the data you inputted. $usercheck = mysql_num_rows($data);//generates a value of rows with the username and password credentials you inputted. if($usercheck == 1){ // if there is 1 row of data, then you are successfully logged in. die("Login success! Please wait while the game loads...");//kills the rest of the script... its practically pointless if you are successful in logging in. }else{//if there is no row with the inputted username or password together, then it will not let you login. die("The username or password is invalid.");//kills the script because you inputted the wrong user/password. } ?> Mysql script: DROP TABLE IF EXISTS `accounts`; CREATE TABLE `accounts` ( `Id` int(10) unsigned NOT NULL AUTO_INCREMENT, `user` varchar(45) NOT NULL, `pass` varchar(45) NOT NULL, `email` varchar(45) NOT NULL DEFAULT 'none', `emailhash` varchar(45) NOT NULL, `emailconfirm` varchar(45) NOT NULL, PRIMARY KEY (`Id`) ) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=latin1; Instructions: First off, I would like to say thank you for buying this asset. Feed back is always welcome. This entitles you to use this for commercial and non-commercial use. [sTEPS TO USE THIS!] 1. Download or use a webserver / webhost. I use Wampserver, it can be downloaded 100% free. Website: 'http://www.wampserver.com/en/#download-wrapper' 2. Start wampserver. 3. On the little tray at the bottom of your computer, you should see a "[W]" in red. Click on it and press 'Start all services.' Note: If you have skype running, close it before running the services. 4. Download Mysql Query Browser and install it. Website: 'http://www.brothersoft.com/mysql-query-browser-for-windows-download-71868.html' 5. PORTFORWARD UDP AND TCP THE FOLLOWING PORTS: 3306 , 80 (This is because its php and mysql. so anyone anywhere can access) 6. Click on the Wampserver icon and place the 2 php scripts, "unityregister.php" and "unitylogin.php" into the 'www' directory. 7. Go to your unity3d game and add the 'mainlogin-register.js' to any gameobject that is active. 8. Go and create a new Schema in mysql and go to 'file' -> 'open new script' -> open the drop down menu 'Files of Type: ' and find "Any file ANSI assumed (*)" then find "login-register.txt" and execute it. 9. Navigate to 'unityregister.php' and edit : '$host , $user , $password , $dbname' so that it corrisponds with mysql. 10. Do the same thing except for do it for 'unitylogin.php' 11. Go to 'Whatsmyip.org' and remember that external IP of yours. 12. Edit ""Main Domain Name"" in your 'Mainlogin-register.js' so that it is your ip. EX: "MainDomainName: 127.0.0.1" 13. Edit ""Level2Load"" in your 'Mainlogin-register.js' to the level you want to load after the user successfully logs in. 14. Edit ""Login PHPScript Name"" in your 'Mainlogin-register.js' to the name and extension of your 'unitylogin.php' script. 15. Edit ""Register PHPScript Name"" in your 'Mainlogin-register.js' to the name and extension of your 'unityregister.php' script. 16. Edit ""HDskin"" to whatever GUISkin you want.... 17. Edit ""HofBox (Height of Box) to whatever. 25 is the amount of height pixels. 18. You should be completely finished! I hope you enjoy the script! WEBPLAYER DEMO: http://eyeofnerorpg.dx.am/Login-Register.html
  46. 12 points
  47. 12 points
    Might make a backdrop scene just for a proper render of this. LaFerrari 2014. Pre-render. Net time: 9 hours. Rendered In - Blender Internal. Render Time - 1.5 Hours. I so wish I could use my GTX 760 to render this. T_T Blender Internal won't let me.
  48. 12 points
    Your fans? I think, because of you i must add also hater list
  49. 12 points
    After this thread www.armedunity.com/topic/6720-simple-coin-collection-system-c-js/#entry57703 i understand'ed why pretty much i have not seen any project here with large item data structures. Mostly couple pickable objects which are found using tag or name. Before writing an actual code, i would like talk about couple things, like what is overall basic idea from game creation perspective itself. Map designers, quest creators and many others, these people mostly never code when creating maps, quests, place npc etc. They have ready custom built tools for doing that, all what they do is move sliders, search through lists and place/write (not code). So, before actually creating the game experience itself, we need to make sure that we the right tools for doing that process, it will be taking a long time to create the map, so each helpful thing for the map designers can save tens of hours. One way would be storing ready prefabs in one folder, but imagine if prefab amount is around 4 thousand, considering all little props, items, mobs etc. Artist will drive nuts working like that. So, custom editors is the only option, you could sort specific item lists under different categories, also show how they look or will look. That would be much more easier to work with and focus on map building than trying to find specific item for 10 minutes. It means, each item, Quest, NPC, monster, gun, attachment, etc should be somehow recognizable (specific number or something), but how? If in simple case all what it has is a tag ? Creating a structured list for each type of item would be best logic, for example one list for pistols, one for magazines etc. When the list is created you can easily access it from any point in your game And custom editors. Which means if you update you food list, your custom editor will automatically will be updated. So basically when having these lists, you can spawn anything and anywhere And track things via Log. So first, we create the list (array) which will hold information about the items. This script should be on player itself. public class Items : MonoBehaviour{ //We create a Node, possible information each this current item will hold [System.Serializable] //Without this next class "Item" wouldn't not show in inspector public class Item{ public string name; // its name public int weight; //just showing the idea } public Item[] allItems; //This is just for showing how it might work public InfoAboutItem(int index){ //This will be called from player Debug.Log("You picked up " + allItems[index].name + " and it weights " + allItems[index].weight); } } After attaching script you basically now can create item list in any size you want, and each can contain lots of information. Now we need a script which will be located on item itself, so we would know what item is that. public class ThisItem : MonoBehaviour{ public int itemIndex; // remember that first element is 0 not 1 } Yes, that's it . Now the script which will find the item. Also on player. public class Player : MonoBehaviour { void OnTriggerEnter ( Collider col ){ if (col.tag == "Item") { //All previous items in game can be under one tag "Item" GetComponent<Items>().InfoAboutItem( col.GetComponent<ThisItem>().itemIndex ); Destroy(col.gameObject); } } } Set the list in size of 1 (in inspector), in first element fields, enter its name and weight. Place ThisItem script on the pickable item, set index to 0, tag should be "Item" After triggering the item the text will appear and it will be destroyed. This is the basic idea how you can create very advanced item in game structures. Sorry if i didn't notice grammar errors, and i didn't test the code, as i am writing this from phone. If you have any problems or questions, ask.
  50. 12 points
    I'm kind of irritated seeing common grammar errors from the same people over and over again. So let me aid those people with the following knowledge! Let's begin... Whenever you use the word 'there', please note there are different contractions for the word. The correct area to use the word 'there' in a sentence, is when you're referring to a location or area of some sort. Example: Hey Steve, look at that red ball over there! When you're using the word 'their', you're referring to someones or somethings belongings. Example: Their children are very antsy. When you use the contraction 'they're' of the word they, you're pretty much saying 'they are' for short. The " 're " is there for a reason. Example: They're too good to be called programmers. When you use a contraction of the word 'you', specifically, 'your', please note that this contraction refers to a belonging. Example: Isn't that your ball over there? When you use the contraction 'you're' of the word you, you're pretty much saying 'you are' for short. Example: You're such a grammar Nazi, Danny. Also, when words start with one of the letters: a, e, i, o, u, you don't just say a in front of that word. You must say 'an'. Example: An object in Unity is awesome. This rule doesn't apply when you say something like this: Example: Objects in Unity are awesome. Other than that, follow proper grammar usage! Have a good one. Congratulations, you are now slightly more educated on grammar usage. You should be proud of yourself!
×
×
  • Create New...