java me - J2ME Manager.CreatePlayer() freeze application for a split second when using the first time -


When I call for the first time for the manager. Creteplayer () It deposits my application for a second partition and it is a problem because I am writing a game and it is worth mentioning, what can I do to fix it? As far as I know, there are general arguments for the game:

>

Display screen loading

All heavy operations are prepared / preloaded and cached here, so games can be run easily later usually called here The way to go is manager.createplayer and player.prefetch () . All images & amp; The sound is ready first, and can be used quickly when the game starts.

Start the game (loop)

The resources have been created / preloaded, you can now use (Draw / Play) here Player Use instances that have been & amp; Prefetch (from the loading screen)


You can read about player state (especially about prefetch).

Note that you can reuse the player example and call the call start () multiple times to play the same sound Can. No need to call again on createPlayer .

Comments

Popular posts from this blog

Verilog Error: output or inout port "Q" must be connected to a structural net expression -

jasper reports - How to center align barcode using jasperreports and barcode4j -

c# - ASP.NET MVC - Attaching an entity of type 'MODELNAME' failed because another entity of the same type already has the same primary key value -