1j01 / tiamblia-game

🏹 An exploration adventure game
https://1j01.github.io/tiamblia-game/
5 stars 2 forks source link

Flowers #35

Open 1j01 opened 1 week ago

1j01 commented 1 week ago

I had flowers in the original, it's one of the few things missing from the new version.

Should it be part of the grassy terrain entity LushGrass, or GeneticPlant?

If it's part of the terrain, like in the original, it will naturally follow the terrain when editing it. If I extend GeneticPlant to do small flower-like plants, I could have a lot more variety, but it wouldn't follow the terrain, by default, and it might be much more expensive to draw.

1j01 commented 1 week ago

Maybe a hybrid approach would be good, using GeneticPlant for procedural generation for variety, but having the LushGrass own the flower entities instead of the world, perhaps caching them to textures (maybe even animated textures for a swaying in the wind effect / trampling effect). (drawImage is really slow in canvas2d, so that probably wouldn't be a valid optimization. For webgl, it would be an option but there would be other options to consider like instancing geometry.)