
On a gaming PC, maps can be quite large - but on an average mobile not so much.īut I autogenerate the levels which means I can dynamically adjust size, so this works for my game.īut in general yes, you want a small canvas, the size of the screen - and then only draw what is needed.

Performant enough, that in my case, I draw everything on a big map - zoom in and then move the map around, when the player moves. On average the canvas is quite performant, though. I am not sure if I understand you correctly, but since I did wrote a canvas game from scratch, I can tell you that you cannot count on the canvas to optimize anything (and likely not what you want in this case)Įvery browser does it a bit different and it will depend on the hardware and OS what optimisation features are avaiable. "I'm currently stuck on "can I count on the HTML Canvas to optimise cases where a tile is out of view or should I make a fancy system to calculate that now?""
#Lugaru temple in overgrowth code
Read the code too, the author is great about doing things like building gradient descent maps for the dungeon level and only invalidating them when the dungeon configuration changes, that kind of thing. Oddly enough, the majority of my deaths are to eels :\ "Mage" builds with a couple enchanted damage staves and a ring of wisdom are fun, but I scarcely ever find the items I need to make it work. You won't win going head-to-head with dragons.

Tank builds where you've got enchanted plate and broadsword and you're smashing everything also work, but really only to a point. "Mobility" builds that let you be super choosy about your engagements are also workable (lots of obstruction, blinking, and tunneling). You can get through the game in leather armor (especially if its a special one that lets you reflect incoming spells or that lets you blithely breathe otherwise-harmful atmospheric effects). Stealth is a totally valid tactic (press ']' to turn on a view of the stealth radius, notice that spending a turn waiting reduces your stealth radius to 1/2 normal, and also I like to press '\' to turn off the dynamic light effects to make it easier to see my stealth radius). If you end up popping a bunch of life potions in the first few levels, maybe you're not being picky enough. You can see your HP (and your nutrition) as liabilities but they're also resources - if you go several dungeon levels without losing any HP, maybe you're being too picky about your fights. You don't get "experience points" for killing anything, and there's no "leveling up" (though drinking potions of life increases your max HP). Brogue is a spiritual successor to the original Rogue, where the goal is not to Kill Anything That Moves but rather to get the Amulet and escape by any means necessary.
