Introduction to. net:eek! from C + +

Source: Internet
Author: User
Tags abstract virtual environment

In our previous series, we moved an existing iso-c++ application gradually to the microsoft®.net Framework, clarifying the interoperability features of C++/CLI, and highlighting the differences between C + + and. NET object models. In this next series, we will explore the use of C++/CLI as a language that is fully compatible with. NET. The application code name is named eek! because it is about to become obvious Because at the moment I spend a lot of time dealing with the server side of MMOG (massive multiplayer online Games, high-volume multiplayer games), eek! Many aspects of the field have been adopted, but they have been simplified to accommodate a limited space in a column, and there are obviously more weakening features.

My hobbies (and also very limited) are molecular biology, and it is possible to question how things that happen at such a level of detail make us observe what we see around them. In scientific research, the use of mice may be more extensive than any other living organism, perhaps with only two exceptions: Drosophila and E. coli (a bacterium), which I don't feel particularly attractive. But if you look at the mouse for a long time, you will find that they have a strange sense of familiarity. They collaborate to retrieve the pups that fall out of their nests, showing different personalities, which seem to be able to memorize and learn from experience, both through the individual and through the intergenerational collective.

Like our zoologist Dian Fossey, who relies on a low budget to study gorillas, I support a lot of mice and look at them in an anthropological way (and, of course, somewhat haphazard) and take pictures of them. eek! It was one of my attempts to simulate the environment and the behavior of mice. My name for this frame on the homepage is eek!, which is dedicated to my computer graphics friends in Disney animation. They gave me the assurance that it was the sound of a rat when he found himself trapped.

So, how do I start? First, I need to illustrate a set of classes that I use to implement my design. They are used in part to describe the application. I need my jar, the mouse, some sort of way to mark the passage of time, and some ways to show or possibly preserve changes that have taken place over time. In this series of procedures I try to use as many. NET techniques as possible.

Deviations from the design class are largely determined by the application's intent. If I would eek! Designed as an online virtual environment in which users log on as virtual mice and interact with others and the environment, the design I'm working on over the next few months will not be the best because it does not lead to interactive games. In other words, this is the details of the impersonation error hierarchy. That is, the design that emerges from the same domain space is largely the result of the intent of the application, not the realm space itself.

A mouse is a mammal, so it has a lot of human characteristics, but its intentions are much simpler and less purposeful. So, what makes a mouse behave at a specific time? The fact that many of the mouse's actions were driven by molecular layers (usually through an odor emitted by a chemical called pheromones in the environment) was unconscious. This is what I want to accomplish and explore in this design and make this design more challenging.

Jars and mice are concrete examples of a more abstract set of classes that form the roots of the simulated framework hierarchy. Figure 1 gives you a rudimentary understanding of the hierarchy.

Hierarchical structure of FIGURE1 simulation framework

public ref class Environment abstract;
public ref class Entity abstract;
public ref class NonSentientEntity : Entity abstract;
public ref class SentientEntity : Entity abstract;
public ref class Mouse : SentientEntity;
public ref class Tank : Environment;
public ref class ExerciseWheel : NonSentientEntity;
public ref class WaterDispenser : NonSentientEntity;

Hierarchical structure of FIGURE1 simulation framework

public ref class Environment abstract;
public ref class Entity abstract;
public ref class NonSentientEntity : Entity abstract;
public ref class SentientEntity : Entity abstract;
public ref class Mouse : SentientEntity;
public ref class Tank : Environment;
public ref class ExerciseWheel : NonSentientEntity;
public ref class WaterDispenser : NonSentientEntity;

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.