Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

245
Visualizações
Is storing Phaser Containers computationally/space efficient? (2D game framework question)

This question is about Phaser.js, javascript game framework for creating games, though I think the question can probably be generalised to any framework like Pygame.

Say I want to represent different in-game locations with Phaser Containers, where each container contains many images. The containers appear slightly different (contain different images) every time they are rendered. A new container needs to be rendered every 1-2 mins or so when user navigates around the game.

Is it more computationally efficient if all my possible containers are stored in a container array, and they're toggled visible and invisible when needed? Or can they cheaply be recreated and re-rendered as and when you need them? However, if it's computationally efficient, will saving containers consume lots of memory?

Any help is appreciated, thanks!

about 4 years ago · Juan Pablo Isaza
1 Respostas
Responde à pergunta

0

One of the fastest ways is to store all images possible onto one single sprite sheet. That sheet gets loaded once during the initial loading of the game, and any and all displayed things are shown by copying pixels from the sprite sheet onto a single html canvas.

If a Phaser Container is a canvas, then having too many would slow down the game.

about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda