0
\$\begingroup\$

I'm developing a racing game where you can customize your vehicle with pre-made textures and also user generated ones (players can add assets to the game).

I want to know what you think is the best approach to this type of customization.

  • Use pre-packed textures and load the corresponding atlases for every single part (I think this is the easiest, but wastes memory having 3 or 4 atlas in memory and just using one texture of each).

  • Check what the user selected and pack those textures into an atlas at runtime and use that until the user changes any part and pack it again, and so on... (more complex, less gargabe in memory).

Take into account that customizable parts include: wheels, spoilers, hoods, decals, exhausts and the user also has the possibility to add content.

I've never implemented something like this so any help would be appreciated.

\$\endgroup\$
  • 1
    \$\begingroup\$ It sounds like you correctly understand the trade-offs you're making here: simple, potentially wasteful, versus efficient but complex to implement. So the question is one of budget: what's more precious to you at this moment in your project, video RAM or development hours? You're the one in the best position to evaluate whether the dynamically packed atlas is something you have the time/knowledge/interest/will to implement right now. \$\endgroup\$ – DMGregory Aug 8 '18 at 11:50
2
\$\begingroup\$

I think the best way to handle it would be to create an atlas at runtime. Maybe by having it compile once a player saves their customizations in the customizing menu. It would be the easiest in the long run because then players won't have to add an entire atlas to get a custom texture into the game.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.