• Unity3D - Discussion
    5,004 replies, posted
[QUOTE=Pelf;45160949]Looks really cool. You should try baking some AO into those models too. Goes from this: [IMG]https://dl.dropboxusercontent.com/u/13781308/ShareX/2014-06/2014-06-19_19-46-58.jpg[/IMG] [IMG]https://dl.dropboxusercontent.com/u/13781308/ShareX/2014-06/2014-06-19_19-47-13.jpg[/IMG] to this [IMG]https://dl.dropboxusercontent.com/u/13781308/ShareX/2014-06/2014-06-19_19-47-02.jpg[/IMG] [IMG]https://dl.dropboxusercontent.com/u/13781308/ShareX/2014-06/2014-06-19_19-47-16.jpg[/IMG] You could probably just do that with Unity lightmapping if the objects are static. If they're not you can bake an AO map with blender.[/QUOTE] Oh sweet, thanks for that. I'll see what I can do, considering I know nothing about art and modelling and am basically making this up as I go along :v: I'm glad at least someone likes it - I've been doing this in between jobs so I'm slightly iffy about how it all looks. I guess that's what happens when you've been working on something for a while. [QUOTE=MilkBiscuit;45160867]You move WAYYYY too slow.[/QUOTE] Alas this is something I'll need to balance along the way. Part of the whole thing is walking around re-activating and powering up facilities (while building defences) before the bad dudes come. This means that I need to balance how long it takes someone to walk from one end of the map to the other so they don't activate everything in like 10 minutes and ruin everything. Thus I imagine a change to the walk speed will happen at some point.
Anyone know why I'm getting these black lines on my models? [IMG]https://dl.dropboxusercontent.com/u/13781308/ShareX/2014-06/2014-06-19_21-57-59.jpg[/IMG] The lines are along UV splits and they only show up farther away. They become less pronounced the closer I am to the model.
I'm really not an expert with this, but could it be mipmaps?
[QUOTE=redx475;45162069]I'm really not an expert with this, but could it be mipmaps?[/QUOTE] Yep, someone here suggested mipmaps too: [url]http://answers.unity3d.com/questions/25953/weird-line-in-my-grass-textures.html[/url] (second answer) So I made the black space between my UVs pink and then, instead of black lines, I had pink lines. Thanks
[QUOTE=Pelf;45162140]Yep, someone here suggested mipmaps too: [url]http://answers.unity3d.com/questions/25953/weird-line-in-my-grass-textures.html[/url] (second answer) So I made the black space between my UVs pink and then, instead of black lines, I had pink lines. Thanks[/QUOTE] Yeah, all you have to do is open the texture and pad around the edges of your model's UV islands. Used to have this problem all the time when making tf2 stuff.
[img]http://puu.sh/9CaHD/21c823f56c.png[/img] Just starting out in Unity, so I'm working on a basic procedural landscape generator. I've got basic island structure and mountain generation, using the GPU to simulate erosion.
[QUOTE=Jcorp;45160219]Does this count as an update? I think this counts as an update. You can now interact with the environment and repair things. Also worked on a barebones building you can enter and a hugeass bio-dome surrounding the map. [video=youtube_share;01NWeXEOvOY]http://www.youtube.com/watch?v=01NWeXEOvOY[/video][/QUOTE] Demotivatingly slow fixing tool!
Has anyone managed to get Awesomium working in Unity, if so how ? I'm having problems making it work, it just stays at the normal logo placeholder.
Is there anywhere I can get source code for an fps unity game? I'm not good enough with programming to know how to go about coding all the systems for my one game (weapon system, inventory, rpg stuff, ai, etc) and I want to learn how before I start so I don't have to redo it all later. Or if there's a good text tutorial, that would be good too.
[QUOTE=Pelf;45178454]Is there anywhere I can get source code for an fps unity game?[/QUOTE] Probably. [QUOTE=Pelf;45178454]I want to learn how before I start[/QUOTE] That's a great attitude, go forth and learn. You don't need someone's code to do that (and I'd doubt how much it will help anyway, unless you just copy it, in which case you aren't learning anyway). You've already successfully broken the game down into some different core systems - Google them. Seriously, the Unity community is ridiculously huge, other people have discussed heaps of different ways to implement common stuff like this. If you have a solid game design (i.e. have one, have one that's stable) you shouldn't ever need to "redo it all" - unless you severely misinterpret the design. Besides, component systems exist to lessen the impact of design changes and be more flexible generally. How could some other (entire) code-base fit your game design anyway? tl;dr Components are your friend. Google is your friend. Ask specific questions.
Thanks. I guess I'm just not sure how to break it down. I never took programming classes or anything so I don't really know any theory stuff behind it (OOP, component-based, whatever else) so yeah, I'm not sure how to break it down. Looking at other people's code would let me see how they broke it down. I tried to google some of it but I was getting a lot of really basic stuff that didnt really work they way I wanted. I'll do some more digging [editline]e[/editline] I should probably learn inheritance and how it is/should be used [editline]e[/editline] and interfaces too i guess
So me and my friend are going to work on a 2d unity game for the summer, since he is one hell of an artist he will handle all the art ( Draw by hand and scan into PC ) and ill handle the programming and technical side So since i never used unity i was wondering if anyone knows the workflow for 2D Art also if its possible to turn hand-drawn images into a sprite sheet or animate them somehow
[QUOTE=werewolf0020;45179676]So me and my friend are going to work on a 2d unity game for the summer, since he is one hell of an artist he will handle all the art ( Draw by hand and scan into PC ) and ill handle the programming and technical side So since i never used unity i was wondering if anyone knows the workflow for 2D Art also if its possible to turn hand-drawn images into a sprite sheet or animate them somehow[/QUOTE] You could ask your artist to draw each parts of the character (torso, head, foot...) and then use something like [URL="http://hotween.demigiant.com/"]hotween[/URL] to procedurally animate them. The advantage is that it saves a lot of time for the artist so he can work on more stuff.
[QUOTE=Pelf;45179615]Thanks. I guess I'm just not sure how to break it down. I never took programming classes or anything so I don't really know any theory stuff behind it (OOP, component-based, whatever else) so yeah, I'm not sure how to break it down. Looking at other people's code would let me see how they broke it down. I tried to google some of it but I was getting a lot of really basic stuff that didnt really work they way I wanted. I'll do some more digging [editline]e[/editline] I should probably learn inheritance and how it is/should be used [editline]e[/editline] and interfaces too i guess[/QUOTE] You already started breaking it down, though! There's many techniques to do this part of a project and I think most people develop their own over time. ---How I do some stuff sometimes--- A good place to start is to write a natural language description of the game / read the GDD and identify the nouns. The nouns can generally map to the entities in the game world. Example: "In Pong, two players each move a paddle in order to bounce a ball behind the other player's paddle." -- Player, Paddle, Ball. We also know there is two players and two paddles - players and paddles are also very tightly coupled. So in our scene we will have three objects - two players/paddles and one ball. Obviously this description of even a simple game like Pong is incredibly over-simplified, but if you're writing one of these just to get the nouns out, you don't always need to worry about the "hows". Now we need to work out what scripts will go on the objects. -Balls!- 1. Find the behaviours We know (from other docs on the game) that the ball changes direction based on which part of the paddle it hits, that it moves constantly and that it bounces off the top and bottom walls. We also know that a point is scored for one of the players when the ball is behind the other player's paddle. Movement, reflecting off of walls, special reflecting off paddles and checking if the ball is in the goal. 2. Map behaviours to script/s Those behaviours are a small list of things that could probably fit in a single script (we'll call it "Ball"). BUT WAIT! Are we sure we want all of this code to be used only in Balls forever? Yes, it's pong. The only thing that shares behaviour with a ball is a ball. Well, paddles move too, but in a drastically different way. Note that we can delegate behaviours like "not going through stuff" to Unity's built-in components. Not that Pong really requires a full blown collision detection system. Etc. for paddles - have a go at working this part out yourself (it's trickier than the ball, but you can follow the same process). Remember the "/s" at the end of "Map behaviours to script/s". Generally it's safer to divide things up more, rather than less. Post what you come up with here if you like! (Challenging bits: needing input from two humans and maybe AI as well) Use cases are also a good tool for this stage of development (you don't have to use UML, though, I do mine in text unless it needs to be presentable for others). --- I wouldn't say inheritance and interfaces are required knowledge context of Unity scripting, though it definitely helps and can be a powerful tool in some situations. Feel free to ask questions about how to break down / design your code - you just need to ask questions with a fair bit of detail. For example, you could ask "How do you do a weapons system in an FPS?" (answer: "With respect to the requirements of said system. Depends on the game and types of weapons."). This is a bad question. "How would I handle different types of projectiles in an FPS (rockets, normal bullets, hitscan weapons, plus room to add more later)?" (answer: "A simple way to do this is have each projectile a different type or prefab - the weapon itself simply spawns the projectiles and the projectiles can get info from the weapon to know where/which direction to fire in.") is a better question. Asking broad questions can only get you broad answers - you want to narrow the possible range of answers.
Base geometry down, just some texture tweaks and a huge load of detail assets to go! [img_thumb]https://dl.dropboxusercontent.com/u/33714868/term2/arena4.jpg[/img_thumb]
Working more on my custom character physics code [url]http://www.mophogames.com/character-physics-prototype/[/url] Basically, I'm creating a custom character controller for my game rather than using the one that ships with Unity. Two reasons for this are: A.) Unity's scripts are impenetrable. B.) Everybody uses Unity's scripts - it's one of the things makes every Unity FPS feel very "cookie-cutter" I think. I'm borrowing pretty much all of the concepts from Quake 3's physics code. So far the result is having the character feel very responsive, but at the same time not overly artificial. An interesting side effect is that my code has the same quirks as Quake 3 - that is, the ability to strafe jump to gain acceleration beyond the intended acceleration cap. This is pretty much a WONTFIX at the moment ;) Anyway, demo. [unity]http://www.mophogames.com/wp-content/uploads/2014/06/TestCharacterPhysics.unity3d.zip[/unity]
[QUOTE=KillaMaaki;45184605]Working more on my custom character physics code [URL]http://www.mophogames.com/character-physics-prototype/[/URL] Basically, I'm creating a custom character controller for my game rather than using the one that ships with Unity. Two reasons for this are: A.) Unity's scripts are impenetrable. B.) Everybody uses Unity's scripts - it's one of the things makes every Unity FPS feel very "cookie-cutter" I think. I'm borrowing pretty much all of the concepts from Quake 3's physics code. So far the result is having the character feel very responsive, but at the same time not overly artificial. An interesting side effect is that my code has the same quirks as Quake 3 - that is, the ability to strafe jump to gain acceleration beyond the intended acceleration cap. This is pretty much a WONTFIX at the moment ;) Anyway, demo. [unity]http://www.mophogames.com/wp-content/uploads/2014/06/TestCharacterPhysics.unity3d.zip[/unity][/QUOTE] Very nice, Unity is definitely lacking a descent CharacterController, which is odd because the one shipped with PhysX is much better than the one in Unity. Your implementation is indeed pretty responsive. Do you plan on adding running/crouching? (Also you might wanna take a look at the [URL="http://u3d.as/content/vision-punk/ufps-ultimate-fps/2Jc"]UFPS[/URL] CharacterController implementation, it's the best one I've come across so far)
It already does support sprinting, I'll probably work on crouching next.
I've rewritten my erosion simulation shader to give mountains more detail and sharper edges, and integrated a voronoi-based region generation system to make it easier to generate things like rivers, towns and roads later on. [img]http://puu.sh/9FypI/c905133889.png[/img] The erosion system takes something like this: [img]http://puu.sh/9FyCL/ac55bb603e.png[/img] And then processes it on the GPU for a few hundred passes to produce this: [img]http://puu.sh/9FyFK/1131543863.png[/img] It also simulates things like parts of the island eroding at different rates to make it look a bit more natural.
[quote]Unity is definitely lacking a decent CharacterController[/quote] Totally agree with you on that one. As does Jeremy Clarkson. [IMG]http://medias.gifboom.com/medias/t_8b68ae48ee014dea9200e16727768d63.jpg[/IMG] I've tried the UFPS one, it's definitely good but not quite what I'm going for. I want a bit less of the "actually has mass" feeling and more of the "rocket jumping running around at 90mph zomg lasers" feel, to an extent (which is why I'm intentionally not fixing the strafe jump "bug")
[QUOTE=KillaMaaki;45185650]Totally agree with you on that one. As does Jeremy Clarkson. [IMG]http://medias.gifboom.com/medias/t_8b68ae48ee014dea9200e16727768d63.jpg[/IMG] I've tried the UFPS one, it's definitely good but not quite what I'm going for. I want a bit less of the "actually has mass" feeling and more of the "rocket jumping running around at 90mph zomg lasers" feel, to an extent (which is why I'm intentionally not fixing the strafe jump "bug")[/QUOTE] Then porting the Quake 3 code is the best way to do this :v:
[QUOTE=Ziks;45185637]I've rewritten my erosion simulation shader to give mountains more detail and sharper edges, and integrated a voronoi-based region generation system to make it easier to generate things like rivers, towns and roads later on. [img]http://puu.sh/9FypI/c905133889.png[/img] The erosion system takes something like this: [img]http://puu.sh/9FyCL/ac55bb603e.png[/img] And then processes it on the GPU for a few hundred passes to produce this: [img]http://puu.sh/9FyFK/1131543863.png[/img] It also simulates things like parts of the island eroding at different rates to make it look a bit more natural.[/QUOTE] This is awesome! Do you plan on releasing it at some point?
[QUOTE=HiredK;45186087]Then porting the Quake 3 code is the best way to do this :v:[/QUOTE] I'd be really curious to know what a Quake 3 player thinks of the movement code - whether I've done it right?
[QUOTE=Pelf;45186090]This is awesome! Do you plan on releasing it at some point?[/QUOTE] Thanks! The code's [url=https://github.com/Metapyziks/TerrainGenTest]here[/url] if you want to mess around with it, although it's very unfinished. I don't have Unity Pro (no render textures) so I'm doing the generation outside of Unity at the moment, producing a heightmap that I load in when my game starts.
Are using Static Variables in Javascript a good way to have scripts communicate with each other? I'm scared my game is becoming unoptimized and clunky.
[QUOTE=Garrison;45187165]Are using Static Variables in Javascript a good way to have scripts communicate with each other? I'm scared my game is becoming unoptimized and clunky.[/QUOTE] Not usually for just general communication, but it really depends on the situation.
[QUOTE=KillaMaaki;45187191]Not usually for just general communication, but it really depends on the situation.[/QUOTE] I have a bunch of variables that I want to stay in over scene transitions along with being able to communicate to other scripts. What worries me is having to write a reset function for all the variables that are static.
I figured out that you guys may know: So i tried the new "Unity for PSM" thingy that got relased recently along with SDK 2.00, and I made a simple test project to check how everything works. However, when I try running the "Build & run" option, i get the following error: "Error post-processing Player data: UnityException: Unable to locate PSM Tools for Unity! (Check environment variable 'SCE_PSM_UNITY')" I do have the lastest PSM SDK installed, and I'm clueless what have I done wrong. I chcecked in Internet, but it turns out that only one person got a similiar problem - and apparently no one helped him.
[QUOTE=Garrison;45187370]I have a bunch of variables that I want to stay in over scene transitions along with being able to communicate to other scripts. What worries me is having to write a reset function for all the variables that are static.[/QUOTE] Attach the script to an object. Tag it with something, then make it not being destroyed on load using: [url]http://docs.unity3d.com/ScriptReference/Object.DontDestroyOnLoad.html[/url] In the new scene, look for the object using the tag (it's much faster then a scene search).
[thumb]https://raw.githubusercontent.com/aleksijuvani/unity-vmf-loader/develop/screenshot.png[/thumb] The VMF importer that I had previously posted about is [url=https://github.com/aleksijuvani/unity-vmf-loader]open source and on GitHub[/url] if anyone is interested. Turns out that I personally won't be needing it after all. Feel free to do whatever with it.
Sorry, you need to Log In to post a reply to this thread.