The wizard in the game program, multiple files with a “texture”?

Please forgive me if my terminology is incorrect, because I am a newbie in game programming. I have been studying some open source projects and noticed that some sprites are divided into several files, all The files are all grouped together to make a 2d object look like an animation. That is straightforward. Then I will see a different way to put all the 2d objects in a png file or something like that, relative to each other O.

Is there an advantage to using one method over another? Should the sprite be in a separate file? Why are they all on a piece of paper sometimes?

The former method is usually simpler and easier to program, so you can see in open source projects Many methods.

The second method is more effective on modern graphics hardware because it allows you to draw multiple different sprites from a large texture by specifying different u, v coordinates. Select each individual sprite from the composite paper. Because the u,v coordinates can be streamed to the shader along with the vertex data, this allows you to be more efficient than switching the texture for each polygon (which means changing the shader state) Draw a large group of sprites. This means you can draw more sprites every millisecond, and thus get more sprites.

Please forgive me if my terminology Not correct because I am new to game programming. I have been researching some open source projects and noticed that some sprites are divided into several files and all files are combined together to make a 2d object look like animation. That is Straightforward. Then I will see a different way to put all 2d objects in a png file or something similar next to each other.

Use one method against another Are there advantages to this method? Should the sprite be in a separate file? Why are they all on a piece of paper sometimes?

The former method is usually simpler and easier to program, so you can see many methods in open source projects.

The second method is more effective on modern graphics hardware because it allows you to draw multiple different sprites from a large texture by specifying different u,v coordinates to select each individual sprite from the composite paper. The u,v coordinates can be streamed to the shader along with the vertex data, which allows you to draw a large group of sprites more efficiently than switching the texture for each polygon (which means changing the shader state). This means you can Draw more sprites every millisecond, so as to get more sprites.

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 1764 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.