Jump to content
This site uses cookies! Learn More

This site uses cookies!

armedunity.com uses cookies to improve user experience.

By continuing to use this site, you agree to allow us to store cookies on your computer.


  • Content Count

  • Joined

  • Last visited

  • Days Won


Masaaki last won the day on December 3 2014

Masaaki had the most liked content!

Community Reputation

51 Excellent


About Masaaki

  • Rank

Profile Information

  • Gender
    Not Telling
  • Location:
    On the island of Nunyabiznes

Recent Profile Visitors

542 profile views
  1. I think you missed the point. It was a stress test to see how fast my swap removal trick performed in the worst case scenario. I mean, obviously if I wanted to clear out the list in a real scenario I'd just use list.Clear but that wasn't the point.
  2. (This is reposted from my blog) So I recently learned of a new trick when dealing with custom List<T>-style implementations - if you don't care about the order of elements in a list, when removing items you can actually use a very simple trick: just copy the last element of the list to the index you're removing from, then decrement the list count. While it does re-arrange the list elements, it's also face-meltingly fast which is fantastic if, again, you don't actually care about the order of items in the list. So, to put this concept to the test, I took the FastList implementation which ships with DFVoice (that is, a modified version of the FastList class from DFGUI - which is now open-source, by the way) and modified the RemoveAt method. Now, this modified version has a PreserveOrder property which lets you switch between the standard RemoveAt behavior versus the superfast swap trick behavior. I also did a benchmark of this new feature. The benchmark is a sort of worst-case scenario - a list of 10,000 elements, and manually calling RemoveAt( 0 ) 10,000 times until the list is empty: for( int i = 0; i < 10000; i++ ) { list.RemoveAt( 0 ); } With PreserveOrder set to true, the above code takes 26ms on my machine. However, when I do the above code with PreserveOrder set to false, it only takes a tenth of a millisecond to run - which is a pretty massive saving! Granted, this is a worst case scenario with a huge number of elements - in practice the difference between the two will probably be way smaller - but it still shows that in some situations this new method can be much faster which is important if you're trying to milk every ounce of performance out of your game. If you want it, you can get the modified list implementation from the download link below (the zip contains the FastList.cs file, just drop that file anywhere in your project, and from code use "using DaikonForge;" to use it). This list implementation also has pooling support, so you can use FastList<T>.Obtain() and list.Release() to reduce GC allocation. FastList.cs
  3. It's the same shit! Quit pretending it's different, it's literally the EXACT same language. Alright, fine. Since you CLEARLY know so much about Unity C#, let me turn this into a Unity C# example public class Whatever : MonoBehaviour { public string userName; public static void Main() { userName = "whatever"; // userName = Console.ReadLine(); } public static void Logats() { Debug.Log( userName ); // Console.WriteLine( userName ); } } Spot the problem now?
  4. Bullshit. From what you've shown, you understand absolutely nothing about C#, even remotely.
  5. Here's a writeup about the multiplayer bot AI in Orbital Assault for those who are curious. http://www.mophogames.com/orbital-assault-ai-overview/
  6. Masaaki

    Unity, Power limit.

    Just wanted to point out, that's not a solution at all. Actually, doing that can make your precision problems worse. As an example, at origin your smallest increment is 0.000001 meters, which is 0.001 millimeters. However, with 1 unit = 1 km, your smallest increment would be 0.000001 kilometers, which is 1 millimeter. Precision is literally 1000 times worse now.
  7. There will be blood effects. That said, I don't know if you noticed but there actually is a hitsound. It's a little "thunk" noise, to let you know when you deal damage to an enemy.
  8. Thanks! They can be a little stupid at times, but I'm happy with how it's looking so far.
  9. More prototype maps are coming soon courtesy of Joshua Kenway, so stay tuned In the meantime, here's update #12! A lot has changed in this update. - Finally got around to adding crouch - Changed team auto-assign behavior (if both teams are equal in size, randomly chooses between red and blue) - Added radio announcer - Fixed several bugs involving switching weapons while sprinting - Added more soldier lines
  10. Next to zero information whatsoever. Took a look at Y8.com. Looks like a subpar games portal. Honestly what advantage would Y8 have over, say, Kongregate or any number of other far superior looking portals?
  11. Oh, right, it's called AMD now isn't it? >.> Goddamnit internet, quit making me feel old.
  12. ATI's OK, but has kinda shitty driver support. NVidia is IMHO the superior vendor.
  13. http://docs.unity3d.com/Manual/Materials.html Was the first search result for "unity apply texture to material".
  14. There's a thing known as "Google", you might have heard of it before. Seriously dude, this stuff is super basic and it's super easy to find with a little bit of searching.
  15. You're on Unity Free? If so I think that's the issue. On Unity Pro you can pack all of your elements together into an atlas.
  • Create New...