Suggestions for beginners of j2s [ZT]

Source: Internet
Author: User


In the past few days, many beginners of j2s have asked me what to pay attention to. I have carefully thought about it and gave you the following suggestions:

1. First of all, you must have a basic understanding of object-oriented programming methods, and have a certain understanding of classes and methods, especially inheritance, derivation, polymorphism, and other features. This is the most fundamental foundation.

2. It is best to have a development reference manual on the hand, which contains a detailed description of all internal classes of j2's. The fundamental reason for your understanding and application of internal classes is whether or not j2's can be well done. For beginners, Java. lang. *, javax. microedition. lcdui. *, javax. mijcroedition. MIDlet. * is the first package to be mastered. You must have a good understanding of the basic usage of the internal classes in this package. In my opinion, the game programming of j2's is a whole composed of a main MIDlet class, several canvas classes, and other auxiliary classes (including self-defined classes.

3. Use others'CodeTo learn, but do not read too much code or complex code at the beginning (more than 3000 lines of code), because you are not familiar with object-oriented programming, from the very beginning, there are many classes. If the code of some classes exceeds several thousand lines, it will only confuse you and won't provide much guidance. When learning, add your own comments to the code. Only in this way can you really understand the code.

4. in the course of study, I had to give examples by myself. Some people complained to me that I did not know what projects to do for training. In fact, I did not have to do a complete project to do my exercises, you can start with some basic game modules, such as how to display one or multiple images on the screen, how can we achieve overlapping and moving of these images (manually controlling moving or automatically moving), how can we call up a form to display some information when displaying the image, and then switch back to the image, although these small exercises cannot form a complete game, they are the basis for playing games, so beginners must not start with a large project, that will only make you always do what you seem to be doing. You have to start from a very small age. Every master has come over like this, and we still have a long way to go from the master, you can only accumulate your experience from these practices.

5.ProgramOptimization,AlgorithmDesigning these things should not be studied by beginners. These things need to be considered after you have completed a complete small game independently. program optimization is not clear in just a few words, many optimization data and methods are the conclusions drawn by our predecessors after countless experiments. They are very precious. As for algorithms, designing algorithms in j2s is actually more exhausting than in C ++, because the algorithm you designed should at least ensure that it will not die on the mobile phone (that is why the traditional A * algorithm cannot be directly transplanted to the mobile phone ).

6. when talking with others, you will get more experience. In fact, even low-level programmers will have their own unique insights in some aspects, this will teach you a lot of things.
 

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.