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?
Doogledude123
45
Posting Whiz
Recommended Answers
Jump to PostWhat game is this?
Jump to PostThis 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 Replies
DaveAmour
160
Mmmmmm beer
Featured Poster
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
Doogledude123
45
Posting Whiz
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
Doogledude123
45
Posting Whiz
JamesCherrill
4,733
Most Valuable Poster
Team Colleague
Featured Poster
Doogledude123
commented:
Awesome recommendation, always the best answers from you.
+3
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.