So I have a player and his more or less a square so I attached a 2D Box Collider to it.
But for some reasons he sometimes gets stuck into the map which contains a lot of block and each one has a box collider. I know I could just add like 10-20 block and use one collider but the problem with that is that it makes it a lot harder for me to finish the map.
I googled the error and there are a lot of people who are having this problem but I couldn't find a fix for it so does anyone know what I could do to fix it?
Testing big attacks on places. Also combatting FPS drops and clipping planes JOY.
[video=youtube;oRIwsgHqOFQ]http://www.youtube.com/watch?v=oRIwsgHqOFQ&list=UUlSdAOcN_dStix9yQkKXmsQ[/video]
There are times when I loathe open environments because of the effort it takes to keep > 50 fps.
So in Bolt the server doesn't have a BoltConnection? Doesn't that make it difficult to treat a server as another functional player if the server can't access a user token for itself?
You mean like a listen server? Start a client on the server that connects to itself and do it that way?
I haven't tried this, but I assume it would work fine.
[t]http://i.imgur.com/ra2WU7q.jpg[/t][t]http://i.imgur.com/rzgCIOZ.jpg[/t]
I just started to create a bad copy of ice climbers with world generation :v
For some reason, the sprites looks darker :(
If I have 3 or 4 layers of nested coroutines (using yield return StartCoroutine( [I]SomeCoroutine()[/I] ) ), can I be certain that they will execute in order, waiting for inner coroutines to finish, etc? I'm getting some strange behaviour when loading a new level and I'm not sure if it's because of shitty code or if nested coroutines don't guarantee order.
[QUOTE=Pelf;45846938]If I have 3 or 4 layers of nested coroutines (using yield return StartCoroutine( [I]SomeCoroutine()[/I] ) ), can I be certain that they will execute in order, waiting for inner coroutines to finish, etc? I'm getting some strange behaviour when loading a new level and I'm not sure if it's because of shitty code or if nested coroutines don't guarantee order.[/QUOTE]
Yielding them can be safe if you return them correctly, otherwise order isn't guaranteed, here's a good explanation
[url]http://answers.unity3d.com/questions/515056/is-nested-coroutines-safe.html[/url]
I've used unity before but never really took it in or made anything with it. Had this game idea swirling around in my head for the last year though and I'm kinda sick of it being there so I'm making a swing at it. I guess if it doesn't work out for me I can use it to maybe get a team interested and not be deemed as an idea guy. I'm not going to spoil what I'm trying to do just yet though.
Anyway, this is what I have so far:
[img]http://puu.sh/beSKH/4483ad3f21.gif[/img]
I feel kind of dirty using other peoples work (the pathfinding) but I guess that's what makes Unity great, and I guess I've had to modify it for my needs in a couple of ways?
Don't feel bad for using premade assets, who cares? It's the smart way of doing things.
I love the new GUI, so much better than DF was.
I expected that I would have to relearn it, but it was so intuitive that I got this working in a couple minutes.
[img]http://puu.sh/bfnl7/a05ca2909c.png[/img]
Hello! i am building a game similar to this one
[url]https://www.youtube.com/watch?v=Y3-2p8j-hyo[/url]
notice how at different point of the game move with the character but not all the time. i was wondering if someone could tell me how to change the camera height at different times for different values without it being all the time pls?
thanks
p.s using unity 2D but couldnt find the thread
[QUOTE=ShadowParadox;45853380]Hello! i am building a game similar to this one
[URL]https://www.youtube.com/watch?v=Y3-2p8j-hyo[/URL]
notice how at different point of the game move with the character but not all the time. i was wondering if someone could tell me how to change the camera height at different times for different values without it being all the time pls?
thanks
p.s using unity 2D but couldnt find the thread[/QUOTE]
This thread is for both Unity 3D and 2D
You could probably do it by checking the vertical position of the character and if it goes over a certain threshold you increase the height of the camera.
[QUOTE=layla;45846176]So in Bolt the server doesn't have a BoltConnection? Doesn't that make it difficult to treat a server as another functional player if the server can't access a user token for itself?[/QUOTE]
I ended up making a seperate Player BoltEntity which is used as a token instead of a BoltConnection, and can also be passed in events. Has the added bonus of being able to handle reconnecting players better. After the server is started and handles creating a player object for itself, all the code is the same.
Currently working on a FPS.
You can experience the rocket jumping [URL="http://overdrive.netne.net/Unity/Webplaya.html"]here![/URL]
The web player seems to screw some of my scripts up for some reason.
ESC brings down the GFX menu and Q swaps your weapon.
Is it possible to step through code line by line in Monodevelop or something? My level loading function seems to be destroying objects after they get instantiated which shouldn't be happening.
[editline]31st August 2014[/editline]
Wow, I really should invest in version control. I broke shit so bad and I don't even know what I did.
[editline]31st August 2014[/editline]
So what would be the proper way to delete all gameobjects in a scene that don't belong to a particular layer? This is my code right now:
[code] public void ClearLevel()
{
GameObject[] objectsInScene = GameObject.FindObjectsOfType<GameObject>();
for ( int i = 0; i < objectsInScene.Length; i++ )
{
if ( objectsInScene[i].layer != LayerMask.NameToLayer( "Persistent" ) )
Destroy( objectsInScene[i] );
}
}[/code]
If I skip calling that method then it works fine (except for having two players and directional lights in the scene) but if I do call it then some of the objects I spawn a frame or two later get deleted. This is so frustrating
I started to work on the level generation, at the moment i think that's going good
Level generation:
[vid]https://dl.dropboxusercontent.com/u/251205348/ShareX/2014-09/2014-09-01_00-21-52.webm[/vid]
Gameplay 2 players (I'm alone, i don't have nobody to test it :( )
[vid]https://dl.dropboxusercontent.com/u/251205348/ShareX/2014-09/2014-09-01_00-23-11.webm[/vid]
Beginning the workings of an FPS of my own... being a one man art team with Blender isn't easy, moreover when you're new at both.
I found a tutorial online that someone had about making a character controller, but I wasn't too terribly happy with some of what he was doing and so I worked off of what it had and reworked it. Some of the tutorials out there on Youtube are cool, but seem like they target a crowd of people who aren't aiming at doing to much after watching the video.
Luckily having spent my time when I was younger learning C# from my father has given me a slightly higher advantage. Now if only there was a way the same could have happened with Blender.
Give me a programming challenge and it will be accomplished in due time... give me Blender and a modeling task and watch as I run for the hills.
The outcome of my tweaked FPS learning project is located [URL="https://www.dropbox.com/s/84t4x3q3tv4sq6h/fps_basics.zip?dl=0"]here[/URL]. It is in no way an intended outcome of what I'm planning.
Seems you made a bouncy ball simulator.
I actually just spent 10 minutes firing spheres into the walls at different angles.
[QUOTE=Pelf;45853463]This thread is for both Unity 3D and 2D
You could probably do it by checking the vertical position of the character and if it goes over a certain threshold you increase the height of the camera.[/QUOTE]
how would i do that pls? sorry im new to this
[QUOTE=ShadowParadox;45861192]how would i do that pls? sorry im new to this[/QUOTE]
You could also try setting the position of the camera to be the position of the player on the horizontal axis, and set the camera's vertical position to be the vertical position of the player rounded to the nearest 1 or 2 units or whatever plays well. And you could do that every Update()
this [URL="https://c09a59c6bc9a440aa6a5b9b4ebc7d05a65e265d9.googledrive.com/host/0B6XaaXqQIluZTzA4b1NEakkyOU0/Builds.html"]thing[/URL] that I made works so very nearly the way I want it to, but not quite. use q e a d to move the active cube, and press g to start a wave that propagates in one quadrant through each cube's nearest neighbour.
all I'm trying to do now is get a full circular wave to work properly, but for some reason just enabling the other two nearest neighbours makes them set off the entire opposite quadrant immediately instead of one cube at a time, and I can't figure out why for the life of me. I also really wish I'd known about coroutines when I started this
for reference, [url=https://2a86d7fde3862f39e8744d037c17a6c44cd21601.googledrive.com/host/0B6XaaXqQIluZSVhiYkpxTUhWcGs/BrokenWaves.html]this[/url] is what happens when I make each cube activate all four cubes instead of just two
Fucking Unity sometimes, I swear to god.
I've encountered a strange issue with Unity and Bolt. When running in DX11 mode and vsync enabled, I get "spurts" of vsync'd frames (15ms or so) in between stretches of 0ms frames. On the vsync'd frames, I see a WaitForPresent call as I might expect, but on the 0ms frames there is no such call in the profiler. It's like DX11's vsync is utterly broken.
This in turn causes movement in Bolt to be chunky and spazztic as the wildly varying timestep (0ms on some frames, 15ms on others) seems to completely mess up FixedUpdate.
DX9 doesn't seem to suffer this issue (vsync appears to be perfectly stable and FixedUpdate movement is butter smooth).
Gah! Going to see if I can come up with a repro case to submit to Unity.
[I]EDIT:[/I]
Aaah, now I'm getting somewhere. It appears to be a combination of DX11, debug player, and autoconnect profiler enabled. Could be that the profiler is messing with Unity's timestep. I'm going to submit a repro anyway as I would expect the profiler to work the same between DX9 and DX11, but at least I know what to change in Bolt to work around the issue (change it to disable development build/ autoconnect profiler).
Does anyone know how I can sync a sound in Bolt?
Trying to get player sounds, such as walking/jumping/and misc other sounds, to play for others in the area.
I'm guessing I'd use an event, but if someone who has done this before could shed some light, that'd be great.
Usually you don't synchronize those things directly. All sfx, vfx, animations etc are usually handled completely client-side.
When your client detectes that a nearby player is shooting a weapon it should play the sound. No networking for that at all.
You would just send a message like "player x just shoot his weapon" or "player x just moved".
Same thing for animations. You only synchronize them in [B]very [/B]rare scenarios (think of emotes in world of warcraft /hug /love /point ...).
In all other scenarios the animation that should be played is inferred from the action the player did.
edit: for your example you'd send a message "player x moved to position y" to each client and then each client knows what sound to play for this event, like footsteps or whatever.
Just send what action a player does, do not send messages about the consequences of those actions!
Sorry, I should have rephrased what I meant. I don't mean to SYNC the sounds, just simply play them when an event is received on other clients.
I'm just not sure how to send a sound through a Bolt event.
[QUOTE=sarge997;45865462]Sorry, I should have rephrased what I meant. I don't mean to SYNC the sounds, just simply play them when an event is received on other clients.
[B]I'm just not sure how to send a sound through a Bolt event.[/B][/QUOTE]
You can't send [I]a sound[/I] per se, but you can send a string representing sound name (to be passed to Resources.Load?) or perhaps more efficiently an integer representing sound to play (could be an enum which your code uses to figure out which clip to play)
I'm trying to use "Resources.Load" for audio clips, but I'm still a bit confused as to how to send them in an Event.
I'd love to know how I could do it with enum's as well, as I'd prefer to use prefabs, instead of Resources.
I'm not sure why you would ever need to have the network know about a specific sound, I mean the client should know what to play when responding to a certain event?
[B]Oh my god, I'm so stupid... You're completely right layla.[/B]
But I do have one more question.
I'm trying to play random sounds, such as footsteps *But in my case, pig oinks* how can I atleast play the same sound for everyone? Right now I'm using Random.range, but obviously since it's running a different version for each client, it plays different sounds.
Here's my code.
[code]using UnityEngine;
using System.Collections;
public class Snorting : MonoBehaviour
{
public AudioClip[] sounds;
void Start ()
{
float oinkTime = Random.Range (3, 20);
InvokeRepeating("Snort", 0, oinkTime);
}
void Snort ()
{
audio.pitch = Random.Range (0.85f, 1.08f);
audio.clip = sounds [Random.Range (0, sounds.Length)];
audio.Play();
}
}
[/code]
I think in my own game there are only ever two situations in which I need to send an event [I]just[/I] for playing a sound, and that's:
A.) When a character speaks
B.) In-game announcer
Because both cases are controlled by the server, and for most of them the client doesn't have enough information to play the sounds based on other events.
For both of them, I use an enum which the receiving end (the client) actually does a ToString on and uses as a key into my custom audio system (I guess the closest equivalent would be Resources.Load?). So basically each enum entry is sound name. Maybe not the totally correct way to do things, but it was super easy and I was being kinda lazy.
[editline]1st September 2014[/editline]
[QUOTE=sarge997;45866673]
I'm trying to play random sounds, such as footsteps *But in my case, pig oinks* how can I atleast play the same sound for everyone? Right now I'm using Random.range, but obviously since it's running a different version for each client, it plays different sounds.[/QUOTE]
Yeah, so? Is there anything wrong with that? Other than the fact that each player hears a slightly different oink variation?
Sorry, you need to Log In to post a reply to this thread.