Development Progress of LGame-0.2.9 Edition

Source: Internet
Author: User

Hello, younger brother ~~~



In fact, the LGame-0.2.9 version has been basically completed, is expected to complete the relevant documents next week, early in December can be released. In the blog, I am primarily asking if the netizens need to implement the details. If it is not too troublesome, I will add it to my younger brother (if it is troublesome, I will talk about it later/(^ o ^) /......).

1. In version 0.2.9, fixed all bugs in the previous versions that received user feedback (for example, long-pressed keyboard without reducing FPS and other details ......)).

2. In version 0.2.9, some operation details are improved. By default, the speed can be increased by more than 10 FPS.

3. In version 0.2.9, the original class functions are expanded, new methods such as self-generated polygon and sprite class listening are added, and the threadscreen class is redesigned.

4. In version 0.2.9, a physical engine (independent jar, optional) encapsulated in box2d is added. Soon, you can create an angry XX or something.

In fact, the main change of the LGame-0.2.9 version, in a word lies in the support for box2d, I try to simplify the box2d encapsulation. However, as box2d is a physical engine filled with physical concepts (World, rigid body, quality, acceleration, elasticity, density, damping, etc ~), To actually use the physical engine encapsulated by lgame, you still need to learn more about box2d. Otherwise, I am afraid it is difficult to start. Even if you are a younger brother, you can't go through the box2d documents ......

However, lgame is relatively simple in the encapsulation setting of the physical engine. In addition to screen globalization and automatic binding between the genie and the body, it also specifically adds the image self-generated polygon function, no matter how complex a graphic is, as long as it contains a transparent area, lgame can automatically generate its polygonshape instance for box2d calling, without having to manually set its shape parameters.

For example, if we call a new polygonsprite class in version 0.2.9 and add a sprite to the form, we will naturally get the following results:

 

 

How is it? Can't it look common? However, if we slightly adjust the two functions when injecting this object, we will find that the use of polygonsprite is infinite.

At this point, I chose to hide the display image of polygonsprite and show its polygon to the screen. Then we will see the following effect:

 

 

How do you see the dotted line of the border? This is not just a picture, but shows the automatically generated polygon. Anyone who has made a physical engine knows that with polygon, the genie can now participate in related physical events. In lgame, to obtain a polygon with complex graphics, we only need to inject images (PS: even if the physical engine is not imported into a jar, lgame can also be used in 0.2.9, which has been encapsulated in spriteimage ).

 

In addition, this group of polygon (and images) can also adjust the angle at will. Below I will rotate this object 720 degrees (negative direction when it is negative, that is, positive 360, negative 360 ), you will see that polygon is also changed.

 

 

In the LGame-0.2.9, both the polygon and box2d polygonshape used in the standard javase can all be taken directly from the image without the need to set the shape (of course, you can also inject the desired shape by yourself ).

 

And in terms of use, polygonsprite and lgame normal genie is no difference, but with more parameter support and feedback box2d engine (In addition, In the LGame-0.2.9 can also automatically bind body and Genie, this section will be detailed during the official release ).

 

 

Now, as long as we call the BIND function in physicsscreen provided in the LGame-0.2.9 to bind this genie, it will become a body-linked presence. Of course, I will leave it to 0.2.9 for details. Otherwise, I will not have to write it at the time of release. | ......

 

----------------------

 

It is said that Beijing is very windy over the past two days, and the plan to go to the "Zhongguancun's Food Market" to buy a digital board is put on hold again, and to put their laziness to the ground ......

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.