Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

244
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!