Silverlight Game Design: (v) Object-oriented thinking shaping game objects

Source: Internet
Author: User
Tags silverlight

Legend has it that object-oriented development patterns were first created by lazy programmers. Development so far, people from the initial hot loyalty to discuss whether a certain language is enough object-oriented to now start a broader focus on object-oriented thinking rather than concrete content. Object-oriented thinking is actually not abstruse, it exists only for one purpose: Let the program development closer to our real world.

Remember the cat, the cat barking, the dog, the dog eating? Countless programmers like to use this similar scenario design as the best example of object-oriented. Yes, very vivid and image, but in practical use can you really do extrapolate?

Back to the game design, do we often feel that the game world is so close to our real world? The elves in the game are like we humans, more broadly, you can regard the Elves as any life in the game world. In the real world, "man" is a generic term for a guy like me, "people" can stand, can move, can fight, can be wounded, can die; in the game world, "Sprite" is a general term for all life bodies, "elves" can also stand (stand), can move (MoveTo), Can Fight (Attack), can be injured (injured), can die (Death). Of course, fantastic they may also be able to cast (casting) or even fly (Fly). Able to move, therefore must have the speed (Speed) and direction (Direction); can die, so must have it alive proof (life) ... So, a very very close to our real Life Game "Wizard Class" appeared:

Each "person" lives in their own "city", "City" has a road, there are bridges, mountains, water ... A wide variety of ground conditions form the façade structure of the whole city; elves "exist in their respective" scenes (Scene), each "scene" has a vivid background map (map) to show the beautiful scenery, the elves are laying the coordinate system (coordinates) of the "scene" In the free life. As long as they are happy, they can go to different "scenes" to visit friends or adventure. Therefore, the "scene" management of all its internal objects such as "elves", "Magic" and so on, as the host game elements of an important hub, it has extraordinary significance:

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.