So I've been doing more testing, and it appears that adding a MeshCollider is the slowest part, with adding individual planes being the fastest. Is comprising a level out of a shit-ton of planes going to kill performance?
[editline]25th February 2014[/editline]
[IMG]http://puu.sh/7aOef.png[/IMG]
[QUOTE=Richy19;44043173]Is there any bennefits/drawbacks to having many small scripts vs a couple of heavy scripts?
eg having one single script that controls mouse commands vs having a script for: unit selection, unit moving/attacking...[/QUOTE]
There isn't much difference in terms of performance, but having lots of smaller "module" scripts definitely makes it easier to change/debug stuff. Usually I'll have a main master script with a lot of the shared/core stuff, then a bunch of plugins for each of the features
[QUOTE=dmillerw;44050351]So I've been doing more testing, and it appears that adding a MeshCollider is the slowest part, with adding individual planes being the fastest. Is comprising a level out of a shit-ton of planes going to kill performance?
[editline]25th February 2014[/editline]
[IMG]http://puu.sh/7aOef.png[/IMG][/QUOTE]
MeshCollider are more expensive to calculate than any other primitive collision.
Try using box collider instead, since you are using plane, which shape like a rectangle.
[QUOTE=MGinshe;44050515]There isn't much difference in terms of performance, but having lots of smaller "module" scripts definitely makes it easier to change/debug stuff. Usually I'll have a main master script with a lot of the shared/core stuff, then a bunch of plugins for each of the features[/QUOTE]
Honestly, the best way to do with scriptable object is to keep them simple, generic, and modular as possible. So, ideally, having smaller and tons of script will make things more easier to control and make changes on the fly, rather than having a massive huge script that harder to change or implant something in it.
[QUOTE=dmillerw;44050351]So I've been doing more testing, and it appears that adding a MeshCollider is the slowest part, with adding individual planes being the fastest. Is comprising a level out of a shit-ton of planes going to kill performance?[/QUOTE]
For generation performance: You appear to be rebuilding the mesh and mesh collider every cell - just do it once at the end?
For run-time performance: Use box colliders? Find larger areas that can be represented with a single collider?
Also, Lists have a method to pop out an array for you, so you don't need to copy elements across one by one.
[QUOTE=Walker;44050558]For generation performance: You appear to be rebuilding the mesh and mesh collider every cell - just do it once at the end?
For run-time performance: Use box colliders? Find larger areas that can be represented with a single collider?
Also, Lists have a method to pop out an array for you, so you don't need to copy elements across one by one.[/QUOTE]
I somehow completely failed to notice that I was rebuilding it every time. Thanks.
[QUOTE=KmartSqrl;44048234]"actual classes" doesn't really have anything to do with it. Tons of dynamic languages have full OOP implementations. A Ruby class is a class just as much as a Java class is.
The super super short and sweet version of the difference is that in dynamically typed languages, you can assign a value of any type to any variable. In a statically typed language, if something is supposed to be an integer you declare that and you can only make it an integer.[/QUOTE]
Much better explanation, thanks :smile:
[QUOTE=layla;44044165]Early days but I've started to read VTF files in. DXT1, DXT3, DXT5 are decompressed to ARGB32, I also use the mipmaps from the file if they're there, otherwise I just let Unity calculate them. I need to make VMT and VPK readers after this so I can just point to a steamapps directory and load everything from there.
[img]https://dl.dropboxusercontent.com/u/99765/0234217.png[/img][/QUOTE]
You have me confused for a second here. You let Unity calculate the mipmaps now? or not? :p
Unity will generate the mipmaps on Texture2D.Apply if updateMipmaps is set to true. Most VTF files already have the mipmap textures so I give them to Unity. This is good if you have a texture that has a different colour on each mip level. One annoying thing is that it's all or nothing. If the Texture2D has 7 mip levels then the texture has to have 7 or I have to generate mipmaps for all levels. There doesn't seem to be a way to set the mip count of a texture.
[img]https://dl.dropboxusercontent.com/u/7422512/Unity3D/whichoneiscorrect.png[/img]
Which approach is correct for a FPS controller when moving on slope?
Left maintains the magnitude of 8 when moving up a slope, while right moves the character horizontally at the same speed no matter what.
For some reason Unity doesn't have BoxCast (they do have SphereCast and CapsuleCast).
I'm pretty sure that the left one is the "correct" way, but I'd pick whichever feels better.
[QUOTE=secundus;44052693][img]https://dl.dropboxusercontent.com/u/7422512/Unity3D/whichoneiscorrect.png[/img]
Which approach is correct for a FPS controller when moving on slope?
Left maintains the magnitude of 8 when moving up a slope, while right moves the character horizontally at the same speed no matter what.
For some reason Unity doesn't have BoxCast (they do have SphereCast and CapsuleCast).[/QUOTE]
It depends. If you're aiming for realistic simulator of some sort, it'd be left. Think about it, nobody can go up to the same speed on stair or slope, unless you're a really good athletic :P
-snip-
Where can I get decent dev textures? Like the poster above has with the orange textures for crates etc? Just to help with the level design.
[QUOTE=Over-Run;44056091]Where can I get decent dev textures? Like the poster above has with the orange textures for crates etc? Just to help with the level design.[/QUOTE]
Those dev textures are from Half life 2, you can export them using VTFEdit.
Alternatively you can probably find some placeholder/dev textures here: [url]http://opengameart.org/[/url]
[QUOTE=Over-Run;44056091]Where can I get decent dev textures? Like the poster above has with the orange textures for crates etc? Just to help with the level design.[/QUOTE]
Those are the dev textures from HL2. I couldn't find them, so i ripped em myself eventually
Wrote up a basic GUI to interact with the level generation stuff I've been messing with (and nearly died doing it, Unity's GUI setup is a [I]bitch![/I])
Play with it, give me feedback? Not entirely sure everything is working 100%
[url]https://dl.dropboxusercontent.com/u/243207/WebOut/WebOut.html[/url]
Could someone help me with this.
Why is my cube going through the other cude?
I tried a default Cube as well, they both have Box Collider and the green cude has RigidBody.
[url=http://i.imgur.com/N7uUkCQ.jpg][img]http://i.imgur.com/N7uUkCQl.jpg[/img][/url]
After looking up unity2D from the gamemaker thread in SH I did some experimenting and tutorials.
Holy shit is it so much easier than writing my own (slow as hell) 2D graphics engine.
Now if only I was a decent artist... It would be easier for me to get content into the 3D engine since I essentially have an unemployed 3D artist on call, but I like making 2D.
Hello guys, I recently decided to try out unity. (To be honest it is fucking awesome!)
It seems to do its job really well, but I'd like to know if it would, only in theory, be possible to re-make my mincraft-esque engine in unity.
Is it possible to program my own renderpaths? For example could I get my own context and use basic opengl/dx commands to draw into a custom renderbuffer?
Is it possible to build custom (optimized!!) geometry at runtime like it's needed for something similar to minecraft?
In my own engine that I made for fun everything is heavily optimized. I'm using impostors to render stuff thats further away; I manage every vertex I want to draw myself (for example I'm using shorts as vertex positions and draw my chunks with a custom vertex and pixel shader), etc...
Is all that also possible in unity?
Would using HLSL shaders reduce the platforms I can deploy to?
[editline]27th February 2014[/editline]
Oh and one last thing:
If I decided to add networking or serialization. Can I use existing librarys (assuming they are written in 100% safe&managed code) ?
Or do libraries specifically have to support unity?
Is the 2D in Unity functional enough to make a tower defense game?
yeah it should definitely be good enough
Should be yes, even without the 2D update it was functional enough. Look at the 2D walkthrough (not tower defence, but should give you a good insight)
[URL="https://www.youtube.com/watch?v=4qE8cuHI93c"]Unity 2D Walktrough[/URL]
edit: no video embed, here is a link
What would be the best way to get physics based turning of stuff? For example if I have a 2D character aiming towards mousepointer and his arms rotate and hit an object, how would I set that it applies a force to the object, but its not infinite? So it's against a bucket it will be moved, if it's against a tank the arms will stop instead.
Add torque to arms attached with a joint? Some IK/animation wizardry (I haven't touched animation at all yet instead focusing on scripting so it's a big ? for me)?
Also for read-only values that need to be accessed by other scripts often, should I just attach a script with static variables on a manager object in the scene, or delve into ScriptableObject stuff?
[editline]27th February 2014[/editline]
[QUOTE=Garrison;44063999]Is the 2D in Unity functional enough to make a tower defense game?[/QUOTE]
Shouldn't be any problem at all.
Has anyone tried the Unity tutorials on Digit Tutor? Are they of good quality?
[QUOTE=Proclivitas;44065937]Has anyone tried the Unity tutorials on Digit Tutor? Are they of good quality?[/QUOTE]
If you have a demo account you can try some of them. I want to get it but I don't have money right now :(
[QUOTE=Proclivitas;44065937]Has anyone tried the Unity tutorials on Digit Tutor? Are they of good quality?[/QUOTE]
What kid of tutorials do they have?
[QUOTE=Johnny Guitar;44067073]What kid of tutorials do they have?[/QUOTE]
[url]http://www.digitaltutors.com/software/Unity-tutorials[/url]
i look at the unity forums today, there dead right? look to be that way.
[QUOTE=Dark One;44076649]i look at the unity forums today, there dead right? look to be that way.[/QUOTE]
What?...
Does anyone know if unity is still able to run portably?
[url]http://answers.unity3d.com/questions/19893/unity3d-portable-installation.html[/url]
Sorry, you need to Log In to post a reply to this thread.