Questions from a Torque refugee possibly looking for a home

Hi All,

I’m a T3D user in the obvious situation and one of the candidates is preverbal gorilla in the room; Unity.

For starters, my game is a multiplayer RPG. Please, I don’t need a lecture ; not a multi-thousand player MMO, but I’d like to be able to handle 100 concurrent users. The second thing is that I’m the author of Angela, a ruleset processing engine written in Python. Angela is very close to being ready for an alpha release; hopefully before Christmas. My plan was to use Angela do the heavy lifting in the RPG rules domain and to use with Torque as the “front” server. The players would see a pure Torque environment (their client and the dedicated server) and Angela would communicate with the Torque server. The plan was not to modify T3D too much. Movement and collision would happen at the Torque level. Torque knows nothing about the game rules, it handles the scene graph, client communication and rigid body physics.

I’m not planning on pushing the graphics to the limit. In fact, I plan to religiously stick to a rule of using only specular and diffuse on the materials of any art assets and no textures, aside from normal and/or parallax maps. I also plan to use a full screen Sobel outline shader. Yes, the art style is solid colors, with black outlines; very modest by modern standards.

Related Question: Is it easy to add a full screen Sobel shader? Is this even possible? What version of Unity do you need?

Melee would be either collision or raycasting based; preferably the former if performance permitted. The procedure for Torque was.

  • This would mean that to make a melee attack, you would send a request to make the attack to the server, which would forward it to Angela.
  • Angela’s Action Engine server would process the request and decide if you were allowed to make the move
  • If it was ok, it would broadcast a stimulus: your toon plays the appropriate animation.
  • This command to play animation X goes back to the torque server, where it is processed as a normal animation; albeit with the server side melee resource.
  • If the torque server detects a collision, it reports that to Angela as an action and does a quick internal rule check to decide whether or not to put the target into ragdoll mode for a moment.
  • After the timeout on the ragdoll, (how many ticks should this be?), the player regains control of his toon and can get back up and resume. Yeah, you are vulnerable during this time and yeah, if that was a killing blow, but Angela is lagging, you can still act until the death catches up to you.
  • When the collision action comes back to Angela, it clears the target’s pending action queue (this should be happening while the target is still in ragdoll mode), decides how much damage, if any, to apply to the target and whether or not the target survives.
  • Broadcast the perceived results of the hit to nearby control objects. This means, send it as a stimulus to Torque and make it dependent on having the target and or actor in scope. If you have them in scope, you get a text message with the hit results. (you probably saw the ragdoll show anyway)
  • If the target dies, send a “stimulus” to Torque to “kill” the target via the usual script means.

Related Question 1:
If I mount an object to another (e.g. sword to a player avatar’s hand) and then that other thing (the player) plays an animation, can I expect the collision box on the sword to still be functional? Or does it surrender its collision volume when mounted?

Related Question 2:
What happens if I have multiple collision volumes on a figure and it plays an animation? Yea, I’m talking about hitboxes.

Unrelated networking questions:
Can anyone who has worked with Torque as well as Unity give me a short “delta” of the two engine’s networking? How does Unity’s raknet scoping/ghosting work in comparison to Torque’s TNL? I’m not asking about pros and cons, but how scoping and ghosting is handled. Is there something similar to mask bits?

Does Unity use datablocks, or something similar like Torque? If not, how does it deal with the situation where a dozen exact copies of something need to have all their info sent to all users in scope?

Thanks,
Cayle

Hey,

well, I can’t answer some of your questions, but i’ll take a stab at the collider questions:

related q1 : the weapon collider would remain in tact. If you wanted a collision with the weapon to be processed up the collider chain, you’d have to parent the weapon gameObject to the hand gameObject. Otherwise… you should be all good

related q2: you can trigger animations from any OnCollision call, and (if required) animate physics (so your animations will still trigger collisions if they hit another collider).

Does that answer your questions (or at least those two)?

Cheers,

Galen

Hey Cayle. Welcome round here

Related question: You need Pro at very least to do PostFX at all. Can’t say though to what degree its possible

Networking Question: There is no ghosting at all, scoping only if you enabled it and manage it as it will not update it for you etc (there is a command to set scoping for the view serializations. RPCs don’t respect the scope, you need to manually declare the target and inform anyone on something if you use RPCs)

As for datablocks: Nothing alike. But also not needed as you don’t send through the whole stuff on connect. Unity has a Prefab concept which allows you to define “game objects with scripts, childs etc” which you can just instantiate through a simple call basically.

