No mention of a physics library at all. So even on screen battles are probably ‘dice roll’ interactions animated to look like battles. e.g. Attacker rolls a d20 gets 12, defender rolls a d20 gets 6, attackers missile hits and does d20 damage. Visualised as missile launched and impact on hull of defender.
Note that Arcen Games AI War was migrated from a bespoke game engine using DirectX to Unity.
Check out the developers blog for details, he had to use a lot of tricks and bypass Unity’s object system to get the performance needed for his fleet battles. But as he started with a bespoke C# engine he just ported the code and used Unity’s low level mesh drawing features to get the performance he needed.
Maybe you can. I can lift a 160 lb human being up over my head, don’t mean it’s just easy stuff that should be common for everybody. But if you’re saying that is the norm and the rest of us who can’t slap a 3D game engine together in 3 days are just losers, because there’s tutorials… apparently that’s all you need… tell me more.
There’s nothing wrong with using a foreach. Optimising a foreach linked list into a while block is like optimising a for loop by unrolling it. It’s 9000% unnecessary.
I think people worry about optimization because it takes away from worry about designing a game, which is infinitely more complex. If people spent as much time as they spend worrying about imaginary scenarios and premature optimization on the actual game… But first but first but first… My game absolutely can’t do without this level of performance… Its not my fault unity can’t handle my game… Therefore I can’t make my game and its not my fault. And absolutely, positively unequivocally has absolutely nothing to do with the fact that I have no idea how to make my game or perhaps even how to make a game.
I’m a genius who has no equal but for reasons outside of my control I am unable to make anything at this time, but I still want to be respected as a genius. Not for what I’ve done but what I could have done.
The OP has a valid concern Unity gives you a great tool set but it does not scale well for high Unit count games, especially using the default GameObject/Physics System.
You have to write a ‘game engine’ within Unity to handle really massive Unit counts and bypass the default gameObject paradigm provided by default.
Although I have my fingers crossed for Unity 5 being a lot better in this regard!
There’s a massive difference between a full on modern engine and something that can draw 3D primitives in GL, Of course I’m not calling anyone anything, more of a it’s not as bad as some think. (Obviously dependant on what you’re doing)…
Also for the most part, if you’re a games developer you should know how matrices / basic lighting / shadow mapping / transforms and all the basic things to make a not very functional engine, because in essence that’s how you’d make a game. Unity shields you from a lot of this, which in some cases is a good thing in others a bad thing. To actually finish the engine to something near useable and catch up to modern day standards, we’d be looking at a year at least and even then it wouldn’t exactly be “user friendly” (this is assuming you’ve been doing dev for at least three years and know the concepts)…
There’s a huge difference between a personal engine and a commercial one. Not that I’d recommend anyone make their own engine if they want to make a game, it’s a time and money pit. As a learning exercise, hell yeah it’s a great thing to do…
I think it’s a waste of time for someone who claims to be interested in game development. You can’t do anything that hasn’t been done before, you have no reason to try. I understand some of these “very basic things” and some of these other “very basic things” I don’t understand as well. I also understand how computer memory works (in principle) and how to do binary math. I also have a very vague notion of how computers process data at the electronic level, with series of switches and gates. I also understand conductivity, and the principles of electricity, basic chemistry and the theory of life, the universe and everything else. 42, man. 42.
I chose Unity (check your URL) because I was mature enough to realize that I didn’t need to reinvent everything from the ground up, I just had to learn to understand what was already there and start working in harmony with existing stuff. I had to stop listening to uninformed, bad advice like “C++ is faster” and “learn a real programming language” and start thinking goal-oriented. Which is actually good advice. You can always take a diversion from game development and waste a part of your life building something that’s already been done ten thousand times before, it’s not going anywhere.
Games are difficult enough, I’m not arguing with you I as well think it’s not worth the time if you’re wanting to make a game. Use a pre-made one and go through it, on the flip side the learning advantage is invaluable and it really does help get you a job if you can understand deeply how games and engines work.
Also a generic pre-made engine might not be what a team needs, there are all sorts of companies big and small that use in-house engines. Just because it’s been done a 1000 times before, it doesn’t also mean they’re wrong…
Believe me when I say, it really isn’t a waste when you’re learning.
Hmm very interesting. Maybe he is not using colliders nor Rigidbody. But yes I agree that if one does it wisely, he can have more objects in scene at once. (But not more than in custom built engine specific for that purpose )
I’ve done a quick test, sorry can’t resist these things and I can get 4000 simulated units in 3d space that fight and move @30fps on my PC.
Uses game objects for units with sphere colliders, rigidbodys (to allow units to scan for nearby units) and sprites to allow me to see what is happening and debug.
The combat system is a simple d20 attack/defend with health.
But if you abstract your game objects to c# classes, use a system or node based combat space (like the example) so no range checks needed as any in system units can attack others in that system.
Make it multi-threading as the battles will be taking place regardless of the main Unity thread. Then relegate Unity to a display/camera system showing battles in the current system or the system view.
Even if you don’t use Unity you will probably need to go this route or abstract further and use a server client system. With a server / client the core simulation would run on a server and a client would allow people to connect to and view/interact with the battles.
The benefit of a server / client setup is you could take it multi-player.
There is no physics there at all. It is all just simple math and rendering optimization. For all intents and purposes it is a simulation, as the user is not affecting the battle directly. That example is fairly easy to replicate, it’s deterministic (essentially). I built something similar in flash a couple of years back (leveraging stage3d). The graphics were more complex than that example and were all animated. But I was able to have a 10,000+ animated tanks on screen zooming around firing rocket salvos at each other for a total of ~50k animated objects running at 60fps in Flash. Might not hit that threshold on a device, but easily doable stand alone or in browser. Unity should be able hit that without much effort.
WTF No way! LOL you are going to have to show me a video of this now YouTube has 60fps now so come on. I can’t imagine flash handling those numbers and Unity 4.x can only hit about 1000-2000 units even in standalone.
Sorry if I’m coming in at the tail end here, but have you tried ditching the ridgid bodies for your own basic physics? And have you tried tweaking the FixedUpdate settings under the time settings?