PDA

View Full Version : how would i make the play area of this fullscreen?



jundo12
05-05-2017, 10:49 PM
how would i increase the play area of this to fullscreen width/height? just increasing canvas size at beginning only increases the black colored background but the play area remains defined by the positioning of the "Agents" and "Ogres" and menus. problem is, it's extremely sensitive to changes. for example, i only need 1 monster (ogre) and 1 player (agent), but it wont let me change the name of either of them or remove excess agents/ogres, otherwise it breaks the script. the creator of the script claims you can put images in a directory and it will pull the associated images from it to depict the ogres and agents. that doesn't work either. admittedly, the images i have placed in the images directory are much bigger than the space he has alloted for them in the canvas, but you'd think it would show them regardless. i realize this means he's assigned maximum width/height for the images but that's kinda shooting yourself in the leg since it would force the game graphics to be extremely pixelated if the canvas size is increased.
https://thiscouldbebetter.wordpress.com/2014/07/03/a-turn-based-combat-image-for-an-rpg-in-javascript/

isnt there a way with css to tell the canvas to resize to browser width/height, like responsive behavior? and in fact, make all images associated with it, usable at any size to depict the agents/ogres? why isolate it to only one size? can it be changed to percentage instead of pixels so that images scale up and down with canvas resize?