If you need something like datablocks for security reason (though most likely you use cached datablocks through the corresponding addon code someone released or as provided through AFX), you would need to use datablocks and download it from a remote place prior instantiation which is naturally possible as well (Requires Pro)

For the “example situation” you would just inform all users in your own managed scope that you want to instantiate prefab XY (how you encode this is up to you, as Network.Instantiate is something you will want to avoid, especially as it has no scoping) and they will execute it.

Generally you will have to do some very deep rethinking on the networking side to map it over (but that holds for any technology I’ve seen the past decade, as TNL, as powerfull it can be, is also as arsy and annoying if you don’t do an FPS / Action FPS alike game - especially the datablock part has lead to major problems with larger games)

Question though is why you are looking for new places. Its not like the T3D board was that active or helpfull, updates happened less and less regularly and you have the sources so you can easily continue your project and expand the technology where needed for your specific needs.

Regarding networking in unity vs torque:
I’ve never used Torque in a deeper form, the last time I saw torque it was back in 2008 and it was a very ugly experience.
Regarding Unity raknet, it is quite easy but theres few others options quite powerful for MMO or simple multiplayer.
I had the chance to try out electroserver5: http://www.electrotank.com/technology-overview.html
I’m not an avid network programmer and I’ve done huge things with electroserver so easy, you’ll feel right at home.
Integration withing Unity is just few clicks away, you can also use it freely but the free licenses only support up to 25 players per server.
At least it give you the chance to try it out.
Theirs also Badumna: http://www.scalify.com/badumna.php
Personally i haven’t tested this one but i heard that is easier than electroserver5.

@galent and dreamora - thanks for the tips. I’m not sure I’m ready to shell out $1500, just so that I can use a Sobel shader. Is there anywhere where I an get a 10,000 ft overview of Unity’s networking? If unity uses Raknet and afiak, raknet does have something similar to ghosting, called replica manager. I was wondering if this is exposed to control from script in any way, or automatic.

qtatoforever - I’m kind of looking for the 10,000 foot view of how Unity’s built in networking works. For my use, the server needs to own the master copy of the scene graph and ideally own the physics master copy as well. I’m not so much concerned with ease of use as networking not being able to scale beyond ten concurrent players. (MS Access is easy to use and VBA is an easy scripting language to learn. Now try using it as a database server)

Sorry, i dint mean ElectroServer is easier than anything. That was my personal experience with, as a network coder. It was easy.
ElectroServer is better than unity buildin networking it is quite scalable and complex, suit for MMOs. Servers licences supports from 25 users (free version) up to 10 000+ and more!

Replica manager is not used and present in unity at all (or if then as a background part for SetScope and the OnSerializeView function - in the end none of raknets functions is exposed for direct usage in any form)
Also even if present its not comparable to ghosting in Torque actually as it does a lot more than just that as it manages area of interest etc internally in Torque.

The unity functions you have at hand are documented in the classes Network and NetworkView in the script reference. Additionally you might want to look at the Networking Example in the Resources - Examples above and M2H Zero to Hero tutorial on networking. These 2 resources + script reference give you a pretty straight picture on what you have.

Benefit of Unity vs torque is that Unity can use third party networking solutions of any kind basically, where as thats basically totally impossible in torque as the networking - ghosting - datablock is a core part of the engine

I can’t answer the programming questions since I’m an artist primarily but I can answer the sobel thing

You do need Pro for the full-screen postfx, however there is a workaround that you could use that might or might not fit your needs but works in Free and is very easy. There’s a toon shader, Toon Lighted Outline and it lets you choose the color for your object, color for the outline, size of the outline and texture for the object. It won’t be a full sobel effect but it might be good enough for prototyping until you can afford to get Pro. The downside is that you’ll have to apply it to each object in your scene but that’s not too bad since you can always just make a single material and apply it to everything

Well the good thing about this gorilla is there are a thousand chimps including the developers who go out of their way to assist you in your project. That alone makes unity the ideal choice.

I do not have much to reply, but you made a right choice. Unity is just freaking great

Having worked on Torque to create an MMO before, I would say that Torque’s networking is better than what Unity currently offers. Read here for my suggestions about what’s lacking in Unity networking that Torque has: http://feedback.unity3d.com/forums/15792-unity/suggestions/824649-better-network-serialize-commands