Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Third person shooter - Learning project

Discussion in 'Made With Unity' started by TwiiK, Mar 29, 2009.

  1. TwiiK

    TwiiK

    Joined:
    Oct 23, 2007
    Posts:
    1,729
    Total is the total number for that wave. Active is the number of active units of that type at any given time. So if you have 5 total and 2 active when you kill 1 another will spawn, if you kill 2 more, 2 more will spawn, but when you kill the last 2 (totaling 5) the next wave will begin.

    I haven't really tested those 3 scripts by themselves. I will do that and if there's actually more to be done to make them work I'll see if I can upload a unity package for you.

    Edit: I just remembered that those 3 scripts won't work by themselves because the units you spawn has to tell the spawner that they have died so it can properly reduce it's counter for that type of unity for that wave.

    Here's the gist of my EnemyHit code. As you can see it gets a reference from the spawner when it is spawned so it can tell the spawner when it dies.
    Code (csharp):
    1. using UnityEngine;
    2. using System.Collections;
    3. using System.Collections.Generic;
    4.  
    5. public class EnemyHit : MonoBehaviour {
    6.  
    7.     public float hitPoints = 10;
    8.  
    9.     private bool dead = false;
    10.     private SpawnControl.Wave.MobSpawner spawner;
    11.     private float currentHitPoints;
    12.  
    13.     void Start() {
    14.         currentHitPoints = hitPoints;
    15.     }
    16.  
    17.     void OnSpawn (SpawnControl.Wave.MobSpawner spawner){
    18.         this.spawner = spawner;
    19.     }
    20.  
    21.     void ApplyDamage (float damage) {
    22.  
    23.         if (currentHitPoints <= 0)
    24.             return;
    25.  
    26.         currentHitPoints -= damage;
    27.  
    28.         if (!dead  currentHitPoints <= 0) {
    29.             dead = true;
    30.             Die();
    31.         }
    32.     }
    33.  
    34.     void Die () {
    35.         Destroy(gameObject);
    36.         spawner.NotifyDeath();
    37.     }
    38. }
    39.  
     
  2. NoMaD

    NoMaD

    Joined:
    Feb 1, 2010
    Posts:
    41
    @TwiiK

    oh thanks, i get it now :oops:


    edit: hmmm I just tried with different numbers and once you kill all "Active" enemies new ones don't spawn. Also I get "SendMessage OnSpawn has no receiver"


    edit2 : i knew something was missing :eek: .

    hmmm. SpawnControl.Wave.MobSpawner is like a custom type, right? It only works with C#. Im gonna have to convert my character damage script to C# :?
     
  3. TwiiK

    TwiiK

    Joined:
    Oct 23, 2007
    Posts:
    1,729
    @artimese:
    I'm sorry, but the machine gun sound is actually the Galil from Counter-Strike Source. Unless I want to get in trouble I shouldn't really be giving it away. It's really just a placeholder sound as I'm scouring the interweb for properly licensed sounds as well as recording my own sounds from various sources.

    If you really want it you could just rip it from the CSS game files yourself. They open with any unzip app afaik. I used 7-zip. My idea is that as long as it's used for a personal, non-profit project it's ok. It's probably not, but whatever. I will remove whatever asset people ask me to. :)
     
  4. TwiiK

    TwiiK

    Joined:
    Oct 23, 2007
    Posts:
    1,729
    @NoMad
    Yes, it's from the SpawnControl.cs scritp. I don't really know how cross language scripting works or if it works at all because I convert all scripts I find to C# now. So you may have to convert your script for it to work.

    I'll see if I can upload a unitypackage with everything set up so you know it can work. :)
     
  5. NoMaD

    NoMaD

    Joined:
    Feb 1, 2010
    Posts:
    41
    @TwiiK

    That'd be great because I just tried converting and failed :eek:
     
  6. TwiiK

    TwiiK

    Joined:
    Oct 23, 2007
    Posts:
    1,729
    Here.

    I would convert it to JS if I was able to, but I still don't understand the wave system entirely. :)
     

    Attached Files:

  7. Artimese

    Artimese

    Joined:
    Nov 22, 2009
    Posts:
    794
    Okay, sure no problem twiik, ill just look around the web to find some sounds as well. :p
     
  8. NoMaD

    NoMaD

    Joined:
    Feb 1, 2010
    Posts:
    41
    yay it works now :D @TwiiK thanks for help
     
  9. Disati

    Disati

    Joined:
    Oct 5, 2009
    Posts:
    111
    Great prototype.

    Would be awesome if you'd make some small tutorials for beginners.
     
  10. Disati

    Disati

    Joined:
    Oct 5, 2009
    Posts:
    111
    Also, by posting which packages etc. you've used you would help us allot also.

    Did you use these Decals?
     
  11. TwiiK

    TwiiK

    Joined:
    Oct 23, 2007
    Posts:
    1,729
    No I haven't used those decals, yet. In their current form they are very limited compared to what I've made myself, but TommyBear has promised a lot of great features in the future so we'll see.

    Actually I don't think I've used a single package. The only thing I use which you could call a package is Spk's wave system which I've posted my version of a few posts back. I don't fully understand it yet so I had to rewrite a bunch of it and probably remove some features to make it work for me. So if you can understand his original scripts (posted in his paintrain thread) then they are surely better.

    Also my bullet handling code is based on the bullet code Spk also posted in his Paintrain thread.

    The rest of my code is either written from scratch or based on things I've found in the various tutorials on this site and what I've found in the scripts wiki. Also, as a lot of game concepts are not tied to any scripting language or engine I use google a lot to search for solutions to my problems. http://www.gamedev.net/ and http://www.gamasutra.com/ are exceptional resources as well.

    That would be awesome, but tutorials take a lot of time to make and I haven't got that much time to spare at the moment. I'm very busy at work and I prioritize most other things before Unity so I'm lucky if I have a couple of hours every week and I would rather spend them improving my game than making tutorials, sorry.

    I'll continue helping in any way I can, but you won't see any tutorials from me any time soon.
     
  12. TwiiK

    TwiiK

    Joined:
    Oct 23, 2007
    Posts:
    1,729
    Update time

    Changes:
    - Added some cool stuff and polish to a lot of things thanks to pixelplacement1's iTween framework. Instead of just dissapearing most objects now fade out or "dissolve". And blood splatter will darken over time which is very cool. :)
    - Changed my standard FPSWalker script with Eric Haines' FPSWalkerEnhanced which offers air control, normalized movement, anti bunny hop and a whole lot more. I also uploaded my C# converted version of the script to the wiki for those who want it.
    - Tweaked the volume of quite a few sounds, specifically the impact sounds to make shooting things more fun.
    - Changed a few sounds as well as added a few sounds
    - GORE! ...toggleable in the menu. I deactivated it by default mostly because it introduces quite a few extra draw calls, but also because some people may prefer it without. :) Not sure myself whether or not it fits in there.
    - Zombie mode, well sort of. By accident I realized that the enemies behave quite amusingly if I turned off "freeze rotation" for their rigidbodies so I introduced it as a powerup. I didn't have time making any custom code for the enemies dropping the powerup so I just hid a few around the map. They are fun. :) The shooter enemies seem to bug out a bit though.
    - New shader for the pickups which makes them glow nicer and shine in a cool way.
    - Infinte lives. Dying no longer ends the game, you respawn, but with your score reduced by 10%. So you can die as much as you like, but the only way to get the highest possible score is to not die.
    - 3 new, harder?, waves after the 500 enemies wave. I noticed someone had already achieved the max possible score so I just threw in some extra waves for those people who get that far. No idea how those waves play because I haven't got that far.

    Zombies and gore: :D


    And, Blacklight28, I have actually encountered the 3fps problem a few times when testing, but not sure what's causing it.

    Cheers.
     
  13. Blacklight

    Blacklight

    Joined:
    Dec 6, 2009
    Posts:
    1,241
    Like it so far, but the character seems a little slower than before. Maybe it's just me.

    Glitch time:
    Wave 4, big guy doesn't rotate. Still standing after firing over 40 howitzer rounds into it. Got zombie powerup before facing it, but it wore off before confrontation.

    I feel like I'm being annoying reporting all of these.
     
  14. TwiiK

    TwiiK

    Joined:
    Oct 23, 2007
    Posts:
    1,729
    It is slower than before because you most likely ran diagonally most of the time before and that would make you run a lot faster than in a single direction.

    I will probably add a run modifier or tweak the movement speed because I thought it was a tad slow myself now.

    I'm just glad someone has the time to test it and report back to me. :)

    I know the shooter enemies has a lot of problems and I will look into that. May upgrade the whole "AI" because it is pretty crap. :p
     
  15. TwiiK

    TwiiK

    Joined:
    Oct 23, 2007
    Posts:
    1,729
    Hotfix

    Changes:
    - Fixed a game breaking bug which caused the big guys to be invincible. Thanks to Blacklight28 for reporting this one.
    - Added a run button "left shift". Hold this to move slightly faster
    - Fixed a bug which caused the enemy attack sound to be played when they spawned and increased the rolloff factor of the sound so it isn't as loud all the time.
     
  16. ClayManZ

    ClayManZ

    Joined:
    Apr 30, 2009
    Posts:
    26
    Very funny, :eek:

    but i couldn't find a way to get to the second Wave.
    After killing all incoming cubes I searched the whole level for stuck cubes - without result.

    My Specs:
    - Windows Vista
    - Firefox 3.5.9
    - latest Unity Plugin


    Greetings
     
  17. TwiiK

    TwiiK

    Joined:
    Oct 23, 2007
    Posts:
    1,729
    You should have 9000 points after the first wave (90 enemies @ 100 points each). For some reason one or more enemies may not appear during certain playthroughs. Or he may just fall through the level or something, but in that case he should be killed.

    It's on my todo list. :)

    Also on my todo list is to show the total number of waves, the number of enemies left to kill for that wave. And maybe a button to proceed to the next wave if this bug keeps appearing.

    I just playtested the game all the way through the last wave and 170000 points is the maximum possible at the moment.

    Also, the bug Blacklight28 has mentioned a few times about suddenly getting 3fps happens 100% of the time if you set the timescale at 0.0 and then bring up the menu and resume the game.

    So until I fix it make sure you never bring up the menu with the timescale at 0.0. 0.1 or higher seems to work fine. :)

    Another thing is that the game still uses about 100mb more ram after I've played through all the waves than when I start it. I don't like this at all. Something in Unity is not clearing the memory as it should. I've made sure not a single object is left behind. There's no difference between the end of wave 10 compared to the start of wave 1 except the players score and ammo count. Everything else is destroyed or cleared so I don't get why the memory usage increases.
     
  18. JiffOrange

    JiffOrange

    Joined:
    Mar 26, 2010
    Posts:
    22
    Hi again TwiiK,

    Just wanted to say thanks for the spawning code (had the same problem as some other with additional waves spawning but sorted now ....You were well ahead their :D ). Spawning works perfectly now, very nice.

    Just wanted to tell you I showed your game to a few 'serious' gamer friends of mine (non-game creators) and they were brimming with praise for your game. Most didn't even know it was possible to play 3D at a respectable level in a browser. Suffice to say they were very impressed and thought it was great fun, one made reference to the arcade mode in Timesplitters 2 :).

    Thanks again mate for the help.

    Cheers,

    Jiff.
     
  19. Blacklight

    Blacklight

    Joined:
    Dec 6, 2009
    Posts:
    1,241
    I find that whenever you die and respawn, you can't proceed through to the next wave. This happened to my friend aswell.

    Might as well have just left it as before :(
     
  20. pixelplacement1

    pixelplacement1

    Joined:
    Aug 19, 2009
    Posts:
    674
    This was one of the first competent projects I found when I was learning Unity and I'm honored to have iTween in there helping it out!

    Awesome work!
     
  21. TwiiK

    TwiiK

    Joined:
    Oct 23, 2007
    Posts:
    1,729
    Thanks for the kind words.

    iTween is just amazingly useful, that's all. :)

    I wish it was as user friendly in C# as in Javascript though. I had to user colorTo with affectChildren set to false and had to specify like 50 parameters which is awkward for someone who's used to PHP at work. :)

    @Blacklight28, if you don't die it's just the same as before. :) I tried it myself and it seems you're right. I will have to prioritize that for the next update.
     
  22. Mattew_XL

    Mattew_XL

    Joined:
    Sep 2, 2009
    Posts:
    12
    :D :D :D Genial!!!!
     
  23. PatBGames

    PatBGames

    Joined:
    Mar 28, 2009
    Posts:
    120
    Good work with this project TwiiK, it is really fun and well done.

    One remark about controls: the right mouse button is currently unused, could it be binded to the "jump" action?
    For people like me who don't use QWERTY keyboard, the actual controls are not very friendly. And for a casual game, "arrow keys + mouse only" is a big plus (middle button to cycle through weapons ?).

    PS: I talk about alternate keys, not removing the actuals.
     
  24. Blacklight

    Blacklight

    Joined:
    Dec 6, 2009
    Posts:
    1,241
    About the sprint function, if one wants to change the timescale when sprinting/running/moving faster than usual, the SHIFT + MOUSEWHEEL is a hotkey in IE and Firefox to move back through pages (Just like spamming the Back button).
     
  25. TwiiK

    TwiiK

    Joined:
    Oct 23, 2007
    Posts:
    1,729
    I noticed that as well. :)
     
  26. Artimese

    Artimese

    Joined:
    Nov 22, 2009
    Posts:
    794
    You think you could share your weapon swapping script? Theres a bug in the one with the fps tutorial and i cant seem to fix it :?

    Thanks.
     
  27. Cygnus1337

    Cygnus1337

    Joined:
    May 19, 2010
    Posts:
    5
    Hahaha, I think is great game, I am making one similar and have not gotten very far, I am having trouble with my gun, maybe you can upload you're machine gun asset so I can use?
     
  28. TwiiK

    TwiiK

    Joined:
    Oct 23, 2007
    Posts:
    1,729
    Currently I have no assets for any of the weapons. Unless you're talking about the actual prefab. :)

    In that case the machine gun I'm using in my project is more or less identical to the one in the FPS tutorial.

    What bug? I'm at work now so I can't paste my script, but I'm using the weapon swapping script from the FPS tutorial. The only change I've made is that I removed the fire code from the weaponswitch script and added it to each of my weapons instead so I can have different methods of firing for each weapon.
     
  29. Artimese

    Artimese

    Joined:
    Nov 22, 2009
    Posts:
    794
    Well its a bug partaining to the weapon swapping, if i finish my ammo with for example the machine gun, then switch to the rocket launcher, then back to the machine gun, and i pickup more clips for the gun, it doesnt reload, im not sure what the problem is but i have a thread on it,(http://forum.unity3d.com/viewtopic.php?t=52504 ) but no solution yet.

    Thats why im asking to see how your script looks like so i can see if you have that problem solved, it seems like you have.

    I was actually told that the weapon swapping script looked okay, and had no problem, it may just be my machine gun script, but no word on it yet.
     
  30. TwiiK

    TwiiK

    Joined:
    Oct 23, 2007
    Posts:
    1,729
    That bug is in my game as well, on the pistol as it is the only weapon with reload functionality. :)

    I'm pretty sure my pistol code is pretty much directly based on the machinegun code in the FPS tutorial so the problem is probably there somewhere.
     
  31. Artimese

    Artimese

    Joined:
    Nov 22, 2009
    Posts:
    794
    Yeah im suspecting the reload function, but it looks perfectly fine, cant put my finger on it :S
     
  32. Theformand

    Theformand

    Joined:
    Jan 2, 2010
    Posts:
    271
    Hey Twiik, can you layout the basic pathfinding of your enemies? I know this is an odd request, but we're on a college deadline, and we are really really pressed for time. I just need a behaviour somewhat like your bots find their way towards the player. If only on a conceptual level? :)
     
  33. pixelplacement1

    pixelplacement1

    Joined:
    Aug 19, 2009
    Posts:
    674
    I would love to get some perspective on that as well!
     
  34. TwiiK

    TwiiK

    Joined:
    Oct 23, 2007
    Posts:
    1,729
    Define what you mean by pathfinding. :)

    Adding pathfinding to my enemies, at least for some of the enemy types is actually on my todo list. What I have currently is just them always going towards the player no matter what's between them and the player. If they hit an obstacle (detected by a short raycast from the face area) a small force is applied in the upwards direction to lift them over it.

    It's pretty heavily based on the cop robot code from the third person platformer tutorial project.

    I was going to create an example, but I remembered that I posted the entire thing with my wave example unity package a few posts back. :)

    Here it is: http://forum.unity3d.com/download.php?id=12982

    Here's the code for those who don't need the entire unity package (probably will need to remove some lines to make it work by itself as some of the non-movement related code depends on what's in the above package):
    Code (csharp):
    1. using UnityEngine;
    2. using System.Collections;
    3. using System.Collections.Generic;
    4.  
    5. public class Enemy : MonoBehaviour {
    6.  
    7.     public Transform target;
    8.     public float rotateSpeed = 2f;
    9.     public float moveSpeed = 5f;
    10.     public float hitPoints = 10f;
    11.  
    12.     private bool dead = false;
    13.     private SpawnControl.Wave.MobSpawner spawner;
    14.     private float currentHitPoints;
    15.  
    16.     void Start () {
    17.         if (target == null  GameObject.FindWithTag("Player"))
    18.             target = GameObject.FindWithTag("Player").transform;
    19.  
    20.         currentHitPoints = hitPoints;
    21.     }
    22.  
    23.     void OnSpawn(SpawnControl.Wave.MobSpawner spawner){
    24.         this.spawner = spawner;
    25.     }
    26.  
    27.     void ApplyDamage (float damage) {
    28.         if (currentHitPoints <= 0)
    29.             return;
    30.  
    31.         currentHitPoints -= damage;
    32.  
    33.         if (!dead  currentHitPoints <= 0) {
    34.             dead = true;
    35.             Die();
    36.         }
    37.     }
    38.  
    39.     void Die () {
    40.         Destroy(gameObject);
    41.         spawner.NotifyDeath();
    42.     }
    43.  
    44.     void FixedUpdate () {
    45.         if (target == null)
    46.             return;
    47.        
    48.         /*
    49.          * Uncomment this to add the jump over walls functionality
    50.          * Currently requires the geometry to be tagged with "Geometry"
    51.          *
    52.         Vector3 direction = transform.TransformDirection(Vector3.forward);
    53.         RaycastHit hit;
    54.  
    55.         if (Physics.Raycast(transform.position, direction, out hit, 2)) {
    56.             if (hit.transform.tag == "Geometry"  !dead) {
    57.                 transform.rigidbody.AddForce(Vector3.up * 50);
    58.             }
    59.         }
    60.         */
    61.  
    62.         if (target  !dead) {
    63.             Quaternion rot = Quaternion.LookRotation(target.position - transform.position);
    64.             float rotationX = rot.eulerAngles.y;
    65.             Quaternion xQuaternion = Quaternion.AngleAxis(rotationX, Vector3.up);
    66.             transform.localRotation = Quaternion.Slerp(transform.localRotation, xQuaternion, Time.deltaTime * rotateSpeed);
    67.             Move();
    68.         }
    69.     }
    70.  
    71.     void Move() {
    72.         transform.rigidbody.MovePosition(transform.rigidbody.position + transform.TransformDirection(0, 0, moveSpeed) * Time.deltaTime);
    73.     }
    74. }
    Hope it clears things up. :)

    I haven't been able to work on my project for a while, but when I do I will dive into some 3ds max to create some graphics I think.

    I know exactly how I want my game to look and it will be fun to see if it actually ends up looking good in the end.
     
  35. Theformand

    Theformand

    Joined:
    Jan 2, 2010
    Posts:
    271
    Ahh thanks a bunch. I scripted some behaviour like yours last night, but couldnt figure out how to lock rotation to the y-axis etc. I did it slightly different, but this approach should be easier to just implement. Sorry to "steal" your stuff here, but like I mentioned deadlines and stuff.

    I actually love the way your game looks now, oddly enough, but I can see why you would want to polish it up a bit in a modeller package :) Good luck with your game, im excited to see what comes of it.
     
  36. Blacklight

    Blacklight

    Joined:
    Dec 6, 2009
    Posts:
    1,241
    Are you going to post an update anytime soon?
     
  37. TwiiK

    TwiiK

    Joined:
    Oct 23, 2007
    Posts:
    1,729
    We'll see how it all turns out. :) At first I'm not going for big changes, I just have a general style I'd like to test out as well as create a proper lightmapped level for the game.

    Maybe this weekend if I have some time to spare. :)
     
  38. viral-vector

    viral-vector

    Joined:
    Apr 12, 2010
    Posts:
    248
    Love the game, been following it since i stated using unity 6 weeks ego. I am a noob, and working on my first 3d game ever. I am learning script as well as modling. Anyway am working on an fps. in showcase titles FPX(fps) learning project 2010.

    1. I was wandering how did you mange spawning casings try my game and see why i need help lol.

    2. any i dead how i would do weapon sway, and recoil?

    3. my weapon swapping try holding two buttons at the same time, any help fixing two weapons being active at the same time.?

    the build i have up there is only a week old, but i have not done much due to my problems. http://forum.unity3d.com/viewtopic.php?p=322525


    ps. i think i had a high score but did not log in lol
     
  39. TwiiK

    TwiiK

    Joined:
    Oct 23, 2007
    Posts:
    1,729
    1. I'm pretty sure I posted a unity package of a functional gun with bullet casings a few pages back.

    2. Weapon sway and recoil can be done with physics, animation or just moving the gun with scripting.

    3. Not sure what you're asking, sorry.
     
  40. TwiiK

    TwiiK

    Joined:
    Oct 23, 2007
    Posts:
    1,729
    I'm currently messing about in 3ds max trying to get some interesting lighting going. Basically when I played Mirror's Edge a long time ago I knew right there that that was the look I wanted. (See here for an example: http://www.ps3attitude.com/wp-content/gallery/mirrors-edge-dlc/miredmultscrnwwrazzmatazz.jpg)

    My only problem is that I'm having a hard time recreating the look. :)

    It looks spectacular in 3ds max and when viewed from far away in Unity as you see here:



    But from the players perspective in game it looks like S***:


    More S***:


    This was with a 2k map.

    I know Mirror's Edge uses Beast and if I just wait for Unity 3 I can probably use Beast myself for this very thing and save myself a bit of trouble, but I want to understand the basics of it before that time. And Beast is probably pro only anyway. :)

    One huge problem with this is that my entire map is one object and if I move anything I have to do it in 3ds max and rebake the entire map. I guess this is unavoidable as I want the bounced light from different surfaces to affect eachother.

    Another problem is that it looks like crap. What I'll try next is splitting the map up into many smaller textures, but I'm not sure how to achieve that without it become a massive amount of work.

    I know from my experience with 3ds max that it's easy to hide rough global illumination with textures and I know that's something they've done in the singleplayer of Mirror's Edge, but in the Time Trials levels (the one I posted a screenshot from further up) they only have solid colors and normal maps and the GI still look pretty sharp. Mine is all blotchy in Unity even though it's razor sharp in 3ds max.

    Here's an excerp from a pdf detailing the lighting in Mirror's Edge:
    The Shard is the final level in the game. I'm not sure why they've written 200x3 lightmaps, but I'm interpreting it as 600 lightmaps. The level is not huge by any means so if they had 600 1k lightmaps for one level then I would expect a level of my size to have at least 20. Would that be total overkill? That's 5 times the texture size I have now.

    Anyone have any tips or pointers for approching this. It's greatly appreaciated. :)

    Edit:

    Another thing I've been wondering about is how do you cast baked shadows on dynamic objects? In my game now if you walk into the shadow the character is still lit. How do I fake the effect of the character standing in shadow? Most games do this afaik, but I'm not sure how. :)

    I googled it just now and stumbled across this: http://blog.wolfire.com/2010/04/Catching-baked-shadows. Is this a common way to do this?
     
  41. viral-vector

    viral-vector

    Joined:
    Apr 12, 2010
    Posts:
    248
    Awesome work. Am not skilled like that yet. I have only model a house and few things. But i have this gravity gun i made for my game, just dont kno how to texture,(uv or bodypaint)design. Anyway thanks for the input.

    1. Yes i saw the pistol package i just could not ge it open i unzipped and tried opening the folders in unity, but did not recognize them as project folders (am using pc).

    2. lol i know can use those forms of animation, i wanted to know which will be easiest for a beginner, while giving good results. and where can i begin to learn. not asking for much ust a point in the right direction.

    3. baiscally i mean if you press one and two at the same tme in my game both guns will be active. how do i get the engine to ignore a second button press.try my game and see what i mena very annoying, i see u dont have the same problem in ur game...maybe i can post my scripts for you to look at.
     
  42. viral-vector

    viral-vector

    Joined:
    Apr 12, 2010
    Posts:
    248
    Sorry for clogging. but i would like to point, most models i view on c4d, and designs i made myself. Always look crisp, clear and vibrant in C4d, then once into unity some of the deatil, and sharpness is lost. Maybe that is the reason your map is having visual issues ( unity current renderer, maybe u do have to wait for U3 lol)
     
  43. TwiiK

    TwiiK

    Joined:
    Oct 23, 2007
    Posts:
    1,729
    First of all, thanks for the kind words. As for your questions I think they are a bit broad, but I'll do my best to point you in the right direction. :)

    A unity package has to be imported into an already existing project as far as I know.

    So if you create an empty project and click "Assets" -> "Import Package" and select my pistol package (http://forum.unity3d.com/download.php?id=12751) you can import it directly into your project.

    There's no need to unzip or do anything else to an Unity package. Just download and import.

    Well, if you're adept at animating then doing it with animations is probably easiest, but it sounds like you aren't so I would try doing it with some simple scripting. You could probably get some physics weapon sway and recoil going, but I think it will be very unpredictable.

    Here's two scripts that simulate animations with scripting:
    http://www.unifycommunity.com/wiki/index.php?title=AimDownSights
    http://www.unifycommunity.com/wiki/index.php?title=Headbobber

    The first one creates a rough animation of your gun being brough up to your eyes and the second, even though it's called Headbobber, can be used to sway the weapon up and down as you move. By looking at these scripts it shouldn't be too hard to create some decent looking weapon sway and recoil for your weapons.

    This doesn't happen in my game and my weapon switching code is taken directly from the FPS tutorial. Why don't you use the code from there and get rid of this problem all together?

    I haven't got any textures yet except for the lightmap and when viewing that in 3ds max I have infinte detail because of the raytraced shadows. In Unity that has to be baked into a finite texture size. That is why it looks bad.

    My problem is that I have no clue much texture size is normal to use for such a project or if there are some smart ways of achieving what I want. :)

    I also notice the colors are a bit less vibrant in Unity, but I'm sure that can be fixed with some fiddling around.
     
  44. viral-vector

    viral-vector

    Joined:
    Apr 12, 2010
    Posts:
    248
    keep up the good work. Thank you i was able to see the pistol package. Only thing different was the fact that you spawned your casing from a casing spawn point. while i was trying to spawn it off from the gun object.

    I will keep a good eye on your game it has given me a lot of help. Please check out my game and see what you think. I have just finished writing my Gen in and Out of vehicles code. and will most likely post a build tonight. (http://forum.unity3d.com/viewtopic.php?p=322525)

    AnyWay looking to see if you were able to solve your problem, will drop a line if i find something out.
     
  45. satrio

    satrio

    Joined:
    Mar 6, 2010
    Posts:
    101
    Wow, this game is fun!
    Is there a limit to the enemies or do I have to register to play on. After wave 3 all is empty..

    /s
     
  46. TwiiK

    TwiiK

    Joined:
    Oct 23, 2007
    Posts:
    1,729
    Probably a bug. :)

    I think there's 10 waves in total in the current release.

    But there's a bug which seems to happen fairly often in which you can't continue to the next wave. Either enemies don't spawn or they fall / get pushed out of the world.

    I'll find it and fix it in the next release, but I'm kind of swamped at work right now.

    There's no differences in the game itself for a guest and a logged in user.
     
  47. MojoTunc

    MojoTunc

    Joined:
    May 6, 2009
    Posts:
    7
    Hi TwiiK,

    great game, just wanted to thank you, I was looking for a way to make sharks chase after a player in my project without using a character controller, your Agent script worked perfectly for me, Thanks and 324 Kudos!
     
  48. Jason_DB

    Jason_DB

    Joined:
    Nov 30, 2008
    Posts:
    495
    Keep u the great work! Even a year after you first posted it it's still fun to play!
     
  49. MojoTunc

    MojoTunc

    Joined:
    May 6, 2009
    Posts:
    7
    Hi TwiiK, heres a link to my project, the player has to go through all ring and end up in his spaceship, this is one level under construction of a game for kids. I will look into modifying your script so a 3D swarming effect is achieved, Thanks again.

    http://www.olcer.nl/suw.html
     
  50. viral-vector

    viral-vector

    Joined:
    Apr 12, 2010
    Posts:
    248
    Hey I ran into a major problem with my game. The standalone builds are having problems not experienced in UNITY itself, and web-Player builds. Basically my kickback in the standalone had lost power, does not kick as far as i have set it in UNity. also my get in and out of car script. only works on and off in the stand alone, while in unity and web player every key press is registered. please see my blog.
    If anyone has an idea please comment.