• Unity3D - Discussion
    5,004 replies, posted
[QUOTE=BackwardSpy;47151609]Would it be at all possible to use the existing particle system and LineRenderer/something else to make trails that act more like particles? I know you can get direct access to the particles currently alive in a particle system, perhaps could you make them invisible and draw trail-like lines between them or something? I haven't actually tried this yet, and I can foresee a whole bunch of problems with it (not least of which is LineRenderer not being all that great.) Just thought I'd throw the idea out there.[/QUOTE] That's what my particle system would do. Particles act as points, and it draws a trail between them. In my experience, this creates a [I]much[/I] better trail effect. Thanks for the input guys and gals!
So I've seen somewhere in this thread a game that looked something like this, I mean the type of game. Top Down Perspective or whatever. Anyone remembers this? If yes can you link me to it? [img]http://screenshots.en.sftcdn.net/ven/1000/1880/portal-games-09092011-en_img350.jpg[/img]
[QUOTE=BoowmanTech;47153045]So I've seen somewhere in this thread a game that looked something like this, I mean the type of game. Top Down Perspective or whatever. Anyone remembers this? If yes can you link me to it? [img]http://screenshots.en.sftcdn.net/ven/1000/1880/portal-games-09092011-en_img350.jpg[/img][/QUOTE] It's called Isometric
[QUOTE=Dromlexer;47151812]I've built the seed system to be an array of integers which, when together, they make up a long string of numbers where parameters (created by UnityEngine.Random) are stored as numbers and are separated with a semi-colon. All of them always start with the their ID. Example of the structure I'm using for the StellarObjects. id:name:type:distance:angle:tilt:time:mass:moonid which when saved would be 231:2,1,0:0:45112:180:21:45:872000:671 A planet with the ID 231 and a name created by putting the 3-vector in 3 Dictionaries. The type is 0, a planet. The distance from their sun is 45112 thousand kilometers... and so on. Where the 671 is the id of one it's moons. If it's more than one moon. They will be separated by comma (,). Using this code to extract the seed. Located in the class where StellarObject inherits from. [code] protected virtual int[] ReadSeed(string seed) { string[] tmptokens = seed.Split(':'); int[] tokens = Array.ConvertAll<string, int>(tmptokens, int.Parse); return tokens; } [/code] But my next question is, as I'm not very well experienced with game-design grade programming. I think the most efficient way to assign the Tokens is through a foreach loop. But all of the parameters are separated datatypes. I've tried putting them in an object[] without success.[/QUOTE] Instead of reading the token into an array, you could read it directly into a class or struct with all the extracted values properly organized. It seems the process of parsing the token into the int array is an unnecessary intermediate process. Correct me if I'm wrong; this is an assumption based off what little I know of your project.
[QUOTE=KillaMaaki;47153318]It's called Isometric[/QUOTE] Unity's editor does even have an scene/preview view for it.
I'm looking to migrate my current project to unity to accelerate development, how would you guys recommend to get started with unity in general? Just following the basic tutorials, or are there better resources available?
[QUOTE=ZenX2;47153676]I'm looking to migrate my current project to unity to accelerate development, how would you guys recommend to get started with unity in general? Just following the basic tutorials, or are there better resources available?[/QUOTE] I followed the tutorials at Lynda.com, they were pretty good. You can get a free membership for 10 days, and a weekend is more than enough to get through those tutorials. They give a pretty good insight on how to make a basic 2D platformer and cover the essentials like what scenes are, sprites, sounds and ofcourse scripts. I can definitely recommend that, but if you want, you can find tutorials on youtube too. I just personally couldn't find any good tutorials that weren't made by some greasy 11-year-old who wasn't very sure of what he was trying to show, y'know.
[QUOTE=KillaMaaki;47153318]It's called Isometric[/QUOTE] Oh no, I mean someone was working on a game with this style and I can't find his game. I know I saw it in this thread but I am not sure.
[QUOTE=BoowmanTech;47153839]Oh no, I mean someone was working on a game with this style and I can't find his game. I know I saw it in this thread but I am not sure.[/QUOTE] this? [url]http://facepunch.com/showthread.php?t=1260922&p=45849913&viewfull=1#post45849913[/url]
[QUOTE=Pelf;47154220]this? [url]http://facepunch.com/showthread.php?t=1260922&p=45849913&viewfull=1#post45849913[/url][/QUOTE] Yeap, I think this is one of his last updates he posted. -> [url]http://facepunch.com/showthread.php?t=1260922&p=46339756&viewfull=1#post46339756[/url]
Feels nice to have made something that has stuck in someones head for more than 30 seconds after reading the post :v: Good that it has been dug up, I was going to have to dig it up myself at some point to throw in my portfolio.
[QUOTE=BackwardSpy;47151609]Would it be at all possible to use the existing particle system and LineRenderer/something else to make trails that act more like particles? I know you can get direct access to the particles currently alive in a particle system, perhaps could you make them invisible and draw trail-like lines between them or something? I haven't actually tried this yet, and I can foresee a whole bunch of problems with it (not least of which is LineRenderer not being all that great.) Just thought I'd throw the idea out there.[/QUOTE] I tried exactly what you're saying a few days ago. I used LineRenderer and moved points around to get the effect I was looking for. It mostly worked, but there was one very big limitation: all points will have a continuous line drawn between them. The functionality to create discontinuous lines is simply not there. That's a dealbreaker in itself, but LineRenderer also has next to no access to how it renders lines so you can't do cool things dynamically change the width or color at any arbitrary point in the line. [vid]http://a.pomf.se/poaxep.webm[/vid] Here's the two posts on the subject from earlier: [url]http://facepunch.com/showthread.php?t=1260922&p=47110490&viewfull=1#post47110490[/url] [url]http://facepunch.com/showthread.php?t=1260922&p=47112816&viewfull=1#post47112816[/url]
[QUOTE=Why485;47154453]I tried exactly what you're saying a few days ago. I used LineRenderer and moved points around to get the effect I was looking for. It mostly worked, but there was one very big limitation: all points will have a continuous line drawn between them. The functionality to create discontinuous lines is simply not there. That's a dealbreaker in itself, but LineRenderer also has next to no access to how it renders lines so you can't do cool things dynamically change the width or color at any arbitrary point in the line. [vid]http://a.pomf.se/poaxep.webm[/vid] Here's the two posts on the subject from earlier: [url]http://facepunch.com/showthread.php?t=1260922&p=47110490&viewfull=1#post47110490[/url] [url]http://facepunch.com/showthread.php?t=1260922&p=47112816&viewfull=1#post47112816[/url][/QUOTE] ... I somehow totally forgot you did that using a LineRenderer. Now I feel like an idiot! [editline]16th February 2015[/editline] It's a shame about the continuity requirement; it looks damn good other than that.
I'm making a trigger script and I want to be able to specify which layers can collide with the trigger and trigger it. I have a [I]public LayerMask objectFilter;[/I] but how do I check if the collider that collides with the trigger is one of the layers that's checked in the inspector?
[QUOTE=Pelf;47155397]I'm making a trigger script and I want to be able to specify which layers can collide with the trigger and trigger it. I have a [I]public LayerMask objectFilter;[/I] but how do I check if the collider that collides with the trigger is one of the layers that's checked in the inspector?[/QUOTE] [url]http://docs.unity3d.com/Manual/class-PhysicsManager.html[/url]
After [url=http://i.imgur.com/heLYP76.png]several[/url] [url=http://i.imgur.com/D2YPsKl.png]failed[/url] [url=http://i.imgur.com/OxXVGeS.png]attempts[/url], I got target picking working. I can now pick targets along any given vector, the default (and by far the most useful) being the player ship's forward vector. [t]http://i.imgur.com/1YODpF9.png[/t] [vid]https://a.pomf.se/ykwrxk.webm[/vid]
I was just looking at some tutorials on 2D Game - Shooting and since I have problems when I shoot a bullet and it hits the player. Basically right now when a bullet hits the player it pushes him back a bit and if I hit him very low at his feet it might change his y movement and he would start moving upwards. So I was thinking what is the best way of handling something like this? Should I use OnTrigger or add a ray cast on the bullet and when it hits an enemy take damage off him. Which one is better? Right now I am using OnCollision.
[QUOTE=BoowmanTech;47157962]I was just looking at some tutorials on 2D Game - Shooting and since I have problems when I shoot a bullet and it hits the player. Basically right now when a bullet hits the player it pushes him back a bit and if I hit him very low at his feet it might change his y movement and he would start moving upwards. So I was thinking what is the best way of handling something like this? Should I use OnTrigger or add a ray cast on the bullet and when it hits an enemy take damage off him. Which one is better? Right now I am using OnCollision.[/QUOTE] When you use OnCollisionEnter, it still solves the collision causing that odd behavior. If you don't want to do this you could use the triggers instead, but that might get weird with how bullets are then triggers rather than physical objects. If you want fast bullets, raycasts are the way to go, fast bullets physically simulated will just skip through geometry if the timestep is too low.
[QUOTE=FalconKrunch;47159827]When you use OnCollisionEnter, it still solves the collision causing that odd behavior. If you don't want to do this you could use the triggers instead, but that might get weird with how bullets are then triggers rather than physical objects. If you want fast bullets, raycasts are the way to go, fast bullets physically simulated will just skip through geometry if the timestep is too low.[/QUOTE] Oh ok, thanks for the explanation on each side. Well I guess I will be going with ray-casting since I have a rifle and I need fast bullets. [editline]17th February 2015[/editline] Also does anyone know where I could take a look at a tutorial on how to make a grenade or grenade launcher in 2D Platformer? Basically what I need is to know how to affect more enemies at the same time, and also the idea behind it.
[QUOTE=BackwardSpy;47157011]After [url=http://i.imgur.com/heLYP76.png]several[/url] [url=http://i.imgur.com/D2YPsKl.png]failed[/url] [url=http://i.imgur.com/OxXVGeS.png]attempts[/url], I got target picking working. I can now pick targets along any given vector, the default (and by far the most useful) being the player ship's forward vector. [t]http://i.imgur.com/1YODpF9.png[/t][/QUOTE] What does the yellow line mean? Are you selecting a target by target closest to the selection ray or those things in a list somewhere? I'm curious because I've had to do the same thing (target under the crosshair) but I took a totally different approach. I just got the angle off the nose of every valid target and then just targeted whatever had the smallest angle. [editline]17th February 2015[/editline] [QUOTE=BoowmanTech;47160016]Also does anyone know where I could take a look at a tutorial on how to make a grenade or grenade launcher in 2D Platformer? Basically what I need is to know how to affect more enemies at the same time, and also the idea behind it.[/QUOTE] Look up how to do event systems and delegates. In my previous project, Every ship had an explosion event listener and whenever a missile caused an explosion event, the ships with listeners on them would just check how far away they were and apply damage accordingly.
[QUOTE=BoowmanTech;47160016]Oh ok, thanks for the explanation on each side. Well I guess I will be going with ray-casting since I have a rifle and I need fast bullets. [editline]17th February 2015[/editline] Also does anyone know where I could take a look at a tutorial on how to make a grenade or grenade launcher in 2D Platformer? Basically what I need is to know how to affect more enemies at the same time, and also the idea behind it.[/QUOTE] Assuming your grenade already has a solid collider (so it can bounce and interact with the world) you could create a child object on the grenade with a circle collider. Flag it as a trigger, set the radius to the explosion size and use the colliding objects to do damage. You could add a damage falloff based on the distance from the center of the grenade. This is probably the simpler solution over using an OverlapsArea or any raycasting.
[QUOTE=foszor;47160218]Assuming your grenade already has a solid collider (so it can bounce and interact with the world) you could create a child object on the grenade with a circle collider. Flag it as a trigger, set the radius to the explosion size and use the colliding objects to do damage. You could add a damage falloff based on the distance from the center of the grenade. This is probably the simpler solution over using an OverlapsArea or any raycasting.[/QUOTE] Actually, yeah. This is a more straightforward way of doing it. When I did my area explosions I used events because different objects each needed to interpret the explosion in different ways to apply damage. Basically, I needed the damage calculation to be done by the object itself, not with the explosion.
[QUOTE=Why485;47160160]e What does the yellow line mean? Are you selecting a target by target closest to the selection ray or those things in a list somewhere? I'm curious because I've had to do the same thing (target under the crosshair) but I took a totally different approach. I just got the angle off the nose of every valid target and then just targeted whatever had the smallest angle.[/QUOTE] Yeah, I'm basically just measuring each potential target's distance from the selection ray and targeting the closest one. Theoretically it should have the exact same behaviour as your technique, despite the difference in calculation method.
Ok, thank you for the ideas. I will probably either end up trying both or get the one that is more suitable for my game.
[QUOTE=foszor;47160218]Assuming your grenade already has a solid collider (so it can bounce and interact with the world) you could create a child object on the grenade with a circle collider. Flag it as a trigger, set the radius to the explosion size and use the colliding objects to do damage. You could add a damage falloff based on the distance from the center of the grenade. This is probably the simpler solution over using an OverlapsArea [B]or any raycasting.[/B][/QUOTE] But wouldn't you need to do a raycast from the origin of the explosion to the affected objects in the collider to make sure stuff isn't blowing up behind solid walls?
If someone would spare a minute to go through this video and help me out, I would be incredibly grateful. I've been trying to figure out what's causing this to no avail for a few days, which is incredibly frustrating since it's halting my development completely [video]www.youtube.com/watch?v=hQmkooCZfAY[/video]
[QUOTE=PieClock;47160568]But wouldn't you need to do a raycast from the origin of the explosion to the affected objects in the collider to make sure stuff isn't blowing up behind solid walls?[/QUOTE] This is correct; I was generalizing the concept, but I agree it could have been better worded as 'minimizing raycasts'. The idea was to avoid using some sort of loop on each GameObject or raycasting all around the grenade to find all the possible victims.
So now I have a basic targeting system, the missiles I implemented last week can actually do something! I also had a go at creating an explosion effect with no prior knowledge of how best to do it. I think it looks alright for a first attempt, definitely dated though. I'll have to look into sprucing it up a bit. [vid]https://a.pomf.se/dfznss.webm[/vid]
[QUOTE=Pelf;47155397]I'm making a trigger script and I want to be able to specify which layers can collide with the trigger and trigger it. I have a [I]public LayerMask objectFilter;[/I] but how do I check if the collider that collides with the trigger is one of the layers that's checked in the inspector?[/QUOTE] Found a solution here if anyone else has similar issues: [url]http://answers.unity3d.com/questions/454494/how-do-i-use-layermask-to-check-collision.html[/url]
Hey guys, since my question is about Unity, I thought this would be the right place to ask (Quoted to take up less space). [quote][b][u]Long Version[/u][/b] I've been trying to extract files from Unity games for quite a while; the good news is that I my attempts at doing so are mostly successful, as I've been able to extract/unpack Unity bundle files, then extract/unpack meshes, textures, and sounds from the .assets files. This is where my problems begin; I can't seem to find a way to extract animation data. Trying to get the animations from the early-access game Interstellar Marines, I was able to get the data of all the files written into txt files, which includes the animations. However, I have no conceivable way of using this data; it's written in a format that I have no idea of, and each animation text file is extremely long. I also can't import any of these animation data files into unity itself. My next attempt was using a tool called "Unity Asset Editor", which let's me get all the same dat I could before, except now I'm able to extract the animation files into .data files referred to as "Unity Asset Raw Data" files by the tool. This also doesn't provide me with any new information, and I can't import this into Unity either. [b][u]TL;DR Version[/u][/b] I'm trying to unpack Unity's animation files from the .assets files, but can't seem to do so.[/quote] So I was wondering, does anyone have any ideas as to how to do this? It'd be greatly, incredibly appreciated.
Sorry, you need to Log In to post a reply to this thread.