Alpha and Omega —
The is like our universe, it’s infinite in size and there can be only one of them.Inside the world we have things called a . They could be considered like dimensions in our world, we inhabit one dimension and ghosts and monsters inhabit another. Things in one scene cannot interact with things with another.
Inside the scenes is the matter itself, it is divided into units or RigidBodies such as a pencil, a corpse, a house or a oil canister.
RigidBodies有四种类型，Actor，KinematicActor，SceneGeometry，Volume这四种类型。每一种类型都是基于一些函数来进行与其他各种对象的动态碰撞检测，在这一点上，我们可以把他们当作同一个东西。每一个RigidBody 都是由一个或者多个形状Shapes组成的。当一个RigidBody 的Shapes和另一个RigidBody 的Shapes碰撞的时候，我们需要通过它的Material属性来知道它们碰撞之后会产生怎样的效果。
Each is made from one or more . When a shape collides with another shape from another , it’ll need to know how to react properly this defined by a few properties called a .
The World and a fitting Description of it —
The is the top-most class of NxOgre; it is responsible for handling of all the Scenes and indirectly working with it’s friends; the s. World is normally the first to be created, and most always the last destroyed.
When we create the World, we normally give it a . A bit like a mug shot; What kind of ice-cream it likes?, What’s it’s favourite colour?, Where it get’s hair done?, things like that. We give the description to the World or any other class that likes descriptions for it to read and pretend to be that class you stole the description from.
At this point, World seems very boring. Because it is, it’s always out there but there are more important things in life. So lets move on, to !
Father Time —
is the second one in charge, he makes things happen, he makes the whole cause and event thing go, he’s the man.
Because Time is a strange thing (and personally I think we would do better without it), anything that needs to be in the time dimension must be a TimeListener. We can do that by inheriting from the TimeListener class;
Lot’s of things in Bloody Mess are TimeListeners; Scenes, some Singletons, Renderables, even the World – although you ask him about it, he’ll deny everything.
With our now time controlling superpowers we can exercise our will to advance time forward as much as we want, as many times as we like!
With the universe advanced 100 seconds into the future and we did not age a day, our quest for being an evil mastermind is coming to an end.
The Singletons —
The Singletons are the underlings of NxOgre, not the bad underlings kind, the good ones really. Well, almost. There are five singletons; although the isn’t fifth not shown (He joined us in season 3, and I couldn’t find a more recent screengrab).
They are; , , , and . I’ll let you guess who’s the one in pink.
Although they are the underlings of the World, they can be created before the world, and after the world has perished – If your evil bidding desires it.
Singletons can be accessed any where, and there is only one of their kind – sadly.
The greatest achievement of the human spirit is to live up to one’s opportunities and make the most of one’s resources. —
We start our lesson with the ResourceSystem. A singleton designed to handle any external resources to our world. Meshes or Heightfields are commonly used with the ResourceSystem, but other less complicated files such as text files can be used – if you so wish.
The ResourceSystem is typically a very lazy creature, it never went to school and read about different file types, operating system structures or the exact placement of a block header should be. Instead the ResourceSystem has lots of friends calleds which the ResourceSystem has bribed them to handle any resources for him.
Two examples are the and which you’ll never meet because they are invisible and really shy. We talk to these ResourceProtocols using an ancient tribal dance called a to quickly reveal themselves, open their magic secret bags full of goodies or if your a traditionalist s.
We start our dance by writing down the name of the archive we want to call it to a green ribbon, then shouting out aloud the we want, then write an ancient symbol the in the air then finally we write down the of the Archive and bury it in the ground.
Some Protocols don’t use Archives at all. When we want something – it will be there regardless of where it came from; MemoryResourceProtocol subscribes to this new age thinking. Of course MemoryResourceProtocol doesn’t even name it’s resources – it’s that age.
After we’ve gotten hold of our magic bag or archive if you prefer. We can now open it and play with the things inside. We do that by another dance called the . It’s similar to the UniformResourceIdentifier dance, but now we whisper the name of the archive, trace another colon in the air, and start singing out the name of the resource we want, and finish of with a long burp indicating how much access we want to it.
With our Resource now opened we can now play with it, with the assurance that our new friends will handle the nasty bits with Operating Systems, Memory, or even really knowing what type of file or archive we are using.
Next time on the Singletons, we explore the easier side of Resources; Meshes and Heightfields.
Meshes & Heightfields —
It is clearly said that Meshes and HeightFields have their differences, but what are they and how are the different?
HeightFields are pieces of terrain; much like a hill, huge tracks of land, or a underwater mini-golf course. HeightFields are like spreadsheets organised into rows and columns – with each cell representing the height of the terrain at that particular point. A value of 32768 may feel like being on top of the world, where as -32678 may feel like everyone is all above at you – laughing.
HeightFields in NxOgre use the class and are organised by the singleton (you’ve met them already). HeightFields may be created within code via the class or if your feeling adventurous be loaded from a NxOgre HeightField xhf file, which is loaded through the ResourceSystem. You can save xhf files from the ManualHeightField – so it’s win win.
But for now my petite starfish, we will do it the old fashioned way and make our HeightFields by hand, like our forefathers did.
Heightfields are used with which you’ll encounter later in Level 2. Meshes are also used with StaticGeometries which I will have a chin-wag with you now.
Meshes unlike Heightfields are superior (or not – depending on your point of view). Unlike Heightfields they can take any upon any shape you wish. You can picture of them as an unmovable, loud mouth, shapeshift once sort of…shape.
Like Heightfields Meshes can be loaded from disk via a saved PhysX Mesh
file using the MeshManager singleton.