There will be a problem in game project optimization. How can we reduce both the memory size and the package size as much as possible? In actual projects, some experiences are shared. In fact, the most memory occupied by 2D games is image resources. The performance of a single image varies greatly with different texture formats, the following table shows the test results in a small demo on the iOS platform. The original memory usage of this demo is 7 MB, and the test method is to load 5 2048*204
too low-level, I don't want to dig deep, and I am not fit to explain the problem. (Translator: Haha, know for know, do not know for unknown)Using Npot TexturesNOPT is the abbreviation for "Non Power of", translated "not a power of 2". Npot stands for "Non power of". In the cocos2d1.x, you must open the support for Npot in the CcConfig.h file, but cocos2d 2.x is not needed, it is supported Npot by default. All 3 Generations (iphone 3GS) later iOS settings support Cocos2d 2.x (because they suppor
, similar to the built-in macro _ line _ in C Language __
$ FuncnameThe function name is similar to the built-in macro _ FUNC __in C language. However, macro _ FUNC _ can only represent the name of the current function, while $ funcname is more powerful, it is an array variable that contains the names of all functions in the call chain. Therefore, the variable $ {funcname [0]} represents the name of the function currently being executed by the shell script, the variable $ {funcname [1]} indicate
. Fortunately, we can use some of the shell's built-in environment variables to enhance the output information of the "-X" option, which introduces several shell-built environment variables:$LINENO represents the current line number of the shell script, similar to the built-in macro in C __line__The name of the $FUNCNAME function, similar to the built-in macro __func__ in C, but the macro __func__ can only represent the current function name, and $funcname is more powerful, it is an array variab
A place like the Dragon 0 oath This generation of home machine re-depicted in the city of Jimbochothe world of [the violence of the Golden Woman]This is the first time series in the game depicting [such as Dragon] prequel works because it was the first time that PS4 was portrayedThe work of the studio-cho, which is the gorgeous and messy mix of the economic bubble period, completes the new discoveries and fresh qualities of the player. pre-made 1.5
variable containing all the functions on the entire call chain name, so the variable ${funcname[0 ]} represents the name of the function that the shell script is currently executing, and the variable ${funcname[1]} represents the name of the function that called the function ${funcname[0]}, and so on.
$PS 4The main prompt variable $PS1 and the second-level prompt variable $ps2 are more common, but few people notice the effect of the fourth-level prompt variable $
I recently learned how to develop games on the iphone. I think it is not that difficult to learn a tool. I would like to share some experience in image loading with beginners. I hope everyone can quickly become a master.
Currently, there are many formats for images in cocos2d development for iphone, but I only use two of the most commonly used formats here, one of which is "*. png "format, the other is ". pvr format, and compressed
several shell-built environment variables: $LINENORepresents the current line number of the shell script, similar to the built-in macro in C __line__ $FUNCNAMEThe name of the function, similar to the built-in macro __func__ in C, but the macro __func__ can only represent the current function name, and $funcname is more powerful, it is an array variable containing all the functions on the entire call chain name, so the variable ${funcname [0 ]} represents the name of the function that the shell
script is currently executing, and the variable ${funcname[1]} represents the name of the function that called the function ${funcname[0]}, and so on.$PS 4The main prompt variable $PS1 and the second-level prompt variable $ps2 are more common, but few people notice the effect of the fourth-level prompt variable $PS4. We know that using the "-X" execution option will show each command that was actually executed in the shell script, and that the value
Hacker successfully cracked PlayStation 4 support running LinuxA Brazilian team claimed that the first time the PS4 jailbreak was successful, involved a cumbersome set of procedures that required the use of a Raspberry Pi to replicate the entire hacker's hard drive, and it was not until the month that it bypassed Sony's content protection.Since Sony PlayStation 4 has been on sale for two years, the hacker door has always wanted to enjoy the fun of cra
Original article: http://385559842.blog.163.com/blog/static/6835714020123510138495/PVR images are common on iOS devices, because powervr display chips are usually used on iOS devices, while PVR images can be directly loaded by these chips, fast. The full name of the PVR. CCZ image is compressed PVR, which is the compre
Texturepacker is a good image combination tool
Address http://www.texturepacker.com for texturepacker
PVR images are common on iOS devices, because powervr display chips are usually used on iOS devices, while PVR images can be directly loaded by these chips, fast. The full name of the PVR. CCZ image is compressed PVR
option is enabled, and set + parameter means that an option is turned off. Sometimes we don't need to use the "-X" option at startup to keep track of all the command lines, so we can work with the set command in the script.For example:1.1 #!/bin/bashIsRoot () {If ["$UID"-ne 0]Return 1Elsereturn 0Fi}IsRootIf ["$?"-ne 0]Thenecho "must is root to run this script"Exit 1Elseecho "Welcome root user"#do somethingFi#首先使用sh-n test.sh check for syntax errors. If there is one, then SH test.sh executes the
, which gives the player more space to play. Each PS move game will have its own correction method, correct the player's position in the camera, the main handle light ball color and so on.In fact, Sony in the PS3 period, by the Xbox 360 in the body sense of the impact of design, seems to have been a bit passive, the development of a separate camera and move body sense controller, but the effect is not ideal, the former and game combination of functional design is very limited, the latter support
memory. Therefore, you must optimize the texture.
There are many schemes for texture optimization. Let's list them one by one.(1) color depth OptimizationLet's take a look at the comparison chart below the timeline:The first figure is in the argb888 format, and the second figure is the PVR after I converted it to a1r5g5b5. I can't see any difference from a general gamer's perspective. However, each pixel occupies 4 bytes in the first image, while eac
Texture Optimization in Cocos2d-x optimization, cocos2d-x optimization texture1. Texture pixel formatAnother important indicator of texture optimization is the texture pixel format. To maximize the user's fidelity requirements, select the appropriate pixel format, this greatly improves the processing speed of textures. In addition, the texture pixel format is closely related to hardware.Next, let's take a look at the format of texture pixels. The main formats include:RGBA8888. 32-bit color, whic
porting
Many Web pages are currently characteristic of Java severlet, which makes it a general trend for browsers to support the Java language. Embedded Mozilla is easy to support Java, which is one of the reasons for choosing Embedded Mozilla. As long as you register the JVM provided by sun to the STB System library path in the form of a dynamic library, and set the browser's plug in function for Java severlet in Embedded Mozilla, embedded Mozilla supports Java severlet.
JVM download reference
extensions (EPG implementation and easysoap use)
This function is mainly used to expand STB to PVR/DVR. After such expansion, you need to add a large storage device to store data. EPG is an indispensable software for PVR/DVR. It provides programs to users in advance, and users place orders through reservation ", PVR/DVRs Enable Automatic Recording of programs ba
.
First, we have no way to overcome the Hardware Memory limit. For example, the current popular iPhone 4S total memory capacity is 512 m, and the actual available memory is much less than this number, so when you develop a game, you must know yourProgramThe memory demand during runtime must be smaller than the available memory, and the smaller the memory, the better. When we develop a 2D game, the most used resource is the texture. A texture with a width and height of 1024 is in the format
for other application development and EasySoap use)
This function is mainly used to expand STB to PVR/DVR. After such expansion, you need to add a large storage device to store data. EPG is an indispensable software for PVR/DVR. It provides programs to users in advance, and users place orders through reservation ", PVR/DVRs Enable Automatic Recording of programs
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.