So I know in a Tile Based game its more effecient to have static final instances of each tile, then populate your array with those instances. But what about Rendering? You have to pass the position that tile should be rendered into your method you use for rendering. Is there a way for the tile to render from its position in a Tile array? Is passing in a position each render the most effecient way?
Jump to Post
This sounds like the "premature optimisation" anti-pattern!
I would concentrate on getting it working properly with a simple implementation (eg re-draw everything each tick). If you try to optimise too early then
1) You may well be wasting time fixing a non-problem
2) Your optimisation may well clash with things …
All 6 RepliesReply to this topic
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.