The basic composition of J2ME game engine

Source: Internet
Author: User
Tags abstract continue

The game engine at home still has a group of people at the forefront of the development, but for various reasons is not very good, and the engine of the mysterious veil and unpredictability of the high difficulty that some people have not officially started has been backed up. Usually we say the game engine always think of the 3D game engine, it is true that the game engine has developed to the extreme of today's 3D engine, but there are still a lot of 2d,2.5d game engines before the 3D engine, and they now look weak, but they provide great theoretical support for the generation of 3D engines.

In principle, the structure of the engine is really simple and not as complicated as most people think. This article will not talk about more complex engines, only for J2ME, but though small spite, we can not because the J2ME game may not be the size of a picture and relax the requirements of the engine, on the one hand, the need for the theory, On the other hand the engine one but the successful development can greatly reduce the workload of the program and the art and improve the product quality and quantity. If it is very difficult to accept a very abstract engine, then I start with an industry that is very close to the game. The industry is a movie. Film to some extent to the game engine with a wealth of abstract framework and theory, but also can be said to work. So OK, let's take a look at the various parts of the engine from the film's filming process. We must first declare a few prerequisites for logical rigor:

1. Script already has (game plan case) 2. The resources needed to make a movie (props, Extras (NPC), protagonist. These are actually equivalent to the game development process of resources, the art has done everything OK)

Here's a movie shot of the scene:

People: Directors, JUWU, photographers, protagonists, other actors (John, Dick, etc.), other cast members

Props: A gun, a wooden box, a few sacks, a medicine chest, a cartridge

Scene: Narrow streets, lined with shabby houses, crushed ground

Camera: Two

(0) This is an anti-Japanese hero in the streets with the enemy's desperate struggle, let's call a piece of it

(1) Immediately to start filming, but things are not ready, the director see this shape shout: Juwu, according to my list of the props to move out! When the director asked for props, Juwu began to move. Hey, yo, hey, I finally got all the props out of the storeroom and put them in the right place according to the requirements. "The movement is so slow, you are moto it, others Nokia than move more quickly." ": the director bellowed.

(2) The props are ready, the Director is not satisfied with the current photography, hey what's the matter with you, quickly move the lens to XX, so the photographer placed the lens in the right position

(3) "Hey, say you, John, go there, stand still." Dick, standing in XX, do not move ah, wait for the lens to move past and then press me to teach you move ":" The director drink saliva said.

(4) "Hey Hei, the protagonist adults, you see you ready?" Why don't you stand by xx? Give you a gun, alas tu, do not look at me, "the director to please road."

(5) position, start ...

Let's take a look at the film's problem for the time being, which includes the same elements as the engine, starting with the number above.

(0) describe a story of a piece, please think about and what part of the game is very imagined? Yes, the script! It describes in general what story is currently described, as well as the characters will occur in the story of the behavior and events, such as: The protagonist was John Dozen a butt, Dick was killed by the protagonist and so on, and John and Dick was beaten after the protagonist rushed out of the siege, then put the game in the popular saying is equivalent to the role of the customs, Dick's death triggered the plot to continue to develop the event. Extrapolate, our game if the boss of the checkpoint is killed, can continue to play, enough straightforward. OK, this is the scripting system.

(1) Juwu according to the director's request from the storehouse to take out the props and placed in the scene. What does this mean in the engine? 1. The Director, 2 props, 3 scenes, they are very good to the engine several large parts abstracted out.

Director = Scene Controller

Juwu = Scene Manager

Scene = Scene System

"Director" by making a request to "Juwu", "JUWU" load resources on request and put resources into their own management list, and where they are, "director" to control, and so on, "Juwu" to release resources from the list. This is a very important process, perhaps 100 programmers have 100 kinds of control methods, but only one goal, in limited space and CPU resources to maximize the care I/O efficiency and execution efficiency. (later chapters will have some typical code and control methods for your reference)

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.